scieee AI-readable full text Open interactive document viewer

Identification of residential building typologies by applying clustering techniques to cadastral data

Martínez Rocamora, Alejandro; Díaz Cuevas, María del Pilar; Camarillo Naranjo, Juan Mariano; Gálvez Ruiz, David; González-Vallejo, Patricia

Abstract

Building typologies are usually classified according to their shape, distribution and construction features depending on the time period they were built. As a result, a subjective classification arises which highly depends on the criteria used to differentiate buildings. When this analysis is carried out at the urban scale, data sets become bigger, making patterns difficult to uncover. Mistakes in deciding the variables to classify buildings lead to incorrect typologies and, consequently, wrong results. The aim of this study is to test a new methodology based on clustering techniques to identify typologies related to energy retrofitting, which would allow obtaining a more objective classification and better pattern recognition by reducing human intervention. To that end, a data set from the Spanish cadastre is used, with additional information to reflect the influence of existing standards on constructive solutions. By applying three clustering techniques (Ward's method, Partitioning Around Medoids, and a combination of both), new proposals of building typologies are obtained and discussed in comparison to traditional classifications. The results show that the Ward's method produces building typologies with significantly high quality metrics and meaningfulness. The agglomeration coefficient is 99.8%, which indicates that hardly another hierarchical method could generate a better clusters structure. Six clusters comprise 86% of the dwellings as most occupants do not declare retrofitting works, thus not being reflected in the cadastre database. This research provides a new classification method that can notably influence the estimation of costs, environmental impact and cost effectiveness of energy retrofitting actions at urban scale.

Full text

Journal of Building Engineering 86 (2024) 108912 Available online 23 February 2024 2352-7102/© 2024 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Identification of residential building typologies by applying clustering techniques to cadastral data Alejandro Martínez-Rocamora a , * , Pilar Díaz-Cuevas b , Juan Camarillo-Naranjo b , David G´ alvez-Ruiz c , Patricia Gonz´ alez-Vallejo d a ArDiTec Research Group. Departamento de Construcciones Arquitect´ onicas II, Universidad de Sevilla, Av. Reina Mercedes, 4-a, Sevilla, Spain b Departamento de Geografía Física y An´ alisis Geogr´ afico Regional, Universidad de Sevilla, Do˜ na María de Padilla, S/n, Sevilla, Spain c Departamento de Estadística e Investigaci´ on Operativa, Universidad de Sevilla, Tarfia, S/n, Sevilla, Spain d ArDiTec Research Group. Departamento de Ingeniería Gr´ afica, Universidad de Sevilla, Av. Reina Mercedes, 4-a, Sevilla, Spain ARTICLE INFO Keywords: Building typologies Clustering Cadastre Benchmarking Energy retrofitting Urban-scale analysis ABSTRACT Building typologies are usually classified according to their shape, distribution and construction features depending on the time period they were built. As a result, a subjective classification arises which highly depends on the criteria used to differentiate buildings. When this analysis is carried out at the urban scale, data sets become bigger, making patterns difficult to uncover. Mistakes in deciding the variables to classify buildings lead to incorrect typologies and, consequently, wrong results. The aim of this study is to test a new methodology based on clustering techniques to identify typologies related to energy retrofitting, which would allow obtaining a more objective classification and better pattern recognition by reducing human intervention. To that end, a data set from the Spanish cadastre is used, with additional information to reflect the influence of existing standards on constructive solutions. By applying three clustering techniques (Ward’s method, Partitioning Around Medoids, and a combination of both), new proposals of building typologies are obtained and discussed in comparison to traditional classifications. The results show that the Ward’s method produces building typologies with significantly high quality metrics and meaningfulness. The agglomeration coefficient is 99.8%, which indicates that hardly another hierarchical method could generate a better clusters structure. Six clusters comprise 86% of the dwellings as most occupants do not declare retrofitting works, thus not being reflected in the cadastre database. This research provides a new classification method that can notably influence the estimation of costs, environmental impact and cost effectiveness of energy retrofitting actions at urban scale. 1. Introduction The identification of building typologies becomes crucial for the application of cost and environmental impact estimation models, whether at urban scale or for a considerable amount of case studies that are geographically dispersed. In both situations, information about the dwellings must be obtained to classify them into typologies according to their characteristics [1]. Subsequently, this assignment of typologies allows generalizing bills of quantities to the set of buildings belonging to a same typology. Finally, through the bill of quantities, it is possible to apply economic and environmental impact models [2]. For this reason, the correct selection of * Corresponding author. E-mail address: [email protected] (A. Martínez-Rocamora). Contents lists available at ScienceDirect Journal of Building Engineering journal homepage: www.elsevier.com/locate/jobe https://doi.org/10.1016/j.jobe.2024.108912 Received 30 October 2023; Received in revised form 9 February 2024; Accepted 22 February 2024 Journal of Building Engineering 86 (2024) 108912 2 quantities to apply and, therefore, the assigned typology, is paramount to obtain estimates closer to reality for the different buildings. The classification of buildings into typologies has traditionally been carried out based on their formal and constructive characteristics, that is, by number of floors, floor area, and constructive solutions used to solve their foundations, structure or enclosure elements [3]. These classifications entail a manual analysis of the available data, and are usually decided subjectively based on the parameters of interest for the objective of the study [4], so the typologies obtained highly depend on decision-making and the criteria followed by the professional or organization that makes them. Depending on the number of available features in the dataset, a manual selection of key features for organizing data into clusters can become unfathomable. Moreover, this process can lead to a series of mistakes, such as using wrong or ineffective variables to classify data, thereby producing confusing typologies. Contrary to this approach, the use of machine learning techniques to analyse a data set of buildings in order to establish typologies according to similarities in their features’ values could be an alternative to traditional methods that allows getting a more objective classification by removing the influence of humans. This kind of result can be obtained by using clustering algorithms, which is an unsupervised learning technique that tries to find groups of similar characteristics in a data set. Among the advantages that clustering techniques can provide compared to traditional methods are the following [5–7]. - Uncover hidden patterns that may not be apparent from inspecting raw data. - Gain better understanding on the relationships between data points. - Identify outliers and anomalies. Table 1 Summary of key aspects of the studies included in the literature review. Reference Aim Approach/Method Variables Results/Findings Ali et al. [13] Optimize urban scale energy retrofit decisions using datadriven approaches Data collection Statistical analysis Data pre-procesing Outlier detection Feature selection Building statistics Geometric data Non-geometric data Energy performance Retrofitting costs Reports from experts Retrofit solutions and optimal features for residential buildings in Dublin (Ireland) Dascalaki et al. [14] Massive assessment of energy conservation measures Manual Construction period Type of building Climate zone Energy-related features 24 energy-related building typologies Ghanbari et al. [15] Identify architectural patterns Clustering/Cosine similarity formula Dimensions Size of plans Two main typologies in Talesh (Iran) Jim´ enez-Pulido et al. [16] Classify façade typologies Manual Resistant layer Air chamber Thermal insulation Finishing 47 façade systems characterized to help future interventions Mata et al. [17] Detect building typologies in four European countries Manual Type of building Year of construction Heating system Climatic zone Assign energy efficiency information and generalize to buildings of the same typology Muringathuparambil et al. [4] Define typologies of low-cost buildings to detect energy efficiency patterns Manual Building size Age Constructive solutions Building layout Energy system Electricity cost HVAC system Heating/cooling cost 8 typologies in Cape Town Pistore et al. [18] Identify significant retrofit areas and priorities of intervention Wrapper Feature Selection Random Forest Hierarchical clustering K-medoids clustering Configuration features (constructive solutions of thermal envelope and HVAC systems) Configuration features (exposed envelope surface, volume, number of floors, floor height) Two clusters (+1 with outliers) from configuration features Two clusters (+1 with outliers) from intervention features Rodrigues et al. [19] Classify floor plan design proposals Clustering/Ward’s method - Euclidean distance Point distance Turning function Grid-based Tangent distance 9 clusters with tangent distance being the best descriptor Shan et al. [20] Classify buildings and identify defining variables for energy efficiency K-means clustering and Random Forest Energy consumption Orientation Height to width rate of façades Perimeter to surface rate of building Exposed surface to building volume rate Three energy-related building typologies in Wuhan (China), each with a set of key geometric variables Wu et al. [21] Identify neighbourhood typologies K-means clustering Local Climate Zone Urban descriptors Four main typologies for planning climate adaptation interventions A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 3 - Increase the efficiency of the analysis by making it easier to make sense of large and complex data sets. - Reduce dimensionality and complexity. - Enable better decision-making and problem-solving. Clustering algorithms have already been used on other occasions in the building engineering research field, although for other purposes, as in the case of Naganathan et al. [8], who applied them as a pre-processing step prior to supervised learning to assign percentages of energy loss reduction, thus forming a semi-supervised energy model. Similarly, Bienvenido-Huertas et al. [9] used the k-means algorithm to obtain a climatic classification of new and restored buildings in Andalusia, which offered energy demands in winter and summer for the different clusters that were better differentiated than those of the climatic zones according to the Spanish Technical Building Code. However, there are scarce examples of the application of clustering algorithms to classify building typologies, as it will be shown in the state-of-the-art. The application of estimation models at urban or higher scale is considered a possible approach to tackle a problem recently highlighted by various authors: it is necessary to establish reference values or benchmarks with which each impact study can compare its results to correctly evaluate the analysed building or project [10]. This requires two conditions to be met: all the studies should use the same calculation methodology, and a large set of case studies should exist in which the same methodology has been applied, thus allowing to obtain benchmarks of results classified by typology [11]. Moreover, benchmarks would support policies with sustainability requirements for new buildings [12]. This study presents an applied methodology to carry out the first step of this solution, that is, the identification and assignment of building typologies to a considerable set of cases (i.e. buildings). It is important to clarify that the identified typologies must include buildings with a similar behaviour with respect to energy efficiency and energy retrofitting needs, as the final aim of this identification is to be able to explore and compare different retrofitting options and their consequences in terms of life cycle economic cost and environmental impact for a set of buildings of a specific typology. As the main novelty, this study is intended to use objective methods for such classification through the application of machine learning models for clustering. To demonstrate the functionality of this methodology, these algorithms are applied to a data set of real estate for residential use prepared for a municipality in Andalusia, which contains data obtained directly from the General Directorate of Cadastre (GDC), other indicators of interest prepared from this data, and several variables that characterize constructive solutions for various elements of the buildings’ thermal envelope and installations. In the next section, a state-of-the-art is presented, including recent studies related to the classification of building typologies through different methods. In Section 3, the materials and methods used in this study are thoroughly described. The results are presented and analysed in Section 4. In Section 5, a discussion in comparison to the methodologies applied in similar studies is carried out, to finally draw conclusions in Section 6. 2. State-of-the-art The classification of building typologies is traditionally organized according to the objectives of the study. In this section, previous studies on this research field are reviewed to identify the key aspects of the methods employed to classify buildings and their main results, which are summarized in Table 1 to illustrate the differences with respect to the present study. Mata et al. [17] performed a segmentation process of the built stock in four European countries based on the type of building, year of construction, main heating system, and climatic zone. This allowed them to deduce and assign to the different archetypes characteristic values for the thermal envelope, internal loads, and other data of interest from the energy point of view, to finally be able to generalize the results to the rest of the buildings. Jim´ enez-Pulido et al. [16] proposed a classification system for typologies of façades in Spain by connecting information from the Technical Building Code, the Constructive Elements Catalogue, and other databases such as the Institute of Construction Technology of Catalonia (ITeC) and the CE3X software for energy efficiency certification [22]. In total, they identified and characterised 47 different façade typologies in their country, with a comprehensive description of each one that would allow a more efficient management of future interventions in existing buildings. Muringathuparambil et al. [4] developed building typologies of low-cost buildings to detect energy efficiency patterns, obtaining eight representative types to classify buildings in Cape Town. These typologies were established according to design parameters, and energy efficiency related features were described in a subsequent step to be able to simulate them with DesignBuilder. Therefore, these features did not influence the initial establishment of building typologies. On an opposite approach, Dascalaki et al. [14] added energy-related characteristics from the TABULA project [23–25] to available data on the Hellenic building stock to find energy-related building typologies that would allow a massive assessment of energy conservation measures. Three specific construction periods influenced the characterization of these typologies: pre-1980, where buildings did not have thermal insulation; 1981–2000, being partially or insufficiently insulated; and buildings constructed after 2000, with proper envelope thermal insulation. This derived into 24 building types, combining these three construction periods, two types of buildings (single family and multifamily) and four climate zones. Other interesting studies based their approaches on the analysis of floor plans to detect building typologies. Ghanbari et al. [15] identified architectural patterns in a sample of 150 rural houses in Talesh (Iran) based on the similarity of dimensions and size of plans. To that end, they applied a conversion method of floor plans into two-dimensional vectors, obtaining data sets that were subsequently analysed by searching for similarities in the distribution of spaces. From this study they concluded that two main typologies could describe the architectural patterns in this area: single-story houses and Telar houses, that is, houses with a covered porch on their first floor. Rodrigues et al. [19] used clustering techniques to help designers analyse and classify a total of 72 floor plan design proposals whose geometry was described using four different shape representation methods: point distance, turning function, grid-based, and A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 4 tangent distance. Concretely, they applied the Ward’s method [26] and the Euclidean distance as dissimilarity measure, which classified observations into 9 different clusters. Finally, they concluded that the tangent distance descriptor better captured floor plan shapes and generated fewer outliers in the identified clusters, while each representation had its advantages and disadvantages. Closer to the developments of the present study, several authors have presented approaches where machine learning techniques are applied to analyse a considerable amount of data for typology detection purposes. For instance, Ali et al. [13] presented a classification of buildings by archetypes or typologies based on their constructive characteristics through a complex flow of data processing, including collection steps, statistical analysis, pre-processing, outlier detection, and selection of variables, among others. Thus, they realized that it is of vital importance that the data set contains only information highly related to the objective of the identification of typologies, eliminating irrelevant or redundant data in this process of data set depuration. Shan et al. [20] obtained three clusters to classify buildings from Wuhan, China, according to their energy consumption, to subsequently carry out an internal analysis using Random Forest to identify the most defining variables. The orientation and the rate between the building’s height and its width for the various orientations were identified as the most important variables for low and medium energy consumption buildings, while only orientation and that rate for the south orientation resulted paramount for high energy consumption buildings. Wu et al. [21] employed k-means clustering analysis to the Local Climate Zone framework applied to Amsterdam, London and Paris, whose data set was enriched with other urban descriptors, to identify four main neighbourhood typologies that could be used for planning climate adaptation interventions. Finally, Pistore et al. [18] combined Wrapper Feature Selection, Random Forests, and hierarchical and k-medoids clustering to identify the most significant retrofit areas and priorities of intervention in educational buildings in the Province of Treviso, Italy. Specifically, they used hierarchical clustering to obtain the optimal number of clusters in the data set and to identify outliers to be discarded. Then, they fed the k-medoids clustering with the selected medoids of the clusters from the previous step. From this process, they obtained two clusters when considering configuration features, and another two with intervention features, and one extra cluster of outliers in each case. Finally, these were combined into four clusters to prioritize the interventions in their various constructive elements. 3. Materials and methods 3.1. Description of the case study The selected case study is the municipality of Osuna (Spain). Located in the east sector of Seville’s province (37◦14 N, 5◦06 ′ W, 322 m. a.s.l.), 87 km from the provincial capital, Seville, 90 km from Cordoba and 130 km from Malaga, the municipality of Osuna corresponds to an average Andalusian city, a historical village originally founded by the Roman empire in 44–43 b. C. The Muslims called it Oxona, which derived into Osuna after the conquest by Fernando III of Castilla. During the 13th century, it became a strategic point Fig. 1. Evolution of the built-up area of Osuna (1956–2020). A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 5 in the defence of the frontier with the Nasrid kingdom of Granada. Its population has remained stable since the middle of the 19th century with around 17,000 inhabitants, except in the period from the 1940s to the 1970s, when it increased to 23,000 inhabitants. The municipality is composed of two population centres, Osuna and Puerto de la Encina, the latter being less populated (218 inhabitants). The evolution of the built-up area has been calculated by photo-interpreting and digitising it from the aerial orthophotographs of 1956, 1977 and 2020. Fig. 1 shows the location of the municipality of Osuna, as well as the evolution of the built-up area, which has increased by 2.5 km 2 , with 1.6 km 2 in 1956, 2.14 km 2 in 1977 and, finally, 4.1 km 2 in 2020 (latest aerial orthophotography available at the time this work was carried out). 3.2. Spanish cadastre database structure The General Directorate of Cadastre in Spain organizes its information through several structured text file formats. Concretely, a user can download SHP (Shapefile) and CAT (for Catastro, Cadastre in Spanish) files for a municipality that contain, respectively, graphical and non-graphical information [27]. The latter comprises surfaces, use, year of construction, among others. These two formats are linked through primary keys that allow representing non-graphical information in a map at parcel level, and their structure is described in separate manuals that establish every information field and their corresponding length [28,29]. This information can be downloaded through the official website of the GDC and is permanently updated, which makes the use of this source of information relatively frequent for different scientific research related to the subject of this work [30,31]. The data of a municipality is divided into several types of registers containing the values for a series of features corresponding to parcels, constructive units, constructions, real estate, distributions of common elements, and cropland. The proposed approach consists of identifying residential building typologies through the real estate they contain. Thus, only records for parcels, constructions and real estate need to be considered in this study. Constructive units are excluded because they do not provide useful information for this purpose. As shown in Fig. 2, in a parcel there can be one or more buildings, each one of them comprising one or more real estate. Additionally, a real estate can be made up of one or more constructions. For example, on many occasions there is a construction for each floor of a single-family house, as can be seen in the 2-story building of street A in Fig. 2. Parcels are the minimum graphic unit to represent data on the map, since buildings are not identified in the GDC database. For this reason, the organization of real estate by buildings within the same parcel is proposed as an intermediate objective of this study. To that end, it will be necessary to work with the fields that define the address: type of street, street name, first number, first letter, second number, second letter, kilometre, block, stair, floor and door. The floor and door fields are specific for real estate as they identify, for instance, an apartment in a building, such as those in the 4-story buildings in both streets of Fig. 2. Therefore, a building address goes all the way to the stair field, with the stair and block fields being often used interchangeably for the same purpose. 3.3. Clustering algorithms: parameters and basic concepts Clustering algorithms are unsupervised learning techniques that consist of studying unlabelled data sets and trying to detect groups of similar observations according to the values of some of their features, organizing data in a way that similarities within a cluster are Fig. 2. Example of hierarchical organization of Cadastre entities for three buildings in a same parcel. A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 6 maximized while differences between clusters are minimized [32]. The main clustering algorithm categories include partition-based algorithms (k-means or PAM), hierarchical algorithms (agglomerative and divisive clustering using minimum, maximum, average, centroid or Ward linkage strategies), and density-based algorithms (topological-density based like DBSCAN or probability-density based EM-GMM). Each have their own strengths based on the aim of the research and the nature of the variables used [33], but clustering algorithms provide advantages for analysing unlabelled data through discovering hidden patterns [5], reducing dimensionality [6], identifying outliers [7], and not requiring predefined labels compared to supervised classification methods [33], which help reveal inherent structures within complex datasets. 3.3.1. Data matrix and clustering The process begins with an n×m matrix (where n is the number of observations and m is the number of variables) or n×n matrix whose elements represent the distances or similarities between the n observations. Therefore, each observation is represented by an m-dimensional vector with the values of that observation in the different variables. Let Ξ be the set of n observations, (x1,...,xn), where xj= (xj1,...,xjm),j=1,...,n. The objective is to find a partition of the Ξ into “c" regions or clusters: C1, …, Cc, such that: ⋃ c i=1 Ci=Ξ Ci∩Cl=∅i∕= l In matrix form, what is obtained is a matrix that provides the values of the variables for each observation: X= x11 ⋯x1i⋯x1m ⋮ ⋱ ⋮ ⋯ ⋮ xj1⋯xji ⋯xjm ⋮ ⋯ ⋮ ⋱ ⋮ xn1⋯xni ⋯xnm The j-th row of the matrix X contains the values of each variable for the j-th observation, while the i-th column shows the values belonging to the i-th variable across all observations in the data set. From this matrix, it is necessary to establish the choice of the measure of association to be used to determine the similarity of the observations. This measure is defined as a distance between the elements of the data matrix. 3.3.2. Distance matrix Given the existence of both qualitative and quantitative variables in our data set, it is necessary to apply the clustering methods on a pre-calculated distance matrix, instead of applying it directly to the original data set. To that end, the Gower’s distance matrix is used, which accepts both types of variables for each observation. This disqualifies some of the abovementioned methods, as they do not accept a distance matrix as input. The generalized definition of distance between two observations (real estates) in feature space i and j given by Gower [34] results in the dissimilarity defined as: dij =∑ m l=1 δ(l) ij d(l) ij ∑ m l=1 δ(l) ij ∈ [0,1] where, if xil and xjl are values for observations i and j on variable (l): d(l) ij =contribution of variable (l)to dij, which depends on its type: •if (l)is binary or nominal: d(l) ij =0 if xil =xjl, and d(l) ij =1 otherwise •if (l)is a scaled interval variable (continuous or cardinal discrete): d(l) ij =|xil−xjl| max hxhl−min hxhl. •if (l)is ordinal or proportional scale: for each observation i in each variable l the ranks ril are calculated, and from them, zil =ril−1 max hrhl−1 is treated as a scaled interval variable (continuous or cardinal discrete). δ(l) ij =weight of each variable (l): •δ(l) ij =0 if values of observations i and/or j for variable (l)are missing values, values of observations i and j for variable (l)are zero and variable (l)is an asymmetric binary variable. •δ(l) ij =1 otherwise. Once the dissimilarity metrics have been defined, it is necessary to choose the clustering technique to be used. As previously introduced, the need to use the distance matrix as input data in cluster techniques is a restrictive factor when identifying applicable clustering methods. Although distance matrices can be considered data matrices whose variables are now the distances of each A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 7 observation to the rest, this dramatically hinders interpretability in some techniques, such as those based on probabilistic density, like Expectation-Maximization clustering using Gaussian Mixture Models (EM-GMM). On the other hand, other density-based methods, such as Density-Based Spatial Clustering of Applications with Noise (DBSCAN) [35] or MeanShift, require the assignment of topological parameter values that assume a uniform density of observations throughout the data set, which is not desirable in this analysis. However, hierarchical methods, by dealing with distances between individuals in each iteration, and the Partitioning Around Medoids (PAM) method [33], become good candidates as they work directly through distances provided in the Gower distance matrix. Therefore, three clustering techniques are selected for this study: the Ward’s method [26] or minimum variance as hierarchical clustering to generate compact clusters, the PAM density-based method, and a combination of these two where PAM is fed with the number of clusters and the medoids detected by the Ward’s method (hereafter PAM-Ward). These last two methods do not generate a hierarchical structure (dendrogram) that allows studying how the union of elements evolves regarding their likeness. 3.3.3. Ward’s clustering method The Ward’s method [26] or minimum variance is a hierarchical clustering technique. The goal of these methods is to merge or split clusters based on a distance or similarity measure. There are two types of hierarchical methods: agglomerative and divisive. Agglomerative methods begin with as many clusters as data points and merge them until there is only one cluster left. Divisive methods start with one cluster that contains all the data and split it until there is one cluster per data point. Divisive methods are harder but faster if the number of clusters is known beforehand, which is not our case. All clustering methods use a distance or similarity matrix to decide how to form the clusters (Gower distance matrix in our case). Ward’s criterion measures the information loss from clustering by the sum of squared deviations of each point from the cluster mean, or centroid. The optimal clustering minimizes this sum. The agglomerative version of Ward’s method follows this rule: at each step, merge the two clusters that have the smallest increase in the sum of squared deviations from their new centroid. All hierarchical methods can be expressed through a single recurrent formula (Lance–Williams formula) of four parameters, such that, for the different values of these, the different distances between clusters at each stage are generated [36]. According to this formula, if two clusters C1,and C2 join in a new cluster (C1∪C2),the dissimilarity between their union and a new cluster C3,is given by: d((C1∪C2),C3) = α 1∗d(C1,C3) + α 2∗d(C2,C3) + β∗d(C1,C2) + γ∗ |d(C1,C3) − d(C2,C3)| Ward method uses the formula with α i=ni+n3 n1+n2+n3 ;β=−n3 n1+n2+n3 ;γ=0 Where n1,n2,n3 are the number of elements in C1,C2,C3. 3.3.4. PAM clustering method PAM (Partitioning Around Medoids) is a specific partitioning clustering algorithm similar to K-Means. While K-means considers centroids (the mean position of all the points in a cluster, calculated as the component-wise average that may not necessarily correspond to any real data point) to determine the recurring partitions, PAM tries to find representative objects in each cluster, called medoids, that best characterize the cluster. These medoids are actual data points of clusters that have the least average dissimilarity to all the other data points in the cluster. Unlike centroids, medoids must be existing data objects rather than an average point. The PAM clustering method is developed in Ref. [31] and follows the following sequence. 1. It starts with an initial set of medoids, either selected randomly or through a heuristic method. Each data point is assigned to the cluster whose medoid is closest to that point. 2. Next it determines if swapping any currently assigned medoid with a non-medoid data point would reduce the total distance between points and medoids. This is the cost function. 3. It iteratively swaps medoids to try and minimize this cost function until there is no cost decrease from further swaps. This produces a locally optimal configuration of medoids and clusters. PAM is well-suited for cases in which intuitive interpretations are needed since medoids are real examples from the data. It also is more robust to outliers as medoids are real data points not affected by outliers as centroids. 3.3.5. Clustering evaluation The results from these clustering methods are evaluated through the most commonly used grouping quality metric, the Silhouette coefficient [37]. Moreover, this metric is also appropriate in order to identify critical observations in each generated cluster as the Silhouette coefficient can be calculated individually. In cluster analysis, the Silhouette coefficient measures the similarity of an observation to its assigned cluster compared to its similarity to the neighbouring clusters. Its value ranges from −1 to 1, where a value closer to 1 indicates that the observation is appropriately assigned to its cluster, and a value closer to −1 indicates that the observation is more similar to the neighbouring cluster than to its assigned cluster or can be considered an outlier [7]. In other words, the observation might be an outlier or an anomaly, and it does not fit well with the other observations in its assigned cluster, being adequate to be considered as a possible error. From the maximization of the average of these coefficients, the optimum number of clusters is obtained. In the case of the hierarchical clustering, its quality can also be measured with the agglomeration index or cophenetic correlation (AC), which describes how the dendrogram generated by the hierarchical cluster captures the information of A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 8 the original data set. 3.4. Research methodology To achieve the main aim of this research, a sequential data processing method is followed as described in Fig. 3. This methodology can be divided into three main stages: data preprocessing, input feature selection, and implementation and performance evaluation. These last two actions are carried out in two steps, as the evaluation of results from the first execution allows obtaining feedback to improve the data set and, consequently, the results obtained. 3.4.1. Data preprocessing In this stage, batch data for the municipality of Osuna, available for the year 2022, is first downloaded from the GDC website [27] in a CAT file. Based on the specification of the CAT format [28], a relational data model is designed and implemented in PostgreSQL/PostGIS object-relational database system by programming an SQL query algorithm that performs a structured reading (namely parsing) of the CAT file and dumps all the data of the different types of records to a PostgreSQL/PostGIS database. This spatial database management system optimises the query, exploitation, and update possibilities, as well as the different exploitation procedures of the spatial database created. Within this system, a new package of SQL queries is developed that allows the creation of a real estate table with the original data of interest for the detection of typologies, as well as additional indicators obtained from the existing data. The parameters obtained for real estate, either directly or by calculation, are specified in Table 2 accompanied by a brief explanation of their meaning and the method for obtaining them. With respect to the last set of variables in Table 2, the constructive solutions for those elements are identified by alphanumeric codes that represent the specific element, the type of dwelling, the construction period and, finally, the renovation period in case the element has undergone a renovation. The construction and renovation periods defined are based on the evolution of energy efficiency regulations for buildings in Spain, which determine significant milestones such as the requirement of thermal insulation in the building’s envelope, improvements in the performance of windows through the use of double glazing or thermal-bridge break technologies, as well as the integration of renewable energy sources and enhancements in Heating, Ventilation and Air Conditioning (HVAC) and Domestic Hot Water (DHW) systems. More specifically, the MV regulations of 1957 [38] did not consider the thermal performance of buildings. Thermal insulation became mandatory with the NBE-CT79 regulation on thermal conditions in buildings [39]. In 2006, the Technical Building Code (CTE by its Spanish acronym) was approved [40], including a specific document on Energy Savings in Buildings (DB-HE), which had subsequent updates in 2013 and 2019. All this information is captured in the TABULA project [23,24], thus establishing the following construction and renovation periods: before 1936, 1937–1959, 1960–1979, 1980–2006, 2007–2013, 2014–2019, and after 2020. After building this table, a post-processing stage begins aimed at removing wrong registers and to correct failures in the organization algorithm. In this stage, the constructions with an “OD” value (part of ‘tODos’, ‘all’ in Spanish, meaning that all the constructions belong to the same owner, which is usual in cadastral records of old dwellings) in the floor field (96 in total for this municipality), real estates with an empty street_name field, which impedes their organization by building through their address (377), a series of wrong real estate registers that caused interferences in the calculations (20–25), and real estates without any ‘dwelling’ use, are removed. Finally, it is necessary to apply some corrections to real estates taken by the algorithm as belonging to multi-family buildings while they are actually single-family terraced houses within a same parcel, only differentiated by their door field instead of stair. In total, 7150 registers of residential real estates are preserved as the data set to which the clustering algorithms are to be applied. Once these errors are corrected, the resulting table is exported as the definitive data set. All subsequent statistical and cluster related analysis is conducted using R [41], and RStudio [42]. Fig. 3. Data processing flowchart. A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 9 3.4.2. Input feature selection Prior to applying clustering techniques, it is essential to prepare the data set adequately. One of the fundamental prerequisites for these algorithms is that all features must have a valid value, and no observation should contain any missing values. Furthermore, the clustering process requires a uniform structure of both qualitative and quantitative variables to avoid any potential errors that may arise by mixing variables of different nature. In this process, variables and indicators that should not participate in the clustering process are removed. Concretely, from those specified in Table 2, cad_ref is only used as unique primary key for each real estate, and those in grey are removed whether because they are intermediate variables to obtain others or because they are not of interest for the identification of residential building typologies for this study’s aim. In the case under study, municipality and pop_municipality are removed as they present the same value for all the observations. However, if this methodology was applied to a data set from various municipalities, pop_municipality should be preserved. Subsequently, all the empty values in the reform_type field are replaced by a new category named ‘NoRef’ indicating that no reform has been carried out in that real estate. The other main modification consists of creating a new variable named YWOR (years without reform) replacing yr_last_reform. Thus, YWOR represents the number of years passed since the last reform, thereby improving the harmonization of its values as a great number of similar values when there has not been any reform could be interpreted as a category within a quantitative variable. Table 2 Variables and indicators for real estates and their definitions. Variable/Indicator Definition cad_ref Cadastral reference of the real estate. RS_cod Code of the real estate within its parcel. cad_par Code of the cadastral parcel. parcel_surf Surface of the parcel. parcel_building Number of its building within the parcel, obtained by numbering the different addresses within a same cad_ref. total_parcel_build Total number of building in the parcel, obtained as the maximum of parcel_building with a same cad_par. coord_X Coordinate X of the parcel. coord_Y Coordinate Y of the parcel. municipality Municipality to which the parcel belongs. pop_municipality Number of inhabitants of the municipality. st_type, st_name, number, letter, sec_number, sec_letter, km, block, stair, floor, door Variables for the definition of the real estate’s address. yr_constr Year of construction of the real estate. yr_last_reform Year of the last reform to the real estate, obtained as the most recent year of reform of its constructions. reform_type Type of the last reform made to a construction of the real estate (R: integral rehabilitation, O: complete reform; E: intermediate reform, I: minimum reform). conserv_status Conservation status of the real estate, obtained from INSPIRE service and generalized to all the buildings within a same parcel. RS_builtup_surf Built-up surface of the real estate. coef_property Property coefficient of the real estate within its building. Use Use (D: dwelling) RS_max_floor Intermediate variable to obtain the number of floors above ground of the building. Calculated as the maximum floor of all the constructions of a real estate. RS_min_floor Intermediate variable to obtain the number of floors below ground of the building. Calculated as the minimum floor of all the constructions of a real estate. floors_above_gr_build Number of floors above ground of the building. Obtained as the maximum floor of all the real estates of the same building plus 1 (floor 0 is the first one above ground). floors_below_gr_build Number of floors below ground of the building. Obtained as the minimum floor of all the real estates of the same building, in absolute value. building_type Type of building (S: single-family, M: multi-family). dw_per_floor Intermediate variable for the number of dwellings per floor of the building. Number of dwellings in the same floor of the real estate. max_dw_per_floor Number of dwellings per floor of the building. Obtained as the maximum of dw_per_floor in the same building. built_surf_per_floor Intermediate variable for the built-up area per floor of the building. Built-up area of dwellings in the same floor of the real estate. max_built_surf_per_floor Built-up area of dwellings per floor of the building. Obtained as the maximum of built_surf_per_floor in the same building. RS_built_surf_above_gr Intermediate variable for the built-up area above ground of the building. built_surf_above_gr_build Built-up surface above ground of the building. Sum of the RS_built_surf_above_gr of the building. RS_built_surf_below_gr Intermediate variable for the built-up area below ground of the building. built_surf_below_gr_build Built-up surface below ground of the building. Sum of the RS_built_surf_below_gr of the building. perc_resid_use Percentage of residential use of the building, obtained from the use of its real estates and their respective built-up areas over the total of the building. roofing, façade, sec_façade, windows, floor, heating, cooling, DHW Variables to define the type of constructive solutions, generated combining the element, building_type, yr_constr, yr_last_reform, reform_type, and the evolution of solutions of the thermal envelope and installations according to project TABULA. A. Martínez-Rocamora et al. Journal of Building Engineering 86 (2024) 108912 16 [35] M. Ester, H.-P. Kriegel, J. Sander, X. Xu, A density-based algorithm for dicovering clusters in large spatial databases with Noise, in: KDD-96 2nd Int. Conf. Knowl. Discov, . Data Min., 1996, pp. 226–231, https://doi.org/10.11901/1005.3093.2016.318. [36] G.N. Lance, W.T. Williams, A general theory of classificatory sorting strategies: 1. Hierarchical systems, Comput. J. 9 (1967) 373–380, https://doi.org/10.1093/ comjnl/9.4.373. [37] P.J. Rousseeuw, Silhouettes, A graphical aid to the interpretation and validation of cluster analysis, J. Comput. Appl. Math. 20 (1987) 53–65, https://doi.org/ 10.1016/0377-0427(87)90125-7. [38] Ministry of Housing, Normas MV, 1957. [39] Government of Spain, NBE-CT79: Normas B´ asicas de Edificaci´ on - Condiciones t´ ermicas de los edificios/Basic Building Regulations - Thermal conditions of buildings, 1979. Spain, https://www.boe.es/boe/dias/1979/10/22/pdfs/A24524-24550.pdf. [40] CTE, Spain MH (Ministry of Housing). C´ odigo T´ ecnico de la Edificaci´ on (Building Technical Code), 2006. Madrid. Spain. [41] R. R Core Team, A Language and Environment for Statistical Computing, 2021. Vienna, Austria, https://www.r-project.org/. [42] Posit Team, RStudio, Integrated Development Environment for R, Boston, MA, 2023. http://www.posit.co/. [43] IVE, Cat´ alogo de tipología edificatoria residencial. ´ Ambito, Espa˜ na/Residential Building Typologies Catalogue, Region, Spain, Valencia, 2016. https://episcope. eu/building-typology/country/es/. [44] M.D. Noguero Hern´ andez, M. del P. Díaz Cuevas, J. Ojeda Zújar, Georreferenciaci´ on y An´ alisis Espacial de Actuaciones de Rehabilitaci´ on Residencial en Alcal´ a de Guadaira (Sevilla), in: XVI Congr. Nac. Tecnol. La Inf. Geogr´ afica, 2014, pp. 684–694. Alicante, Spain, https://dialnet.unirioja.es/servlet/catart? codigo=5426056. [45] J.P. P´ erez-Alc´ antara, M. del P. Díaz-Cuevas, J.I. ´ Alvarez-Francoso, J. Ojeda-Zújar, M´ etodos de adscripci´ on Y tratamiento espacial para La generaci´ on Y visualizaci´ on de indicadores de vivienda (grid) a trav´ es de Catastro, in: XVII Congr. Nac. Tecnol. Inf. Geogr´ afica, 2016, pp. 224–234. M´ alaga, Spain. [46] J.P. P´ erez-Alc´ antara, J. Ojeda-Zújar, M. del P. Díaz-Cuevas, J.I. ´ Alvarez-Francoso, Integraci´ on de datos poblacionales y catastrales en estructuras GRID : primeros resultados para el espacio residencial en Andalucía, in: XXV Congr. La Asoc. Ge´ ografos Espa˜ noles, 2017, pp. 1619–1628. Madrid, Spain. [47] J. Camarillo, I. Vallejo, A. Tabales, E. Pav´ on, Where is tourist housing actually located? New approaches and sources for detailed scale analysis, Eur. Plann. Stud. 30 (2021) 1–25, https://doi.org/10.1080/09654313.2021.2002825. [48] J.M. Martín Jim´ enez, V.M. Rodríguez Espinosa, Processing of the cadastre information using postgresql-postgis. Application to the analysis of urban land uses in Alcal´ a de Henares, Spain, Estud. Geogr´ aficos 83 (2022), https://doi.org/10.3989/ESTGEOGR.2022106.106. A. Martínez-Rocamora et al.