scieee AI-readable full text Open interactive document viewer

Lisbon´s Real Estate Analysis based on Proximity Calculations

Valério, Maria Madalena Jorge do Nascimento

Abstract

The real estate market is always changing and evolving and with sustainability becoming an increasingly important topic, the way the price of a property is determined, and the factors taken in consideration, should evolve as well. Inspired by the popular concept of Smart Cities, more specifically the 15-minute city approach, which is a concept highly focused on accessibility and walkability in cities, different variables were calculated to assess each property’s accessibility and diversity of amenities. Both these factors are different for each property, depending on their location. This work presents an analysis of the real estate market in Lisbon where, aside from the physical attributes of a habitation, the diversity and accessibility to difference services in each location will be evaluated and integrated in the machine learning process. The goal is to know the impact of each calculated measure when predicting the price per meter value of each house, in order to help understand why similar houses across Lisbon have such distinctive prices. Both the Euclidean Distance and the Network Distance were used in the calculations. The distance to Tejo River and the number of commercial establishments within a 15-minute walk radius were two of the most important features in the predictive models tested. Three different methods were tested and improved, electing the Random Forest Regressor as the best the one and the one to be used in the final model. The final model had half of the variance in the target explained by the all the calculated features, which makes this analysis a potential good tool to help fill the gap of a predictive model that only factors in the physical characteristics of a house.

Full text

