# The Impacts of Open Data and eXplainable AI on Real Estate Price Predictions in Smart Cities
## 2 Materials and Methods
### Data
#### 2.1.2 Data Sources and Datasets  
The data used in this study come from housing transactions in Lisbon that took place between 2018Q1 and 2021Q4. The original dataset under scrutiny captured 23,781 real estate transactions within Lisbon. This raw data are proprietary and were provided by Confidencial Imobilario ([[https://www.confidencialimobilario.com/](https://www.confidencialimobilario.com/)]([https://www.confidencialimobilario.com/](https://www.confidencialimobilario.com/)) (accessed on 11 January 2024)), an independent databank, and encompass a listing collection with the properties' intrinsic attributes, such as technical specifications, amenities, and location, and the extrinsic details related to the transactions. Technical specifications include variables such as the private gross area in square meters, the energy performance certificate, and property quality status. House amenities include the number of bedrooms and whether the dwelling has a garage, pool, terrace, or patio. Concerning the location, we have information about the geographical coordinates, the postal code, and the county denomination. Transaction specifications include the selling price in Euros, the initial asking price, the transaction date, and the market placement date. Predictive modeling aims to harness data that contribute to a robust understanding of trends and allow for precise predictions. The enrichment process is a common practice in data science to add value to existing data and to provide deeper insights by linking related information from different domains. In our study, this enrichment process combines proprietary real estate data with external open datasets for a more comprehensive analysis. Therefore, integrating contextual open data may significantly enhance the performance of machine learning models. This enrichment is essential for optimizing predictive modeling, leading to more effective solutions for smart cities [12; 15; 16; 54]. Therefore, to improve our machine learning model performance and accuracy, we assembled several public datasets from various open data platforms covering the same period, which we used as comprehensively as possible to investigate and derive valuable insights into Lisbon's real estate dynamics during these years, understand the factors influencing property prices, and predict future trends in this ever-evolving market. Figure 1: Spatial distribution of real estate transactions by price in Lisbon (2018–2021): This map visualizes property sales in Lisbon, differentiated by price ranges depicted in various colors, providing a clear indication of pricing hotspots and the economic landscape of Lisbon’s real estate market over four years. Key counties such as Parque das Nações and Bélem are marked alongside city and county boundaries for contextual reference. The open data gathered covers a wide range of specific urban indicators, from mobility (bus stops and proximity to subway and train stations) [44; 55; 56], quality of life and well-being (culture, commerce, education, health, leisure, and environment) [35; 57; 58; 59; 60; 61], and governance (housing licensing, safety, and security) [21; 62; 63] to broader macroeconomic and financial indicators (inflation rate, unemployment, gross domestic product, and bank appraisals) [24; 33; 64; 65]. These indicators play a crucial role in influencing the functionality and growth of a smart city and are instrumental in cities' assessment and evaluation. They offer valuable insights into urban development, economic performance, financial stability, and overall competitiveness [20; 66; 67]. Table 1 describes the primary data sources, including proprietary and open datasets, which we merge and append into one large dataset comprising 25 predictor variables to estimate real estate prices. By leveraging eXplainable AI (XAI) techniques to analyze the outputs of an XGBoost model with this enriched dataset, we aim to provide an in-depth and transparent perspective on the trends, patterns, and nuances of the housing market in Lisbon.