# The Impacts of Open Data and eXplainable AI on Real Estate Price Predictions in Smart Cities
## 2 Materials and Methods
### Data
#### 2.1.1 Study Area  
In aiming to leverage open data for increased and transparent real estate predictions in smart cities, the study area under scrutiny in this research focuses on Lisbon. As Portugal's capital, this city nestles on the north bank of the Tagus River and the Atlantic coastline, making it the westernmost city in continental Europe. From an administrative perspective, Lisbon is subdivided into 24 counties. According to the Portuguese Census of 2021, its resident population was 545,796 (population density 5456.32/km2). The number of conventional dwellings was 319,640, and the number of households was 242,065 ([[https://censos.ine.pt/](https://censos.ine.pt/)]([https://censos.ine.pt/](https://censos.ine.pt/))) (accessed on 11 January 2024), with an average annual growth of the House Price Index from 2011 to 2021 by about 5.25% ([[https://bpstat.bportugal.pt/](https://bpstat.bportugal.pt/)]([https://bpstat.bportugal.pt/](https://bpstat.bportugal.pt/))) (accessed on 11 January 2024). Lisbon's housing market has significantly changed over the past decade, becoming increasingly attractive to tourists and investors. These changes have resulted in a significant increase in foreign direct investment in real estate and construction. Furthermore, the government bore the expenses for redevelopment, allowing private capital to profit from property rehabilitation. Consequently, this trend has led to widespread housing and commercial gentrification and the rise of tourism-centric urban areas, consistent with broader patterns observed across Southern Europe [23; 50]. A study by [PERSON] et al. [51] revealed that housing affordability in Lisbon has decreased in the past years, particularly affecting the middle classes and younger generations. This fact is due to local incomes not keeping pace with the escalating market prices, making housing needs persistent. A surge in international investments, especially in upscale properties and tourist accommodations, has driven up house prices, with inner-city areas of Lisbon being the most affected. Notably, in 2019, the average duration properties stayed on the market (both for rent and sale) decreased to record low levels, indicating high demand and limited supply. Traditionally, homeownership has been viewed as a wealth accumulation strategy [52]. However, in Lisbon, where the homeownership rate stands at 52%, owning a home has become less feasible for many, given the relatively modest local salaries. In response to the housing challenges, the government has introduced housing policies focused on strengthening the public housing supply in the city. These initiatives prioritize the rehabilitation of public buildings, especially those most deteriorated. Also, efforts are being made to improve public services and transportation connections outside Lisbon's central regions, making these peripheral areas more attractive to residents and ensuring they offer a comparable quality of life [53]. The spatial distribution of our dataset for the housing transactions in Lisbon from 2018 to 2021 in Figure 1 presents a distinct pattern that underscores the city's real estate dynamics and infrastructure influence. A pronounced concentration of the most expensive transactions is evident within the city center. This area of high-value real estate transactions aligns predominantly along a north/south axis. This axis mirrors the trajectory of the principal subway line, suggesting a strong correlation between transit accessibility and property values. Such a pattern underlines the importance of efficient public transportation and its role in shaping real estate prices. The subway, serving as a primary urban artery, not only facilitates mobility but also accentuates the desirability of properties in its proximity, leading to a premium on centrality. As we move away from this central axis, there is a discernible decrease in transaction values. From the city center outward, this gradient is a classic representation of urban real estate dynamics where centrality often commands a premium.