i Master Degree Program in Data Science and Advanced Analytics Lisbon’s Real Estate Analysis based on Proximity Calculations Maria Madalena Jorge Do Nascimento Valério Project Work submitted to International Journal of Scientific and Research Publications presented as partial requirement for obtaining the Master Degree Program in Data Science and Advanced Analytics NOVA Information Management School Instituto Superior de Estatística e Gestão de Informação Universidade Nova de Lisboa MDSAA i NOVA Information Management School Instituto Superior de Estatística e Gestão de Informação Universidade Nova de Lisboa LISBON’S REAL ESTATE ANLYSIS BASED ON PROXIMITY CALCULATIONS by Maria Madalena Jorge do Nascimento Valério Project Work presented as partial requirement for obtaining the Master’s degree in Advanced Analytics, with a Specialization in Business Analytics Supervisor / Co Supervisor: Miguel Castro Co Supervisor: Bruno Jardim ii 02 2023 STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledge the Rules of Conduct and Code of Honor from the NOVA Information Management School. Lisbon, February 2023 iii ABSTRACT The real estate market is always changing and evolving and with sustainability becoming an increasingly important topic, the way the price of a property is determined, and the factors taken in consideration, should evolve as well. Inspired by the popular concept of Smart Cities, more specifically the 15-minute city approach, which is a concept highly focused on accessibility and walkability in cities, different variables were calculated to assess each property’s accessibility and diversity of amenities. Both these factors are different for each property, depending on their location. This work presents an analysis of the real estate market in Lisbon where, aside from the physical attributes of a habitation, the diversity and accessibility to difference services in each location will be evaluated and integrated in the machine learning process. The goal is to know the impact of each calculated measure when predicting the price per meter value of each house, in order to help understand why similar houses across Lisbon have such distinctive prices. Both the Euclidean Distance and the Network Distance were used in the calculations. The distance to Tejo River and the number of commercial establishments within a 15-minute walk radius were two of the most important features in the predictive models tested. Three different methods were tested and improved, electing the Random Forest Regressor as the best the one and the one to be used in the final model. The final model had half of the variance in the target explained by the all the calculated features, which makes this analysis a potential good tool to help fill the gap of a predictive model that only factors in the physical characteristics of a house. KEYWORDS Lisbon; Smart City; Real Estate; Accessibility; Mobility Sustainable Development Goals (SGD): This Master’s Thesis contributes to the Sustainable Development Goal of Sustainable Cities and Communities. iv INDEX 1. Introduction ................................................................................................................... 1 2. Literature review ........................................................................................................... 3 2.1 The 15-Minute City Approach ............................................................................... 3 2.2 Real Estate ............................................................................................................. 4 2.3 Evaluating Real estate’s prices through 15-minute City features ......................... 5 3. Methodology ................................................................................................................ 8 3.1 Distance Calculations ............................................................................................. 8 3.2 Methods to uncover relationships ........................................................................ 9 3.2.1 Linear Regression ............................................................................................ 9 3.2.2 Decision Tree Regressor ............................................................................... 10 3.2.4 Random Forest Regressor ............................................................................. 10 3.2.5 Lasso .………………………………………………………………………………………………………11 3.2.6 Spearman correlation ................................................................................... 11 3.3 Evaluation Methods ............................................................................................ 11 3.3.1 R2 Score ......................................................................................................... 11 3.3.2 R2 Adjusted Score .......................................................................................... 12 3.3.3 Mean Squared Error ..................................................................................... 12 3.3.4 Mean Absolute Percentage Error ................................................................. 12 3.4 Software Used ..................................................................................................... 12 4. Results and discussion ................................................................................................ 14 4.1 Feature Analysis ................................................................................................... 14 4.2 Linear Regression Analysis ................................................................................... 16 4.3 Random Forest Regressor Analysis ...................................................................... 18 4.4 Results Comparison ............................................................................................. 19 4.5 Discussion ............................................................................................................ 20 5. Conclusion .................................................................................................................. 24 6. Limitations and recommendations for future works ................................................. 25 References ....................................................................................................................... 26 Appendix.......................................................................................................................... 28 v LIST OF FIGURES Figure 1.1 - Lisbon’s parishes most pressured by local accommodation ......................... 2 Figure 2.1 - Distance covered by each way of commuting ............................................... 4 Figure 2.2 - Framework proposed by Pozoukidou & Chatziyiannaki ................................ 6 Figure 2.3 - Paris Framework Result presented by Pozoukidou & Chatziyiannaki ........... 7 Figure 3.1 - Euclidean distance and Network distance ..................................................... 8 Figure 3.2 - Decision Tree Regressor ............................................................................... 10 Figure 3.3 - Random Forest Regressor ............................................................................ 11 Figure 4.1 - Linear Regression between Price/meter and Commerce Count ................. 17 Figure 4.2 - Random Forest Regressor Feature Importance ........................................... 18 Figure 4.3 - Final model's most important features ........................................................ 20 Figure 4.5 - Linear Regression between Price/meter and Water distance ..................... 21 Figure 4.5 - Linear Regression between Price/meter and Shannon Diversity Index ....... 21 Figure 4.6 - Radar chart of the features in Avenidas Novas and Santa Clara ................. 21 vi LIST OF TABLES Table 3.1 - Calculated Features, Description and Formula ............................................... 9 Table 4.1 - Lasso's Top 10 Importance ............................................................................ 14 Table 4.2 - Spearman's Correlation between some of the variables .............................. 15 Table 4.3 - Linear Regression Coefficients ...................................................................... 16 Table 4.4 - Linear Regression features with VIF below ten ............................................. 17 Table 4.5 - Linear Regression Model scores .................................................................... 18 Table 4.6 - Random Forest Regressor scores .................................................................. 19 Table 4.7 - Final model scores ......................................................................................... 20 Table 4.8 - Random Forest Regressor scores .................................................................. 23 vii LIST OF ABBREVIATIONS AND ACRONYMS MAPE Mean Absolute Percentage Error. MSE Mean Squared Error. R2 R-Squared. SUSHI Sustainable Historic City Districts. VIF Variance Inflation Factor. 1 1. INTRODUCTION Over the years cities have become vast areas, very often with car-oriented developments, characterized by a less appealing aesthetics of landscapes and an ever-growing population, so much so, that it is expected that hundreds of people will migrate to cities in the next decade (Luscher, 2021). Faced with this future scenario, the recent health crisis of Covid-19 and the prolongated climate breakdown, more cities are shifting their focus to becoming more sustainable, inclusive and with quicker ways of commuting (Pozoukidou & Chatziyiannaki, 2021). These crises ended up exposing the true problems and fragilities within cities and their need for a response. One of the most striking realizations was the time saved by working remotely Before the global Covid-19 pandemic people would spend an extensive period of time commuting to work every day, which not only is very time consuming but also very harmful for the environment and public health (Johansson, 2017). This shift from the traditional office work and rigid workspaces to different work styles, taking in consideration what people enjoy and need to do (Taylor, 2021), has helped 15-minute cities allocate workspaces to specific areas, allowing companies to have other small offices across town where their employees could go. Not only it promotes a better life-work balance, leaving more time for people to do what brings them joy, while not commuting to work every day, but also it helps to reduce emissions and diminishes the transferability of COVID-19 (Moreno, Allam, Chabaud, Gall, & Pratlong, 2021). According to an international coalition of mayors focused on climate change and sustainability called C40 Cities, implementing the idea of a 15-minute city could help the urban areas recover from the financial and economic devastation of the pandemic (C40 Cities Climate Leadership Group, 2021). As the 15-minute city concept grows stronger, neighborhoods within cities will be fully focused on fulfilling needs like accessibility, walkability, residence density and land mix use, restoring the urban concept of proximity. Making the most out of the close location between services, activities and enabling people to access different opportunities within their urban environment (SmartCity, 2022). This proximity-based strategies offers people local access to a wide scope of amenities, like schools and preschools, healthcare services, social services, restaurants, entertainment and cultural events, parks etc., everything that is crucial for quality of life (Boucher, 2020). This transformation, however, might be a double-edged sword. As neighborhoods progress into small walkable areas, the real estate value of the proprieties within those neighborhoods may very likely increase, given the fact that one of the most important aspects of a propriety is its location and its proximity to points of interest. Lisbon has become one of Europe’s smartest cities, having received the European Green Capital Award in 2020 (Smart City Lisbon, 2018) and, over the last decade, amplified the available ways of commuting in the city by building more bike paths, rearranging key locations like squares, roundabouts and streets. One of the biggest purposes of the strategic plan of Lisbon for 2020 was to increase its population by promoting housing, taking smart-city initiatives regarding daily life and ageing (POR Lisboa 2014-2020). In 2019, before the Covid-19 pandemic, Portugal had one of the most dynamic real estate markets within the Western Europe, mostly due to its tax incentives granted to foreign buyers and their gold visas (Almeida, 2019). In these last few years, Lisbon has become a tourism magnet with many foreign real estate investors that renovate properties into short-term lease properties like Airbnb (Warren & Almeida, 2020). These transformations have caused an increase on Portugal’s real estate prices given that now they are directed to tourists, who have greater purchasing power. According to the Eurostat, back in 2019, Portugal had an increase of almost 10% in their real estate prices, the biggest within Europe (Idealista, 2021). As Lisbon and its neighborhoods continue to change and become more sustainable, inclusive and with amenities close proximity, it is natural to assume that the real estate prices in the capital will follow these improvements and, ultimately, increase. 8 3. METHODOLOGY As previously seen, the 15-minute city concept has four principles that assess different aspects of a city. This research focuses on the principle of proximity and its impact on real estates, through various predictive models constructed, based on calculated variables like the number of amenities in a 15- minute walk radius and both the Euclidean and Network distance between an amenity and a property, excluding all the information regarding the physical aspects of the latter. These calculated variables try to characterize and score each property based on the 15-minute city’s principle of proximity. This was the selected principle for the analysis given it highly focuses on accessibility and mobility in a city. 3.1 DISTANCE CALCULATIONS Both the Euclidean distance and the Network distance were used to calculate the distance between amenities and each property, both calculated in very distinct ways. The Euclidean distance calculates the distance between two points by using the Pythagoras theorem (Equation 1), as for the Network Distance, it uses Lisbon’s pedestrian network to find and calculate the best route from one point to another, using nodes and a search radius. There is no specific formula for network distance as it depends on the topology and configuration of the network being used. To be more precise, the methods behind these distance values are the following: d(x,y) = √∑ n i=1 (1) Figure 3.1 - Euclidean distance (left) Network distance (right) Retrieved from - https://tinyurl.com/medium-AxU-platform The scores for each property are divided in type of amenity, calculation method and scale, making it a total of 47 features. For example, there is a feature that calculates the network distance to emergency establishments and discards the 5 minutes of the trip, one feature that calculates the Euclidean distance to the water, which in this case is the Tejo River, and many others. These calculated variables contemplate several scenarios to try to characterize the location of each property as best as possible. Table 1 contains the details and calculation methods for some of the features. The features that are missing are calculated the same way and they can be analyzed in Annex 1. 9 Name Description Calculation Name Description Calculation Transport Count Number of Public Transportation option in a 15- minute walk radius groupby(['IMOVEL_ID', 'transport_dist']).agg( {'geometry': 'first', 'transport_count' : 'count'}) Commerce Count Number of commercial establishments in a 15-minute walk radius groupby(['IMOVEL_ID', 'comerce_dist']).agg( {'geometry':'first', 'comerce_count':'count'}) Shannon Diversity Index Measures the diversity of amenities in a 15-minute walk radius 𝑯′=−∑𝒑𝒊 𝒍𝒏 𝒑𝒊 𝑺 𝒊=𝟏 S – Nr of the amenities pi – Nr of establishments by type of amenity Average Network Distance Average of the time of all the different amenities within a 15-minute walk radius Avg Network Distance = distances.groupby( “index_o”, group_keys=False)['distance'].mean() Transport Distance Euclidean distance to the closest public transportation option ckd_tree= cKDTree(B) dist,idx= ckd_tree.query(A, k = 1) idx = itemgetter( * idx) (B_ix) Water Distance Euclidean distance to the Tejo River Water Distance = house_node.geometry .distance( river_node.geometry) Government Score Sum of the distances, in minutes, to all governmental buildings in a 15-minute walk radius Score = sum([1/(1+dist) for dist in a['distance']]) Government Score 2.5 Sum of the distances to governmental buildings, discarding 2.5 minutes Score_2.5 = sum([1/(1+dist+2.5) for dist in a['distance']]) Government Score 5 Sum of the distances to governmental buildings, discarding 5 minutes Score_5 = sum([1/(1+dist+5) for dist in a['distance']]) Government Score 10 Sum of the distances to governmental buildings, discarding 10 minutes Score_10 = sum([1/(1+dist+10) for dist in a['distance']]) Table 3.1 – The calculated features, its description and formula. 3.2 METHODS TO UNCOVER RELATIONSHIPS With the remaining independent variables, different feature importance techniques were calculated to furthermore improve the predictive power of the final model. Each technique calculates a score for the input variables in that given model. The methods tested in each model were the Linear Regression, Decision Tree Regressor, and the Random Forest Regressor. Lasso and Spearman correlation were also analyzed. 3.2.1 Linear Regression The linear regression uses the value of an independent variable to predict the value of the dependent variable, through a linear approach. This analysis allows the user to assess the quality of the variables in predicting the outcome along with which of these variables are more significant and how each of them impacts the dependent variable. In this phase of the research the Linear model created to test the feature importance is simply an instance, with no parameters associated. The linear regression formula represented below (Equation 2). 10 Y = β0+β1X (2) Where: • Y – Dependent Variable • 𝜷𝟎– Constant / Intercept • 𝜷𝟏 – Slope / Coefficient • X – Value of the independent variables A common phenomenon in a regression analysis is the Multicollinearity, it exists when multiple independent variables are correlated in a model. The Variance Inflation Factor (VIF) identifies multicollinearity by estimating how much the variance of a regression coefficient is amplified due to multicollinearity in the model. VIF ranges from 1 upwards, where 1 is considered not correlated and values greater than 5 is considered highly correlated. The threshold used in this case was to retain the variable with a VIF value below or equal to 10. 3.2.2 Decision Tree Regressor This method uses a structure flowchart-like where all the possible ranges of results are contemplated. In a decision tree there’s nodes and branches, which contain the condition and the result, respectively. Each observation goes through this flowchart-like tree based on the value of its variables and a model is trained to predict future observations. Similarly to the Linear Regression, only an instance of the model was created for this part. Figure 3.2 - Decision Tree Regressor. Retrieved from https://tinyurl.com/geeks-for-geeks 3.3.3 Random Forest Regressor The Random Forest Regressor is an ensemble method composed of multiple decision trees. The final prediction for each observation is the average result of all the outcomes predicted by each tree. Generally, returns better results than Decision Tree Regressor method. Like the two previous Regression models, only an instance of the Random Forest Regressor is created to check the feature importance based on this method. 11 Figure 3.3 - Random Forest Regressor. Retrieved from https://tinyurl.com/analytics-vidhya Besides this feature importance method two other feature selection techniques were tested, Lasso and the Spearman’s correlation. 3.3.4 Lasso The Least Absolute Shrinkage and Selection Operator is based on a regression analysis that focuses on enhancing the prediction accuracy of the models. This method is divided in two steps, the regularization of model parameters by shrinking the regression coefficients, and the feature selection, where every non-zero value is used in the predictive model. 3.3.5 Spearman correlation Even though Spearman’s correlation is not exactly a feature importance method, it is an important technique that measures the strength of association between two ranked features by assessing their monotonic relationships, whether linear or not. Spearman’s correlation is, simply, the Pearson’s correlation between the rank values of two features (Equation 3). ρ=1 − 6∑di2 n(n2−1) (3) ρ- Spearman’s rank correlation coefficient di- Difference between the two ranks of each observation n – Number of Observations 6 – Constant Value 3.3 EVALUATION METHODS To accesses each model’s predictive power, R2 Score, R2 Adjusted Score, Mean Squared Error (MSE) and Mean Absolute Percentage Error (MAPE) were calculated. These scores combined transmit all the information needed to understand if the selected variables are helping the models in predicting the target more accurately or not. 3.3.1 R2 Score R-Squared ranges between 0 and 1 which indicates the amount of variance in the output of the dependent variable that is predictable from the independent variable. A high value would mean that 12 most of the changeability in the dependent variable’s output can be explained by the model. R-Squared indicates the proportion of points that lie within the line created by the regression equation (Equation 4), therefore, a higher value indicates better results. R2= 1 − ∑(Yi−Yi)2 𝑛1=1 ∑(Yi−Y)2 𝑛1=1 (4) 3.3.2 R2 Adjusted Score As we add new features to a multiple regression model, R-squared will either continue to increase or stop, regardless of their quality. R-squared Adjusted eliminates this issue by taking in consideration the number of samples in the dataset, and the number of features in the model, increasing the score only when the newly added features improve the model’s accuracy (Equation 5). Just like the R- Squared, a higher value indicated better results. Adjusted R2= 1 − (1−𝑅2)(𝑁−1) 𝑁−𝑝−1 (5) 3.3.3 Mean Squared Error The MSE (Mean Squared Error) measures the total error in a model by calculating the average squared difference between the observed values and the predicted ones. This calculation repeats itself for all the observations and afterward, all those values are summed and divided by the total number of observations (Equation 6). This method highlights the large errors, making it useful when working with models where these errors must be minimized. MSE = 1n ∑(Yi−Yi)2 n i=1 (6) In a regression, as the data points get closer to the regression line, the error in the model decreases, producing more precise predictions. 3.3.4 Mean Absolute Percentage Error Mean Absolute Percentage Error, or MAPE, measures the accuracy of a predictive model by calculating the average percentage errors of the predictions. The error is the difference between the actual and forecasted value, so a smaller value would mean a smaller MAPE and therefore, better results. 3.4 SOFTWARE USED To develop this study, Project Jupyter and python libraries were used. Jupyter notebook was the selected tool to develop and run the code for this analysis, due to its vast accessibility to python libraries. The OSMnx (Boeing, 2022) is one of the python libraries that was used, and it carried out one of the most important parts of the process which was collecting all the available data regarding all types of amenities (government, health, education, finance, public transport, leisure, food and river). “OSM” means “Open Street Map” and it allows the user to download geospatial data, model and analyze real-world street networks. It allows users to model walkable urban networks with the use of python, where these models can be visualized and analyzed. The GeoPandas library was also very helpful in order to work with the coordinates that were given, and use them to calculate the difference distances, and therefore, their scores regarding the various amenities. 13 The following GitHub link contains two of the notebooks created to calculate the different features used in this thesis: GitHub - Thesis repository 14 4. RESULTS AND DISCUSSION In this following chapter the results and findings of the analysis will be exposed and discussed, for a clearer interpretation of the outcomes, this chapter will be organized in four sub-chapters, 1.Feature Analysis 2. Linear Regression Analysis, 3. Random Forest Regressor Analysis and 4.Discussion 4.1 FEATURE ANALYSIS According to the Lasso method, nine features were eliminated and thirty-five were selected, most of which also selected in the previous methods. Even though thirty-five were selected, only the best twenty features were taken into consideration. Some of the best features were the “Shannon Diversity Index” , “government score”, and “education score 2.5”. Lasso also allows to understand the impact of each feature, for example the feature “Shannon Diversity Index” has an importance value of - 1423.94, which mean it is an important feature with an inverse correlation to the target. Some of the features selected by Lasso are represented below, the complete table is present in Annex 2. Feature Importance Shannon Diversity Index 1423.94 Government Score 1033.45 Education Score 2.5 886.11 Government Score 2.5 847.97 Finance Score 2.5 526.85 Education Score 10 433.22 Health Score 2.5 418.10 Finance Score 10 331.98 Leisure Score 2.5 231.93 Food Score 207.02 Table 4.1 – Lasso’s Top 10 Importance The Spearman’s correlation also offered some insights, not as concrete as the previous methods but nevertheless important. The most interesting insight was the correlation between the different scores which indicate that some establishments influence the presence of others. For example, the number of public transportations within a 15-minute walk radius of a house is highly correlated with the food establishments score near that same house, meaning that in areas where there are more restaurants, markets etc., the public transportation network offers more options for a person to commute. The same happens with the number of educational buildings, like high schools or universities, in a 15- minute walk radius and the distance to health establishments, meaning that schools often have heath and emergency services nearby. Features that have a correlation higher than 0.8 should be discarded, at least one of them, since this means that both variables convey the same information. Having two very similar features, transmitting the same information, is not very effective. 15 The graphic below shows the Spearman’s correlation between some of the variables. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 1.Commerce Count 1 0.7 0.6 0.9 0.8 -0.8 0.4 0.5 0.6 0.3 0.3 0.7 0.4 0.2 0.6 0.004 2.Public Transport Score 0.7 1 0.7 0.7 0.6 -0.5 0.6 0.6 0.8 0.2 0.02 0.8 0.3 0.5 0.8 0.06 3.Finance Score 10 0.6 0.7 1 0.7 0.5 -0.4 0.6 0.7 0.9 0.2 0.1 0.9 0.4 0.4 0.8 -0.2 4.Public Building Count 0.9 0.7 0.7 1 0.7 -0.6 0.5 0.6 0.7 0.4 0.3 0.7 0.5 0.3 0.6 -0.1 5.Transport Count 0.8 0.6 0.5 0.7 1 -0.5 0.3 0.4 0.5 0.3 0.03 0.6 0.4 0.1 0.5 - 0.007 6.Shannon Diversity Index -0.8 -0.5 -0.4 -0.6 -0.5 1 -0.1 -0.4 -0.4 0.08 -0.3 -0.5 0.06 0.00 8 -0.3 - 0.008 7.Leisure Score 2.5 0.4 0.6 0.6 0.5 0.3 -0.1 1 0.6 0.6 0.1 0.08 -0.3 -0.5 0.06 0.00 8 -0.04 8.Entertainm ent Score 0.5 0.6 0.7 0.6 0.4 -0.4 0.6 1 0.7 - 0.03 0.09 0.8 0.4 0.1 0.5 -0.3 9.Governme nt Score 5 0.6 0.8 0.9 0.7 0.5 -0.4 0.6 0.7 1 0.1 0.2 0.8 0.4 0.3 0.8 -0.2 10.Education Count 0.3 0.2 0.2 0.4 0.3 0.08 0.1 - 0.03 0.1 1 0.07 0.2 0.4 0.7 0.5 0.4 11.Average Network Distance 0.3 0.02 0.1 0.3 0.03 -0.3 0.08 0.09 0.2 0.07 1 0.02 0.2 - 0.06 - 0.03 0.2 12.Food Score 2.5 0.7 0.8 0.9 0.7 0.6 -0.5 0.6 0.8 0.8 0.2 0.02 1 0.3 0.4 0.8 -0.2 13.Greenspa ces Count 0.4 0.3 0.4 0.5 0.4 0.06 0.7 0.4 0.4 0.4 0.2 0.3 1 0.2 0.4 0 .03 14.Education Score 10 0.2 0.5 0.4 0.3 0.1 0.00 8 0.3 0.1 0.3 0.7 - 0.06 0.4 0.2 1 0.7 0.4 15.Health Score 2.5 0.6 0.8 0.8 0.6 0.5 -0.3 0.6 0.5 0.8 0.5 - 0.03 0.8 0.4 0.7 1 0.1 16.Water Distance 0.004 0.06 -0.2 -0.1 - 0.007 - 0.00 8 -0.04 -0.3 -0.2 0.4 0.2 -0.2 0.03 0.4 0.1 1 Table 4.2 - Spearman’s Correlation between some of the variables Each amenity has a set of scores, but only one score of each set will be kept. Despite the fact that highly correlated features should be removed, in this case and since each variable refers a different amenity, some highly correlated features will be kept. In the following sections other feature analysis techniques were deployed in order to better understand these calculated features. 16 4.2 LINEAR REGRESSION ANALYSIS The Linear Regression representation between a target variable and an independent variable is one of the best ways to visualize their correlation and impact. Their coefficients transmit some of the most important information to understand their behavior, the constant and the slope. Table 4 contains the linear regression for each of the features selected for the final model. Table 4.3 – Linear Regression coefficients With the values of 𝛽0 and 𝛽1 it is easy to understand each variable’s behavior. The slope indicates if the feature has a direct or inverse of relationship through is sign, if the slope is negative then a lower value of the feature in question, will generate a higher Target value. For example, the relationship between the price per meter and the number of commerce establishments in a 15-minute walk radius, “commerce count”, has a tendency of lower prices having a lower number of commerce establishments nearby. These variables have a positive linear relationship, and can be visualized below: Feature 𝜷𝟎 / Intercept 𝜷𝟏 / Slope Feature 𝜷𝟎 / Intercept 𝜷𝟏 / Slope Entertainment Score 5 3426.65 246.07 Health Score 2.5 3610.76 65.60 Leisure Score 2.5 3449.14 34.19 Greenspaces Count 3520.37 3.28 Shannon Diversity Index 5049.19 -1276.83 Public Buildings Count 3274.14 19.84 Public Transport Count 3261.35 7.88 Public Transport Score 3461.62 22.71 Education Count 3923.01 -8.44 Education Score 10 3933.27 -35.19 Food Score 2.5 3571.87 12.46 Govermment Score 5 3394.80 188.82 Commerce Count 3376.03 0.63 Water Distance 4519.41 -0.72 Finance Score 10 3404.08 106.01 Average Network Distance 3040.67 80.37 17 Figure 4.1 - Linear Regression between Price/meter and Commerce Count When accessing the Linear Regression’s feature importance results and excluding the variables with a VIF (Variance Inflation Factor) higher than ten, seven features remained which are also considered important in the different feature importance models tested. The selected variables by the Linear Regression’s feature importance are the following: Feature VIF Average Network Distance 1.7306 Water Distance 2.5302 Shannon Diversity Index 4.3115 Education Count 5.0916 Transportation Count 5.1829 Greenspaces Count 6.7085 Public Building Count 8.3501 Table 4.4 – Linear Regression features with a VIF below ten The features above are inside the threshold, and there is no surprise in the outcome since all of these variables are recurrently labeled as important throughout the different feature important analysis. Given that the Linear Regression is one of the simplest predictive methods, it is natural that the results are not optimal, however it is a very good method to gain some insights regarding each feature’s correlation to the target. 24 5. CONCLUSION Often, when appraising the value of a property, the level of accessibility and mobility is not factored in, the physical aspects such as the area and the number of rooms, are much more important when trying to predict the price per meter of a house, than the aspects regarding its location. However, it had to be understood the impact these other aspects could have on the final price. Inspired by the 15- minute city concept and its pillar of proximity, different variables were calculated in order to understand the accessibility around each property. A total of forty-seven features were created using Euclidean Distance, Network Distance, by counting the number of establishments by amenity and a few other methods. Not all the features should be factored in the final model thus, in order to select a set of variables, different feature importance and feature selection methods were analyzed. Lasso, Spearman’s correlation and the feature importance of three regression methods were deployed and analyzed, leaving only sixteen features. These remaining features were used as input variables in three different models, the Decision Tree Regression, the Linear Regression and the Random Forest Regressor. To verify the quality of each model four different scores were calculated and, out of the three instances created, the Random Forest Regressor was the one that performed better. All scores had significant improvements, specially the R2 score with a value of 0.5, meaning that half of the variance in the target variable is explained by the selected features. With the final model obtained, a deeper analysis into the most important features and their impact on the target was made. Calculated features such as “water distance”, “commerce count”, “public transport distance score” and “green spaces distance score”, turned out to be quite important for all the models, proving that the accessibility and location of a house do have an impact on its selling price. When appraisers say that a property’s location is one of the most important aspects, it is true. Even though finding and tunning the predictive model was not the main focus, the scores of the final mode were considerably good, especially considering that the inputted variables were idealized based on the concept of 15-minute cities, from which different scores, distances and counts of amenities were calculated. In conclusion, this analysis alone will not predict the price per meter of a house as accurately as with its physical attributes factored in but, it will help explain the difference in pricing when two houses with identical physical characteristics have highly distinctive prices, as there is a correlation between these calculated attributes and the target variable that proves this theory. 25 6. LIMITATIONS AND RECOMMENDATIONS FOR FUTURE WORKS As stated previously, this analysis focuses on understanding if the proximity principle of the 15-minute city approach has any impact on the price per meter value of a houses. The variables that support this analysis were created based on what the principle assess rather than what might be best inputs for the predictions. Not only this but there may be more variables to characterize a property’s location and accessibility, that were not considered in this research. The methods used for the calculations of said variables were highly time consuming, which made any alteration or correction, that forced a recalculation, a considerable setback. Besides the technical limitations, there were also a few topics that were not discussed in this thesis, and it can be seen as limitations as well. Despite the confirmation that the calculated features impact the predictive models when estimating the price per meter, there is no analysis that confirms that the most expensive areas in Lisbon are in fact the ones that have a higher commerce count, or a lower water distance. Another limitation is that the impact of the calculated features is only tested for the city of Lisbon thus it cannot used as a fact went testing it in other cities. Lastly and probably the biggest limitation is that these predictions and analysis is based on the values of today and this is very volatile market, where the prices can easily change and vary from city to city. For futures works, it would be advisable to develop a better predictive model, a deeper analysis regarding the machine learning part of this process, where a more complex predictive model, with the ideal parameters, would reduce the MAPE and MSE of our final model, as well as increase its R-squared and R2 Adjusted score. It may be interesting to test this analysis in different cities, where the 15-minute concept is growing, and the real estate values might me shifting, in order to solidify this correlation between accessibility factors and the value of a property. This analysis might be a good tool to help fill the gap of a predictive model that only factors in the physical characteristics of a property. Regarding the limitations previously presented, there is a good opportunity for future works. A comparison between the price per meter of a houses, per parish and the values of the calculated features would confirm if indeed the most expensive areas have better accessibility factors or live closer to the river. To verify that this impact not only occurs in properties in the city of Lisbon, other cities can also be analyzed, like Paris, that follows the 15-minute city concept, or other cities that don’t have their accessibility factors as well developed, and check if the same impact is observed or if it is different, and if it is extremely different, why does it happen. 26 REFERENCES Allam, Z., Moreno, C., Chabaud, D., & Pratlong, F. (2021). Proximity-Based Planning and the "15- Minute City": A Sustainable Model for the City of the Future. Almeida, H. (2019, September 19). Europe's Hottest Property Market Is Getting Too Hot for Some. Retrieved from Bloomberg: https://www.bloomberg.com/news/features/2019-09- 19/portugal-is-europe-s-hottest-property-market-too-hot-for-some Andres Duany, R. S. (2021, February 8). Defining the 15-minute city. Retrieved from CNU : https://www.cnu.org/publicsquare/2021/02/08/defining-15-minute-city Boeing, G. (2022). OSMnx 1.1.2. Retrieved from OSMnx: https://osmnx.readthedocs.io/en/stable/ Borges, I. M. (2021). Tourism and tranformation dynamics in historical neighborhoods: The case of Alfama. Boucher, D. (2020). Local Living, Rise of 20 Minute Cities Post-Covid. Retrieved from The Deck: https://thedeck.org.au/queensland-statewide-all-regions/local-living-rise-of-20-minute- cities-post-covid/ C40 Cities Climate Leadership Group, C. K. (2021, May). Why every city can benefit from a ‘15-minute city’ vision. Retrieved from C40 Knowledge Hub: https://www.c40knowledgehub.org/s/article/Why-every-city-can-benefit-from-a-15-minute- city-vision?language=en_US Costa, M. D. (2018). O Método de Mercado. In O Valor do Imobiliário - Princípios, Fatores e Técnicas de Avaliação Imobiliária. Duany, A.; Steuteville, R. (2021). Defining the 15-minute city. Retrieved from CNU: https://www.cnu.org/publicsquare/2021/02/08/defining-15-minute-city Gouveia, J. P. (2021, June). City Transformation; Alfama - Lisboa (Portugal). Retrieved from Sustainable Historic City Districts. Idealista. (2021, January 21). Property prices in Portugal have soared in the last decade. Retrieved from Idealista News: https://www.idealista.pt/en/news/property-for-sale-in- portugal/2021/01/21/845-property-prices-in-portugal-have-soared-in-the-last-decade Luscher, D. (2021, June 16). Introducing the 15- Minute City Project. Retrieved from :15 City: https://www.15minutecity.com/blog/hello Moreno, C., Allam, Z., Chabaud, D., Gall, C., & Pratlong, F. (2021). Intoducing the "15-Minute City": Sustainability, Resilience and Place Identity in Future Post-Pandemic Cities. Smart Cities. O'Sullivan, F. (2020) Paris Mayor: It's Time for a '15-Minute City'. Retrieved from Bloomberg: https://www.bloomberg.com/news/articles/2020-02-18/paris-mayor-pledges-a-greener-15- minute-city Pisano, C. (2020). Strategies for Post- COVID Cities: An Insight to Paris En Commun and Milano 2020. Sustainability. POR Lisboa 2014-2020. (n.d.). Retrieved from Lisboa Portugal2020: https://lisboa.portugal2020.pt/np4/%7B$clientServletPath%7D/?newsId=253&fileName=ISE _CH_FEDER_PI_9.7_9.8_10.5.pdf Pozoukidou, G., & Chatziyiannaki, Z. (2021). 15‐Minute City: Decomposing the New Urban Planning’s Eutopia. Sustainability, 5 - 6. Smart City Tech. (2022). HOW SMART CITIES COULD HELP US ACHIEVE EQUITY AND ACCESSIBILITY. Retrieved from SmartCity Press: https://smartcity.press/smart-cities-equity-and-accessibility/ Smart City Lisbon. (2018, September 03). Retrieved from Smart City: https://smartcity.brussels/news- 598-smart-city-lisbon 27 Struyk, T. (2021, February). The Factors of a 'Good' Location. Retrieved from Investopedia: https://www.investopedia.com/financial-edge/0410/the-5-factors-of-a-good-location.aspx Taylor, P. (2021, February). Where Did Our Commute Time Go? Retrieved from Paul Taylor: https://paulitaylor.com/2021/02/05/where-did-our-commute-time-go/ The Hindu Business Line (15 September 2016). Retrieved from: https://www.thehindubusinessline.com/economy/smart-cities-could-result-in-social- inequality-say-experts/article9111629.ece TED (Director). (n.d.). The 15-minute city | Carlos Moreno [Motion Picture]. Retrieved from https://www.youtube.com/watch?v=TQ2f4sJVXAI Warren, H.; Almeida, H. (2020). Airbnb Hosts Resist Lisbon’s Plan to Free Up Housing. Retrieved from Bloomberg: https://www.bloomberg.com/graphics/2020-airbnb-short-let-reforms- lisbon/ 28 APPENDIX Name Description Calculation Name Description Calculation Transport Count Number of Public Transportation option in a 15- minute walk radius groupby(['IMOVEL_ID', 'transport_dist']).agg( {'geometry': 'first', 'transport_count' : 'count'}) Commerce Count Number of commercial establishments in a 15-minute walk radius groupby(['IMOVEL_ID', 'comerce_dist']).agg( {'geometry':'first', 'comerce_count':'count'}) Education Count Number of Educational establishments in a 15-minute walk radius groupby(['IMOVEL_ID', 'education_dist']).agg( {'geometry':'first', 'education_count':'count'}) Public Buildings Count Number of Public Transportation option in a 15- minute walk radius groupby(['IMOVEL_ID', 'PubBuilding_dist']).agg( {'geometry':'first', 'PubBuilding_count':'count'}) Emergency Count Number of Emergency establishments in a 15-minute walk radius groupby(['IMOVEL_ID', 'emergency_dist']).agg( {'geometry':'first', 'emergency_count':'count'}) Greenspaces Count Number of Public Transportation option in a 15- minute walk radius groupby(['IMOVEL_ID', 'greenspaces_dist']).agg( {'geometry':'first', 'greenspaces_count':'count'}) Shannon Diversity Index Measures the diversity of amenities in a 15-minute walk radius S – Nr of the amenities pi – Nr of establishments by type of amenity Average Network Distance Average of the time of all the different amenities within a 15- minute walk radius Avg Network Distance = distances.groupby( “index_o”, group_keys=False)['distance'].mean() Transport Distance Euclidean distance to the closest public transportation option ckd_tree= cKDTree(B) dist,idx= ckd_tree.query(A, k = 1) idx = itemgetter( * idx) (B_ix) Government Score Sum of the distances, in minutes, to all governmental buildings in a 15-minute walk radius Score = sum([1/(1+dist) for dist in a['distance']]) Education Distance Euclidean distance to the closest educational establishment Calculated the same way as the Transport Distance. Government Score 2.5 Sum of the distances to governmental buildings, discarding 2.5 minutes Score_2.5 = sum([1/(1+dist+2.5) for dist in a['distance']]) Emergency Distance Euclidean distance to the closest emergency building Calculated the same way as the Transport Distance. Government Score 5 Sum of the distances to governmental buildings, discarding 5 minutes Score_5 = sum([1/(1+dist+5) for dist in a['distance']]) Greenspaces Distance Euclidean distance to the Calculated the same way as the Transport Distance. Government Score 10 Sum of the distances to governmental buildings, Score_10 = sum([1/(1+dist+10) for dist in a['distance']]) 29 Name Description Calculation Name Description Calculation closest green area discarding 10 minutes Commerce Distance Euclidean distance to the closest commercial establishment Calculated the same way as the Transport Distance. Public Transport Score Sum of the distances, in minutes, to all public transportations in a 15-minute walk radius Score = sum([1/(1+dist) for dist in a['distance']]) Public Building Distance Euclidean distance to the closest public Building Calculated the same way as the Transport Distance. Public Transport Score 2.5 Sum of the distances to public transportations, discarding 2.5 minutes Score_2.5 = sum([1/(1+dist+2.5) for dist in a['distance']]) Food Score Sum of the distances, in minutes, to all establishments that sell food in a 15-minute walk Score = sum([1/(1+dist) for dist in a['distance']]) Public Transport Score 5 Sum of the distances, in minutes to public transportations, discarding 5 minutes Score_5 = sum([1/(1+dist+5) for dist in a['distance']]) Food Score 2.5 Sum of the distances to establishments that sell food, discarding 2.5 minutes Score_2.5 = sum([1/(1+dist+2.5) for dist in a['distance']]) Public Transport Score 10 Sum of the distances, in minutes to public transportations, discarding 10 minutes Score_10 = sum([1/(1+dist+10) for dist in a['distance']]) Food Score 5 Sum of the distances to establishments that sell food, discarding 5 minutes Score_5 = sum([1/(1+dist+5) for dist in a['distance']]) Finance Score Sum of the distances, in minutes, to all financial establishments in a 15-minute walk radius Score calculated the same way as the previous amenities Food Score 10 Sum of the distances to establishments that sells food, discarding 10 minutes Score_10 = sum([1/(1+dist+10) for dist in a['distance']]) Finance Score 2.5 Sum of the distances to financial establishments, discarding 2.5 minutes Calculated the same way as the previous amenities for Score 2.5 Leisure Score Sum of the distances, in minutes, to all leisure establishments in a 15-minute walk radius Score calculated the same way as the previous amenities Finance Score 5 Sum of the distances to financial establishments, discarding 5 minutes Calculated the same way as the previous amenities for Score 5 Leisure Score 2.5 Sum of the distances to leisure establishments, discarding 2.5 minutes Calculated the same way as the previous amenities for Score 2.5 Finance Score 10 Sum of the distances to financial establishments, discarding 10 minutes Calculated the same way as the previous amenities for Score 10 30 Annex 1 – Table with all the calculated features, their names, description and formula. Name Description Calculation Name Description Calculation Leisure Score 5 Sum of the Distance to leisure establishments, discarding 5 minutes Calculated the same way as the previous amenities for Score 5 Education Score Sum of the distances, in minutes, to all educational establishments in a 15-minute walk radius Score calculated the same way as the previous amenities Leisure Score 10 Sum of the distance to leisure establishments, discarding 10 minutes Calculated the same way as the previous amenities for Score 10 Education Score 2.5 Sum of the distances to educational establishments, discarding 2.5 minutes Calculated the same way as the previous amenities for Score 2.5 Health Score Sum of the distances, in minutes, to all health establishments in a 15-minute walk radius Score calculated the same way as the previous amenities Education Score 5 Sum of the distances to educational establishments, discarding 5 minutes Calculated the same way as the previous amenities for Score 5 Health Score 2.5 Sum of the distances to health establishments, discarding 2.5 minutes Calculated the same way as the previous amenities for Score 2.5 Education Score 10 Sum of the distances to educational establishments, discarding 10 minutes Calculated the same way as the previous amenities for Score 10 Health Score 5 Sum of the distances to health establishments, discarding 5 minutes Calculated the same way as the previous amenities for Score 5 Entertainment Score 5 Sum of the distances to entertainment establishments, discarding 5 minutes Calculated the same way as the previous amenities for Score 5 Health Score 10 Sum of the distance to health establishments, discarding 10 minutes Calculated the same way as the previous amenities for Score 10 Entertainment Score 10 Sum of the distance to entertainment establishments, discarding 10 minutes Calculated the same way as the previous amenities for Score 10 Entertainment Score Sum of the distances, in minutes, to all entertainment establishments in a 15-minute walk radius Score calculated the same way as the previous amenities Water Distance Euclidean distance to the Tejo River Water Distance = house_node.geometry.distance( river_node.geometry) Entertainment Score 2.5 Sum of the distances to entertainment establishments, discarding 2.5 minutes Calculated the same way as the previous amenities for Score 2.5 31 Annex 2 – Lasso’s selected features. Feature Importance Shannon Diversity Index 1423.94 Government Score 1033.45 Education Score 2.5 886.11 Government Score 2.5 847.97 Finance Score 2.5 526.85 Education Score 10 433.22 Health Score 2.5 418.10 Finance Score 10 331.98 Leisure Score 2.5 231.93 Food Score 207.02 Health Score 10 183.32 Leisure Score 131.63 Government Score 5 114.11 Food Score 2.5 111.49 Health Score 105.49 Leisure Score 10 59.53 Entertainment Score 5 52.59 Public Transport Score 2.5 39.63 32 Annex 3- Radar chart of Avenidas Novas (blue) and Santa Clara (red) variables value. 17