Impact of the COVID-19 pandemic on the energy performance of residential neighborhoods and their occupancy behavior

Several contrasting effects are reported in the existing literature concerning the impact assessment of the COVID-19 outbreak on the use of energy in buildings. Following an in-depth literature review, we here propose a GIS-based approach, based on pre-pandemic, partial, and full lockdown scenarios, using a bottom-up engineering model to quantify these impacts. The model has been verified against measured energy data from a total number of 451 buildings in three urban neighborhoods in the Canton of Geneva, Switzerland. The accuracy of the engineering model in predicting the energy demand has been improved by 10%, in terms of the mean absolute percentage error, as a result of adopting a data-driven correction with a random forest algorithm. The obtained results show that the energy demand for space heating and cooling tended to increase by 8% and 17%, respectively, during the partial lockdown, while these numbers rose to 13% and 28% in the case of the full lockdown. The study also reveals that the introduced detailed occupancy scenarios are the key to improving the accuracy of urban building energy models (UBEMs). Finally, it is shown that the proposed GIS-based approach can be used to mitigate the expected impacts of any possible future pandemic in urban neighborhoods.


Introduction
The COVID-19 pandemic has introduced an unexpected and significant impact on the energy sector. Moreover, it has caused an unprecedented crisis that has affected the human and social capital, institutions, communities (Saif-Alyousfi & Saha, 2021), industrial processes (Zhou et al., 2021), energy use, as well as the financial investments of individuals (Giovannini et al., 2020). As a result of the uncertainties that have arisen from the duration and intensity of the COVID-19 pandemic, its impacts on the energy sector and policy responses have opened a wide range of possible future energy scenarios. Energy policies should consider the complexities and interconnections of this crisis when defining measures to achieve the energy and climate targets set for 2030 and 2050.
The daily life and behavioral patterns of individuals have changed drastically during the pandemic. These changes have had a significant impact on the energy demand of buildings because people, and in particular those over 65 or anyone advised to shield for health reasons, now spend much more time at home (Balest & Stawinoga, 2022;Saadat et al., 2020). Moreover, many workers and students have been encouraged to work or study at home, which may involve using a computer or tablet (Cuerdo-Vilches et al., 2021;Mouratidis & Papagiannakis, 2021). As a result, an increase in domestic energy consumption, especially electricity, and a reduction of electricity in industrial and commercial sectors has been observed (Bahmanyar et al., 2020;Zhang et al., 2021). Reports and research publications have also highlighted the impact of the COVID-19 pandemic on the energy demand of buildings and the behavioral patterns of users around the world. The International Energy Agency (IEA) has estimated that the global energy demand and CO 2 emissions decreased by 5% and 7% in 2020 (International Energy Agency (IEA), 2020). In March and April 2020, during the COVID-19 pandemic, electricity consumption decreased by 10% in the United States and in European countries, compared to the same period in 2019 (IAEE, 2020;Ruan et al., 2020). Italy and Spain are the countries that have been affected the most with reductions of about 30% and 20% in the electricity demand, respectively (IAEE, 2020). A different trend has been observed in Northern Europe. The total electricity consumption has remained almost constant in Denmark, Finland, Norway, and Sweden. The only exception is Switzerland, which has shown an 8% increase in the total electricity demand (IAEE, 2020).
Countries have controlled the pandemic in different ways by imposing various restrictive measures. In addition, the perception of risk varies from country to country, which can affect the effectiveness of the imposed measures (Siegrist & Bearth, 2021). Nevertheless, such measures have led to significant changes in the lifestyles of people. It is well-known that the users' behavior has a major impact on the energy demand, in part related to the amount of time they use electricity and heating and in part related to the status of window and door openings (Delzendeh et al., 2017). There is a close correlation between the occupants' behavior and energy demand in buildings (Ahn & Park, 2016). The occupancy profiles of buildings play a crucial role in energy consumption (Buttitta & Finn, 2020;Motuzienė et al., 2022). Human behavior, different occupancy densities, and variations in thermal and lighting preferences contribute significantly to the gap between simulated and real energy performance in buildings (Dong et al., 2021;Martinaitis et al., 2015;Wu et al., 2020). However, the literature on defining occupancy scenarios during the COVID-19 pandemic is still scarce, and contrasting effects have been observed in different sectors and countries. It is important for research to define a methodology that is able to model future energy scenarios during pandemic phenomena, given the possibility of the emergence of other pandemics in the future (Thoradeniya & Jayasinghe, 2021).
This study addresses this gap by introducing a flexible GIS-based approach, which is readily applicable to other contexts and can consider the effect of the users' behavior during the pandemic on the energy performance of residential urban neighborhoods.

Research background and gap
The current state of the art of the impact assessment of the COVID-19 outbreak on the energy demand has focused chiefly on electricity consumption. During the COVID-19 pandemic, there has been a reduction in electricity consumption for the industrial and commercial sectors and an increase in the residential sector. The reviewed literature has been categorized according to the type of building (e.g., residential, commercial, industrial, municipal, or educational) and the type of energy use (e.g., electricity, heating, cooling, or DHW). The studies that have focused on the impacts of the pandemic on the electricity demand are mainly based on analyzing measured electricity data or on questionnaires. In Italy, a reduction of up to 37% in the national electricity sector has been observed, and the daily load profile has changed significantly (Ghiani et al., 2020). Furthermore, a significant reduction in the overall use of electricity was noted in the UK (Liu & Lin, 2021) during the lockdown. Madurai Elavarasan et al. (Madurai Elavarasan et al., 2020) found that the residential electricity demand in India increased during the lockdown, while they also observed a substantial decrease in commercial and industrial consumption.
Analogous results were observed in the province of Ontario in Canada, where a reduction in the overall electricity demand of 14% was observed in April 2020, as well as a flattening of the load demand, especially during peak hours (Abu-Rayash & Dincer, 2020). A similar trend has been reported for South Asia (Lowder & Leisch, 2020) and Romania (Soava et al., 2021). Analyzing the types of users independently, the residential electricity demand increased, showing a shift and change in the shape of the load profiles, while the electricity in the commercial and industrial sectors decreased. Geraldi et al. (2021) found that the electrical consumption of administrative buildings in Florianópolis (Brazil) decreased by 38%, and that of elementary and nursery schools decreased by around 50% during the lockdown.
In Lagos (Nigeria), the electricity data of 259 residential, commercial, and industrial users were analyzed before and during the lockdown (partial and full lockdown). No significant changes between the baseline scenario and the partial lockdown figures were observed in the residential sector, while consumption decreased in the commercial sector (Edomah & Ndulue, 2020 consumption data pertaining to 3.8 million residential and non-residential buildings in Illinois (the USA). In April 2020, the electricity demand for the non-residential sector decreased by 16%, while residential consumption increased by 12%. Ding et al.(2021) developed energy signature curve models to assess the annual electricity use in Norway and found that the annual electricity demand decreased in educational buildings (kindergartens and schools) during the lockdown, while the electricity use increased in residential buildings, with significant differences related to the building typology (apartments underwent an increase of 27% and townhouses of 1.3%). In New York, the electricity demand of residential users during the lockdown increased over the weekdays, with higher morning peaks between 8 and 10 am (Chen et al., 2020). A similar trend was observed in Warsaw, where dwellings showed a higher daily electricity use on weekdays, but without any increment in the average daily peak demand, and a flattened profile in the morning hours (Bielecki et al., 2021). Although the electricity consumption during the COVD-19 pandemic has been studied widely, only a few works have investigated the use of Table 1 Overview of the effects of the COVID-19 pandemic on the energy use in the building sector.

Ref. Energy simulation
Energy use Users Case study Main findings (Ghiani et al., 2020) Real measured data Electricity All the users Italy A reduction in the electricity consumption of up to 37% was observed during the full lockdown period, (Liu & Lin, 2021) Machine learning model South Asia An increase in the residential electricity consumption and a reduction in the commercial and industrial usage were observed during the lockdown and this led to a shift and change in the shape of the load profiles (Soava et al., 2021) Real measured data Electricity Residential, commercial, industrial users

Romania
An increase in the residential electricity consumption and a reduction in non-residential electricity consumption were observed during the lockdown. (Geraldi et al., 2021) Real measured data The electricity consumption for the non-residential sector decreased by 16%, while residential consumption increased by 12%. The weekday load profiles in the residential sector became very similar to those of the weekends during the lockdown (April 2020).  Energy signature curve models Electricity Residential, educational users Norway An increase in the residential electricity consumption of 27% was observed for apartments and 1.3% for townhouses during the lockdown. The electricity consumption for the education sector decreased. (Chen et al., 2020) Household surveys Electricity Residential users New York, The USA It emerged, from the interviews, that the electricity consumption of households was higher during the lockdown; only a few households reported a lower energy usage. (Bielecki et al., 2021) Real measured data Electricity Residential users Warsaw, Poland An increased daily electricity consumption was observed on weekdays, but the average daily peak demand did not increase, while the profiles were flattened in the morning during the lockdown. (Mehlig et al., 2021) Real measured data Electricity, heating, DHW All the users The UK The electricity consumption of non-residential users in the first lockdown reduced by 15.6%, while heat consumption reduced by 12.0%, and then by less than half in the second lockdown. The energy consumption of residential users did not change during the first lockdown but increased by 6.1% in the second one. (Rouleau & Gosselin, 2021) Real measured data Electricity, heating, DHW

Residential users Canada
The average daily electricity consumption increased by 2%, and the DHW consumption increased by 17%, but no significant change in space heating use was observed during the lockdown. (Cheshmehzangi, 2020) Real measured data Electricity, heating, cooling Residential users China A 40% increase in energy consumption for cooking, a 60% increase for cooling and heating, and a 40% increase for lighting were observed during the lockdown.  Energy signature curve models Heating, DHW School, kindergarten, university users Norway Consumption was reduced by up to 54% (21 kWh/m 2 per year) during the lockdown (Zhang et al., 2020) UMI tool, Rhino 6 Electricity, heating, cooling, DHW Residential, school, office users Sweden An increase in residential electricity consumption and a reduction in heating consumption were observed, due to more internal heat gains during the lockdown. Schools and offices needed less energy for electricity and heating (Cvetković et al., 2021) EnergyPlus software Electricity, heating, DHW

Residential users Kragujevac, Serbia
The heating consumption increased by 21.3% during a partial lockdown, electricity consumption increased by 54% during the partial lockdown and 58.4% during a full lockdown (a similar trend was observed for DHW consumption) heat in non-residential and residential buildings. The literature on assessing the heating demand in buildings during the COVID-19 pandemic can be divided into two major groups, that is, measured data and simulated data. In the UK, the consumption of electricity and heat in the non-residential sector (industrial and commercial) decreased by 15.6% and 12%, respectively, during the first lockdown, while the second lockdown led to reductions of 6.3% for electricity and 4.1% for heat. The use of thermal energy in residential buildings did not change during the first lockdown but increased by 6.1% in the second one (Mehlig et al., 2021). In Canada, the energy demand of 40 social housing buildings was investigated during the lockdown (Rouleau & Gosselin, 2021). The average daily electricity increased by 2%, the domestic hot water (DHW) consumption increased by 17%, while the space heating consumption showed minimal variations, mainly due to the increase in window openings. Cheshmehzangi (2020) reported an increase in the energy use of 352 households in China during the lockdown. The author observed an increase of 40% in the energy demand for cooking between January and March 2020 and an increase of 60% in the energy demand (cooling and heating) and of 40% in lighting from January to February 2020. An analysis of the use of heat was carried out in educational buildings in Norway before and during the lockdown using a model based on the energy signature curve . The authors hypothesized different scenarios assuming lockdown conditions. From their results, it emerged that the consumption of schools, kindergartens, and universities could be reduced by up to 54% during the lockdown.
They also hypothesized that about 77 Wh/m 2 per day (equal to 21 kWh/m 2 per year) could be saved. Energy simulation tools have also been widely used to assess the impact of restriction measures on energy demand. Non-residential energy use decreased during the lockdown, while residential consumption showed different trends, depending on the input setting. For example, Zhang et al. (Zhang et al., 2020), adopting the urban modeling interface (UMI) tool (Reinhart et al., 2013), investigated the energy demand in Sweden by simulating different scenarios. The use of electricity in residential buildings increased during the full lockdown, and the heating decreased due to the internal gains (no variations in ventilation and window openings were considered during the lockdown). Schools and offices needed less energy for electricity and heating during the lockdown period (Zhang et al., 2020). Cvetković et al. (2021) simulated the energy consumption of a residential building in Kragujevac (the fourth largest city in Serbia) using EnergyPlus software. Their results showed an increase of over 21.3% in the heating demand during a partial lockdown, and a higher use of electricity of over 54% and 58.4% during a partial lockdown and full lockdown, respectively. Table 1 offers an overview of the effects of the COVID-19 pandemic on energy use in buildings.
The main findings of the literature review can be categorized as follows: -The electricity consumption of all the users (industrial, commercial and public) tended to decrease during the lockdown period, except for the residential sector. -By analyzing the electricity consumption of different users during the lockdown period, it is possible to confirm that: (i) there was an increase in the residential electricity consumption, and the weekday load profiles became very similar to those of the weekend; (ii) there was a reduction in industrial and commercial electricity consumption. -The heat demand of residential buildings tended to increase during the lockdown, but not markedly, due to higher internal gains. -The heat demand for the non-residential sector tended to decrease in schools, offices (since they were closed) and retail buildings (since they were open fewer hours per day).

Research objective and contribution
The unprecedented impact of the pandemic has caused the energy consumption trend to change unexpectedly. As a result, it is essential to develop energy models to evaluate future energy trends. Only a few studies have evaluated the impacts of the lockdown on the energy heat demand. As measured energy data are not always available, energy simulation tools are often used to assess the impact of the pandemic on the energy demand. Several contrasting results have been reported in the existing literature regarding urban energy use simulations and occupancy profiles. The definition of occupancy scenarios is fundamental to take into account the behavior of residents during the pandemic. This study introduces detailed scenarios that take into account different occupancy behavioral patterns. As the GIS-based approach presented here is flexible, the input data can readily be updated according to the scenarios that has to be analyzed. In addition, the presented model allows energy assessments to be conducted at the urban scale, and the simulation runtime is much less than that of the existing simulation engines.
The aim of this study has been to address the research gaps presented in the literature review by using measured and simulated data to analyze the energy trend during the COVID-19 pandemic. More specifically, the aims of the study are: (i) To develop and verify a bottom-up approach in order to explore the impacts of the COVID-19 pandemic on the space heating and cooling demands of residential buildings using a "GIS-based engineering model". (ii) To develop and analyze detailed occupancy scenarios that describe the behavior of the occupants during the partial and full lockdowns. (iii) To develop a data-driven model in order to improve the accuracy of the GIS-based energy model using a machine learning approach.

Methodology
This work investigates the impacts of the COVID-19 pandemic on the space heating and cooling energy performances of three residential neighborhoods located in the Canton of Geneva, Switzerland. The proposed methodology consists of three main phases ( Fig. 1). In the first phase, the input data are processed. This methodology combines different types of data. Climate data, building data, occupancy profiles, and morphological parameters are processed and elaborated with the support of GIS tools. The energy demand of urban neighborhoods is investigated using a GIS-based engineering model (Mutani et al., 2020Todeschi et al., 2021). The GIS-based model is verified in the energy simulation phase, and the simulated annual energy consumption is compared with the measured data. We use a machine-learning algorithm to improve the accuracy of the model. In the third phase, the impact of the COVID-19 pandemic on the space heating and cooling demand is assessed by investigating three scenarios that consider the occupancy scenarios, that is, pre-pandemic, partial lockdown, and full lockdown.

Studied area
The proposed GIS-based approach is here implemented for the Canton of Geneva. The climate in this canton is temperate with cold winters, warm summers, adequate precipitations, and a north-easterly wind (Köppen climate classification: Cfb (Peel et al., 2007)). Fig. 2 shows the hourly weather data of Geneva collected from Meteonorm 8.0.4 for the "contemporary" period from 2000 to 2019. The relative humidity (%) and external air temperature ( • C) refer to a weather station in Geneva (46 • 25 ′ N, 6 • 12 ′ E). During the winter season, the air temperature drops to − 6.9 • C in January, while the temperature rises to 34.8 • C in July. The coldest months are January and December, with average monthly air temperatures of 2.2 and 2.9 • C, respectively. The hottest months are July, with an average monthly air temperature of 20.8 • C, and August, with an average temperature of 20 • C.

Case studies
The urban morphology affects the energy performance of buildings to a great extent due to the relationship between the building and its surroundings (e.g., shading, heat exchanges between buildings) and the type of outdoor surfaces (Ahn & Sohn, 2019;Javanroodi et al., 2018;Mangan et al., 2021). It is possible to reduce the space heating and cooling energy demand of buildings by optimizing the urban morphology . The urban morphology also modifies the microclimate conditions in urban areas, particularly in extreme weather conditions (Javanroodi & Nik, 2020). It is thus essential to consider the impact of the urban morphology when developing a sound energy simulation model at the urban scale. In this study, the urban morphology of the three neighborhoods in the Canton of Geneva was retrieved from the GIS database, focusing on the urban form and density. The 2D building characteristics and the digital surface model (DSM) were acquired from the Swisstopo (Federal Office of Topography) database at a resolution of 0.5 × 0.5 m.
Several parameters, referring to the urban form and urban density, have been considered in the literature to describe the urban morphology of a location. In this study, six major parameters have been considered to define the morphology of the neighborhoods: (i) the building height (BH), that is, the average height of the buildings in the sample area, (ii) the relative height (H/H avg ), that is, an index to describe the solar exposition concerning the building heights (Chatzipoulka et al., 2016), (iii) the building coverage ratio (BCR), that is, the total built area in the sample area divided by the sample area (Mohajeri et al., 2016;Wei et al., 2016) (iv) the building density (BD, m 3 /m 2 ), that is, the total building volume in the sample area divided by the sample area (Mohajeri et al., 2016;Quan et al., 2020), (v) the height-to-width ratio (H/W) (Javanroodi et al., 2019;Martin et al., 2017), which is the ratio of the building height to the distance between buildings, and (vi) the sky view factor (SVF), which is used to measure the portion of sky visible from a given point (Javanroodi et al., 2022;Middel et al., 2018). SVF is used in the GIS-based engineering model to account for the solar exposition of the urban morphology and to quantify the thermal radiation lost to the sky considering a 200 × 200 meter grid size. A total number of 18 urban neighborhoods were assessed in the Canton of Geneva using the procedure mentioned above, in which three neighborhoods were selected on the basis of the urban density (i.e., BH and BD) and the urban form (i.e., H/H avg , BCR, H/W, and SVF). In this regard, a BH range of 10 to 25 m was considered for the urban density,  V. Todeschi et al. for which neighborhood 1 (hereafter referred to as NBH 1 ) was 10.8 m, neighborhood 2 (hereafter referred to as NBH 2 ) was 23.7 m, and neighborhood 3 (hereafter referred to as NBH 3 ) was 15.6 m, while BD varied from 1.6 to 8.2 m 3 /m 2 . A range of 0.15 to 0.4 m 2 /m 2 for BCR and a range of 0.25 to 0.8 m 2 /m 2 for H/W were considered for the urban form; the BCR values were 0.16, 0.38 and 0.15 m 2 /m 2 for neighborhoods 1, 2 and 3, respectively, while the H/W values were 0.25, 0.81 and 0.30 m 2 /m 2 . Although the H/H avg and SVF values were found to be similar across the studied neighborhoods, they were considered in the assessments due to their importance in modifying the urban climate.
This investigation focused on the residential sector, and the neighborhoods with a high percentage of residential buildings were therefore identified. Thus, three neighborhoods were selected considering the characteristics of the residential building stocks. In these neighborhoods, 90% of the buildings are residential, and most of the energy data for annual heating consumption is known for these buildings. Fig. 3 shows a map of the Canton of Geneva with the location of the three selected neighborhoods (the locations of the neighborhoods are marked in red). NBH 1 (46 • 24 ′ N, 6 • 20 ′ E) and NBH 2 (46 • 21 ′ N, 6 • 15 ′ E) are small urban areas in the Vésenaz district and Pâquis district, respectively, while NBH 3 (46 • 19 ′ N, 6 • 11 ′ E), which has a larger total area, is located in the Lancy and Onex districts. Table 2 presents the values of the morphological parameters considered for each neighborhood. The morphological parameters that have the most significant variability are BH and BD, which were used to describe the urban density, and the canyon effect, which was evaluated as a function of the H/W ratio. Neighborhoods 1 and 3 are less dense than NBH 2 , which has higher BH, BCR, BD, and H/W values.
Around 1800 buildings with heating/cooling systems were selected from over 3200 buildings in the three neighborhoods. These buildings were then classified into seven categories: assembly (church, public, sports center, temple), business (service, government, offices, post office, police), commercial (commercial, retail), educational (kindergarten, school, university), industrial (manufacture, atelier), institutional (hospital), and residential (condominium, detached house, retail). Fig. 4 depicts the buildings classified on the basis of their function in the selected neighborhoods.
NBH 1 has over 420 heated buildings, 95% of which were identified as residential users. The residential buildings have an average S/V ratio of 0.74 m 2 /m 3 (i.e., detached house). Almost 40% of the buildings were built after 1991 and only 16% before 1945. A total of 34 residential buildings, for which the measured energy consumption was known, were selected from this database to verify the accuracy of the GIS-based model.
There are nearly 650 heated buildings in NBH 2 , 84% of which were identified as residential users. Most residential buildings (42%) were built before 1945, 25% between 1946 and 1970, and only four buildings (1%) were constructed after 2010. The measured energy consumption of 283 residential buildings in this district was available for model verification purposes. The third neighborhood has over 750 heated buildings, 92% of which are residential buildings with an average S/V of 0.71 m 2 / m 3 . The prevalent construction year is class 6 (21% of the residential Fig. 3. Map of the Canton of Geneva using World Imagery from ESRI to show the locations of the three neighborhoods considered as case studies. It was crucial to verify simulated data by comparing them with the measured energy data to improve their reliability. Thus, a total of 451 buildings out of a possible 1640 were selected on the basis of the available data. The measured annual heating consumption and the construction year used to define the thermophysical properties of the building were known for these buildings. Fig. 5 shows the residential buildings selected for the analysis in green (for which the measured energy consumption was known), while the rest are highlighted in red.

Data pre-processing 2.3.1. Climate data
The GIS-based model presented in this work can be applied to different urban settings and larger scales than the one considered here (city, regional, or national scales). It has been formulated with a view toward future pandemics and weather conditions, considering different sources of uncertainties. Thus, it is crucial to tune the model considering the available coarse weather and GIS dataset in cities (historical weather data for a specific location and date with an hourly resolution are not always available freely). In the present case, the hourly climate data were collected from Meteonorm 8.0.4 for the "contemporary" period, that is, from 2000 to 2019. Meteonorm utilizes an urban heat model to account for the urban heat island effect on temperature and relative humidity, based on the f ERA-Interim/urbclim model (www.urban-c limate.be). Subsequently, the climate data are calibrated according to the urban morphology (see section 2.4.). Data recorded and statistically interpolated by the local weather station (46 • 25 ′ N, 6 • 12 ′ E in Geneva)   were elaborated for three different locations, one for each of the analyzed neighborhoods. Table 4 shows the main characteristics of the three locations (cool temperate zones with a sub-maritime climate). It is possible to observe, from the annual climate data, that there are no significant differences between the three studied areas.
The following weather profiles were used as input data for the GISbased engineering model: the external air temperature (T a in • C), the relative humidity (RH in%), the global horizontal radiation (G h in W/ m 2 ), the beam irradiance (B n in W/m 2 ), and the diffuse horizontal irradiance (D h in W/m 2 ). This work has not considered the wind effect on the convective heat exchange.
No significant differences emerged when the Heating Degree Days (HDD) and Cooling Degree Days (CDD) in the Canton of Geneva were compared for 2019 (pre-pandemic period) and for 2020 (pandemic period). The HDDs for 2019 and 2020 were 2755 and 2654, respectively; the CDDs were 298 in 2019 and 290 in 2020 (source: www.meteoswiss. admin.ch). Therefore, the energy simulations in the analysis were carried out using a typical weather year on the basis of historical weather data (2000-2019) retrieved from Meteonorm.

Building data
The geometrical characteristics of each building (e.g., the building footprint, number of floors, height, volume), the surface-to-volume (S/ V, m 2 /m 3 ) ratio, which is a variable that is able to describe the compactness of the building, the year of construction, and the user type (i.e., residential, school, office, industrial) were identified and processed using different databases, that is, Swisstopo (Federal Office of Topography), SITG (Système d'information du territoire à Genève), and Switzerland's OSM (Open Street Map). The first step involved identifying the heated/cooled buildings. Garages and low-rise buildings of less than 3 m in height and with a total area of less than 50 m 2 are classified as unheated buildings (without an energy system). After identifying the buildings that had an energy system, we selected only the residential users. The second step involved developing a comprehensive database of the residential buildings located in the neighborhoods using GIS tools. We defined the thermophysical properties of the buildings, according to the construction year, using a study performed on the city of Neuchâtel, Switzerland, (Perez, 2014) as a reference. We identified the thermal transmittances and thermal capacity of the windows and opaque elements, the infiltration rate, the total solar energy transmittance of the glazing, and the window-to-wall ratio (WWR, -) values of each building.

Occupancy scenarios
One aspect that affects energy consumption is the behavior and habits of the inhabitants/users (Buttitta & Finn, 2020;Csoknyai et al., 2019). We defined three occupancy profiles to evaluate the effect of the COVID-19 pandemic on the energy demand of the residential users. Three aspects were considered: (i) the hours of operation of the energy system, (ii) the internal heat gains, due to the presence and activity of people in the buildings, (iii) the heat losses, due to window openings. We defined the following scenarios: (i) a baseline scenario (S1), in which the energy demand was simulated considering the occupants' behavior in a typical year; according to the SIA 2024 Swiss norm (Zurich, 2006), it is assumed that people stay at home 12 h per day; (ii) a partial lockdown scenario (S2), in which people stay at home 18 h per day; (iii) a full lockdown scenario (S3), in which people stay at home all day (24 h a day) (Cvetković et al., 2021;Zhang et al., 2020). In these scenarios, we considered that the heating system was switched on/off as a function of the building temperature. The heating/cooling system was always turned on to achieve a comfortable internal air temperature of 22-20 • C in winter and 26-28 • C in summer. The heating system turned off when the internal air temperature reached a comfortable temperature.
Figs. 6, 7, and 8 show the heating and cooling schedules for the three scenarios in blue, where the weekdays are distinguished from the weekends. In the graphs, the value 0 indicates that the internal air temperature of the building was set at 20 • C in winter and 28 • C in summer, while the value 1 indicates that the internal air temperature was set at 22 • C and 26 • C in winter and summer, respectively. This means that the energy system was always in operation to keep the building temperature at 22 • C or 20 • C during the heating season and at 26 • C or 28 • C during the summer season, according to the literature (Tardioli et al., 2020) and as required by the SIA 2024 Swiss norm (Zurich, 2006).
The internal gains were considered to depend on the number of occupants per building and the occupants' activities. The number of occupants was calculated by referring to the SIA 380-1 Swiss norm (Zurich, 2009), which indicates that the surface area per person is 40 m 2 /P for residential buildings, with an S/V ratio equal to or less than 0.71 m 2 /m 3 (typical of condominiums) or 60 m 2 /P with a higher S/V than 0.71 m 2 /m 3 (typical of detached houses).
According to the type of activity, the metabolic flux was assumed as 72 W for a person who is sleeping, 108 W for one who is sitting, 126 W for one who is standing, 175 W for one who is cooking, 207 for one who is walking, and 210 for one who is cleaning (Cvetković et al., 2021). The occupancy schedule for the baseline scenario (S1) is indicated in Fig. 6 and, according to the SIA 2024 Swiss norm (Zurich, 2006), people stayed at home 12 h a day. In Figs. 7 and 8, it is assumed that people stayed at home 18 h during a partial lockdown (S2) and 24 h during the full lockdown (S3) (Cvetković et al., 2021;Zhang et al., 2020).
Heat losses were quantified according to the values of the air change rate (ACH, h − 1 ) for the infiltration indicated in Table 5. Constant ACH values were assumed during the day (24 h), considering natural ventilation through infiltrations. People open windows more often when they stay at home longer (Lepore et al., 2021); thus, the ACH values were increased in the S2 and S3 scenarios, compared to the baseline scenario.

Measured energy data
The measured annual energy data for space heating were used to verify the accuracy of the GIS-based engineering model. The measured energy data were obtained from the SITG (Système d'information du territoire à Genève) database. However, no energy data were available in the SITG database for detached houses. Therefore, this building typology was excluded from the first investigation. After verification of the model, the analysis will be extended to the full residential heritage.
The following information was acquired for each building: the annual heat consumption for space heating and domestic hot water, expressed in MJ/year and MJ/m 2 /year, the share of energy used for DHW, the heated surface, the measurement year (from 1999 to 2010) and the energy vector.
The model used in this work simulates the energy demand for space heating under certain climatic conditions. From the measured data, only the share of energy for space heating was considered to verify the model. The residential buildings in the three neighborhoods use natural gas as the energy vector to heat the buildings. However, as no different values Table 4 Measurements and the annual climate data of the three considered sites. of system efficiency were available, we assumed a system efficiency of 0.85, which, according to the SIA 380-1 Swiss norm, is typical of gas systems (Zurich, 2009), to calculate the energy demand.
The HDD presented in Table 6 were used to normalize the measured energy data, while the typical weather data from Meteonorm 8.0.4 were used for the simulations. The HDD for the three neighborhoods can be

Table 5
Air change rate (ACH, h − 1 ) per construction year for the three scenarios (Perez, 2014).

Scenario
Before 1945 1946-1960 1961-1970 1971-1980 1981-1990 1991- Table 6, referring to a typical Meteonorm year. It can be seen that the relative difference between the HDD in the neighborhoods is minimal.

Energy simulation model
The energy demand for the space heating and cooling of residential buildings in the three neighborhoods was investigated for one year using a bottom-up approach. The "GIS-based engineering model" introduced by Mutani et al. (Mutani et al., 2020) is a dynamic urban building thermal balance based on three thermodynamic systems (TSs) . The model is based on an hourly calculation and considers the influence of hourly variations in the weather and operation. Energy balance equations are used to assess the temperatures of the three TSs per hour using an iterative method or to solve other variables if these temperatures are known. The model was verified in detail against the actual energy data of residential buildings in Turin and Fribourg (see (Mutani et al., 2020Todeschi et al., 2021) for more information on the validation study). In this study, the validated model has been used to simulate the hourly energy demand of 451 residential buildings located in neighborhoods with different urban morphologies.

Urban building thermal balance
The GIS-based engineering model presented in this study is based on the ISO 52016-1:2017 (ISO-52016-1:2017(en), 2017) and ISO 52017:2017 (ISO-52017-1:2017(en), 2017) standards. The dynamic model considers a sensible thermal balance that was adapted from the building scale to the neighborhood scale using two morphological parameters: SVF and H/W. The two parameters are calculated, using GIS tools, at the mesh-scale for a grid with a dimension of 200 × 200 m. According to this methodology, it is possible to include the mutual shading and view factors of the surrounding built-up context in the energy simulation by evaluating the heat fluxes between the block of heated-cooled buildings and the external environment.
As previously mentioned, this model is based on three TSs: (i) the opaque envelope, composed of all the opaque surfaces that separate the heated volume of the buildings from the external environment; (ii) the glazing component, which separates the heated zone from the external environment; (iii) the inside part of the building, which includes the internal partitions and structures, air, occupants, and furniture.
Eqs. (1) and (2) describe the dynamic balance for the heating and cooling seasons, respectively. For each TS, C (J/K) is the heat capacity; T is the temperature of the TSs (K); t is the time (s); ∅ sol is the heat flow rate from solar gains; ∅ I is the heat flow rate from internal gains; ∅ H− C is the heat flow rate from the heating or cooling system; ∅ t is the heat flow rate from transmission; ∅ v is the heat flow rate from ventilation.
The computational model used to calculate ∅ sol is improved, compared with the previous version of the model (Mutani et al., 2020;Todeschi et al., 2021). In this version, the direct solar irradiation, diffuse solar irradiation and reflected solar irradiation components are used (Eqs. (3a) and 3b).
Eq. (3) shows the heat flow rate from solar gains (∅ sol ), which is obtained from absorption (Eq. (3a)) or from transmission (Eq. (3b)), considering the solar irradiation observed and transmitted through the opaque and transparent building elements (k).
The first term in Eq. (3a), α k (-), is the solar absorption coefficient and the first term in Eq. (3b), τ G (-), is the total solar energy transmittance.
The second term, A k (m 2 ), is the opaque and transparent envelope area exposed to the sun.
The incident solar irradiance on walls is assessed considering: (i) the direct solar irradiance I sol,Bh (W/m 2 ) calculated according to the orientation and the inclination of the surfaces of the building envelope, (ii) the hourly variation in the sunlight percentage ξ (-) calculated as a function of the solar height and the aspect ratio H/W, (iii) and the reduction factor F k (-), which considers the percentage of the area exposed to the sun.
The quota of the diffuse solar irradiance I sol,Dh (W/m 2 ) is multiplied by the reduction factor F r (-), which is the form factor between a building element and the sky, calculated as a function of the SVF and the surface inclination (e.g., ½ of the SVF is considered for vertical walls).
The quota of the reflected solar irradiance is calculated taking into account the quota of direct and diffuse solar irradiance reflected by the urban canyon surfaces (ρ sol is the solar reflectance of the external environment, which is assumed equal to 0.20, in accordance with the Italian UNI 10349-1:2016 standard (UNI 10349-1:2016, 2016)). Reference (Mutani et al., 2020) shows how the other heat fluxes, ∅ I , ∅ t and ∅ v , are calculated.

Input data
The calculation procedure depends on the availability of input data. In the case of existing buildings, the information on the composition of building element assemblies is limited. The following primary input data are used to apply the GIS-based engineering method: -The hourly local climate conditions elaborated by Meteonorm 8.0.4.
The weather variables are the hourly external air and sky temperatures, the relative humidity, and the horizontal direct and diffuse irradiance. -The geometrical characteristics of the buildings, such as the S/V ratio, the heat loss surfaces, the glazing area that is quantified using the WWR ratio, and the heated net volume (80% of the gross volume). -The thermophysical properties of building elements, which are estimated according to the year of construction using values indicated in standards and literature (Le Guen et al., 2018;Perez, 2014;Todeschi et al., 2021). Table 7 indicates the input values used according to the year of construction: the thermal capacity of opaque components (C opaque , kJ/m 2 /K), the thermal transmittances (U, W/m 2 /K) of the wall, roof, ground slab (distinguishing between layers with and without insulation) and glass, the total solar energy transmittance of glazing (gvalue, -) and the WWR (%). These values are assumed to be representative of this area in Switzerland, where window substitution is the most common retrofitting intervention. -The operating and boundary conditions, which are defined according to the occupancy behavior. -The morphological parameters used as input are SVF and H/W. These parameters are used to quantify the heat flow rate from solar gains as a function of the urban morphology.

Output data
The heat flow components of the urban building energy balance (∅ sol , ∅ I , ∅ t , ∅ v , ∅ H and ∅ C ) and the temperatures of the three TSs (building, envelope, and glazing) are the main outputs of the engineering model.
As the model is based on GIS, the results are georeferenced and can be used to create energy maps. Energy maps can describe the distribution of energy consumption from the building scale to the neighborhood or city scale. Starting from information about the energy consumption at different urban levels, it is possible to identify critical areas and then to pilot energy efficiency policies to promote sustainable and resilient cities.
Outliers and missing values in the input data, especially in the thermal properties of the buildings, decrease the reliability of the results. A data-driven correction is applied to improve the outcome of the model.

Data-driven correction to the model
A machine learning-based method is used to define a data-driven correction with a random forest (RF) algorithm to tune the GIS-based model results. We use a data-driven model to extract scale factors to improve the accuracy of the "GIS-based engineering model". Such scale factors are defined as the ratios between the actual energy demand and the simulated one. Therefore, we train an RF algorithm (Breiman, 2001) (on the sample where we have actual measurements) to make a data-driven prediction of the ratio between the actual energy demand and the simulated one for buildings where we do not have any measured values. This correction is motivated by the fact that the building characteristics used to simulate the consumed energy are sometimes approximated in the GIS-based model, together with the fact that the model has its intrinsic accuracy. The model is trained using an initial set of 25 features extracted from climate databases, simulated energy data, building, and urban attributes. Fig. 9a depicts the relative importance of each input feature in relation to the task, extracted by means of an embedded function in the RF model implementation (Breiman et al., 1984). The most relevant variables are those that describe the geometric characteristics of the building (e.g., S/V, building footprint, heat loss surface) and the energy consumption simulated with the GIS-based model. Variables that describe the thermal properties of the building, morphological parameters, and occupancy behavior (number of people and ACH) have a medium/low impact. The HDDs are very similar in the three neighborhoods and do not have a significant impact. Finally, the features related to the properties of the transparent building envelope have no meaningful impact. Therefore, the geometrical variables have a significant impact on the prediction of the scale factors. This is due to the fact that the building database suffers from some geometric errors (e.g., in some cases, the geometries of the buildings overlap erroneously) and this in turn leads to errors in the calculation of the geometric variables of the buildings.
In a second step, the model is trained using only six of the most relevant variables: the S/V ratio, the heat loss surface, the simulated annual heating demand, the building footprint, the height, and the volume. These variables have the most significant impact on predicting the targets (i.e., the scale factor for each building). Fig. 9b shows the importance of these six inputs on the performance of the model.
The dataset composed of 451 buildings is randomly divided into training and test subsets by a ratio of 75/25. The hyperparameters of the model are tuned using K-fold cross-validation to improve the precision of the predictions. The final RF model is validated using the training Table 7 Thermophysical properties of the buildings (Perez, 2014 Fig. 9. The importance of the variables: (a) all the variables, (b) six variables.
called Out-Of-Bag (OOB) (Liaw & Wiener, 2002), and it has a mean absolute error of 15.3%, a mean squared error of 5.2%, and a root mean squared error of 22.8%. Table 8 shows the hyperparameters of the RF model. An example of the decision tree is indicated in Fig. 10. The depth of the trees in the forest is limited to three levels to show an understandable scheme. The variable (i.e., simulated energy) and the value used to split the node are indicated in the root node, where "mse" is the mean square error, "samples" is the number of data points in this node, and "value" is the prediction (in our case, the scale factor) for all the data points in this node.

Results
This section shows the main findings of the analysis. The purpose of the first part of this study was to verify the accuracy of the model used to simulate the energy demand of residential users and to improve its precision through the integration of a machine learning model. In the second part of the results, the impacts of the COVID-19 pandemic on the energy demand are described for three different scenarios.

Model verification and improvement
The "GIS-based engineering model" was designed to simulate the energy demand of a group of buildings at an urban scale. In this work, it has been applied at a building scale, and the energy demand has thus been simulated for each building, not for a group of buildings or a cluster, but with some urban variables at an urban scale (as they were not available at a building scale). The energy consumption for heating and cooling of 451 residential buildings has been simulated. Since the measured consumption has an annual temporal resolution, an annual data verification has been carried out. The results of the annual heating demand have been compared with the measured energy data according to the baseline scenario (pre-pandemic conditions).
Despite uncertainties from the input data, the developed model shows a reliable energy demand estimation. A comparison of the simulated and measured energy data shows that the GIS-based model has an average mean absolute percentage error (MAPE) of 26% (the median MAPE is 20%). The MAPE varies in the three neighborhoods. Neighborhoods 1 (34 buildings) and 2 (283 buildings) have an average MAPE of 29%, while NBH 3 (134 buildings) has a lower average MAPE equal to 18%. The NBH 3 results are more accurate than the other ones, even though the model slightly overestimates the energy uses.
A system efficiency of 0.85 has been assumed for all the buildings to calculate the energy demand from the measured energy consumption. It is possible to define different system efficiencies, depending on the year of construction of the buildings, and the average MAPE could on average be reduced by 6% (in NBH 1 the MAPE remains equal to 29%, while it can on average be reduced by 9% and 1%, respectively, in neighborhoods 2 and 3). Fig. 11 shows a comparison of the energy data expressed in kWh/ year and the frequency distribution of the MAPE in the three neighborhoods. In neighborhoods 1 and 2, 61-62% of the simulated data have a lower MAPE than 30%. More accurate results are obtained for NBH 3 , where 85% of the simulated data have a lower MAPE than 30%, and 61% of the data have a lower MAPE than 20%. With the GIS tools, the MAPE is mapped at the building level in the three neighborhoods (Fig. 12).
The scale factor, calculated as the ratio between the measured energy demand and the simulated one, is used to improve the energy simulations. This factor is calculated in two ways: -Using a constant scale factor, that is, the average value calculated over the data from the 451 buildings. -Using an ad-hoc scale factor for each building, calculated from the RF model. Fig. 13 shows the results pertaining to 113 residential buildings located in the three neighborhoods identified as the test set. This group of buildings has not been used to train the RF model. It is possible to observe that the average MAPE decreases from 26% to 23% when the constant correction factor is used. More accurate results are obtained when the RF model is applied, with an average MAPE of 16%. The GISbased model tends to overestimate the energy data for buildings that have a higher heating demand than 150,000 kWh/year, mainly because energy retrofitting interventions are not considered. This trend is less marked when the constant correction factor is used. The bias is corrected by the RF model. Therefore, it is possible, through the use of a data-driven correction based on the RF algorithm, to (i) augment the precision of the GIS-based model results (increasing the R 2 and decreasing the MAPE in Fig. 13b) and (ii) improve its accuracy by removing any potential systematic bias (see the slope of the linear regression close to 1 in Fig. 13a). Fig. 14 shows an example of an hourly profile for the heating and cooling demand for one year. These results refer to a building with a MAPE close to 0%. This building is a terrace house in NBH 3 . It was built between 1961 and 1970, and therefore has moderate thermal insulation. The annual heating demand is 142 kWh/m 2 /y (the heating season is from 7 October to 18 May), and the annual cooling demand is 8 kWh/ m 2 /y (the cooling season is from 19 May to 6 October). The maximum daily demand for heating is in January, with an energy demand of 1383 kWh/day and an average outdoor air temperature of − 1.4 • C. During the summer season, a maximum daily cooling demand of 354 kWh/day is reached with an outdoor air temperature of 28.3 • C (on 30 June).

Impacts of the COVID-19 pandemic on the energy demand
As has emerged from the results, in the S1 scenario, the annual energy demand in the three neighborhoods is 76,024 MWh/y and 5681 MWh/y for space heating and cooling, respectively. In partial lockdown conditions (S2), the energy demand increases, reaching 81,948 MWh/y (+8%) for heating and 6625 MWh/y (+17%) for cooling. The energy demand during the full lockdown (S3) increases by 13% for heating and by 28% for cooling, compared to S1. During S3, the annual heating demand is 85,753 MWh/y (+9729 MWh/y with respect to S1 and +3805 MWh/y with respect to S2), and the annual cooling demand is 7286 MWh/y (+1606 MWh/y with respect to S1 and +661 MWh/y with respect to S2). Table 9 shows the results for each scenario. What stands out in the table is that the energy demand increases more for cooling than for heating. The internal gains due to the presence of people during the heating season partially compensate for other factors that increase the use of heating. During the summer, the internal gains have an opposite effect on the cooling demand. In NBH 1 , the increase in cooling demand during the restriction measures is less marked than in the other two neighborhoods. This could depend on the year of construction of the buildings; in this zone, most of the buildings were built after the year The annual heating and cooling demand, expressed in kWh/m 2 /y, for 543 residential buildings is indicated in Fig. 15 for the three scenarios. What emerged from Table 9 is confirmed. The energy use in buildings increases during partial and full lockdown conditions. In addition, it can be observed that older buildings consume more in winter and less in summer than buildings built in recent years.
As can be seen in Fig. 15, the specific heat demand for buildings built before 1945 increases by 9.7 kWh/m 2 /y (+7%) during S2 and by 16.9 kWh/m 2 /y (+12%) during S3 (compared to S1). The increase is greater for new buildings (built after 2000) than for old ones (older buildings consume more and the energy demand increase is less noticeable). The heat demand increases by 8.1 kWh/m 2 /y (+11%) and 12.2 kWh/m 2 /y (+17%) during S2 and S3, respectively.
In the cooling season, the energy demand is higher for new buildings due to the thermal properties of the materials, which allow good thermal insulation with low inertia, but restrictive measures have a more significant impact on old buildings. The specific cooling demand for buildings built before 1945 goes from 6.6 kWh/m 2 /y (S1) to 8.1 kWh/ m 2 /y during a partial lockdown, and to 9.4 kWh/m 2 /y (S3), which is 42% more than the initial consumption. The consumption in buildings built after 2000 ranges from 21.7 kWh/m 2 /y (S1) to 23.1 kWh/m 2 /y (S2), and to 25.1 kWh/m 2 /y during a full lockdown. In this case, the cooling demand increases by 6% in S2 and by 16% in S3. These results indicate that the thermophysical properties of the building have a significant impact, not only on the energy performance but also on to what extent the COVID-19 pandemic affects the final consumption. In addition, the impact of the pandemic on the heating/cooling demand is not as marked as could be expected from the electricity consumption.
Figs. 16 shows an example of two buildings in NBH 3 built in the same period (between 1961 and 1970) but with different shapes. One is a terrace house with an S/V of 0.34 m 2 /m 3 (4 floors), and the other is a condominium with an S/V of 0.25 m 2 /m 3 (10 floors). The annual energy demand is indicated for each scenario. The energy demand for cooling is  significantly lower than that for heating. The compact building with a lower S/V (condominium) has lower consumption, and the impact of the COVID-19 pandemic is more significant in the terrace house. During the partial lockdown, the demand increases by 7-8% for heating and 18-23% for cooling. An increase from partial to full lockdown is always noted but is less marked, 4-5% for heating and 5-9% for cooling.
The hourly heating and cooling profiles for the three scenarios during the coldest/hottest week are indicated in Fig. 17. These results refer to the same building described in Figs. 14 and 16a.
As shown in Fig. 17, before the lockdown and during a partial lockdown, there are two peak demands during the 24 h, due to the changes in the indoor air temperature settings. The internal air temperature of the building is constant during the day in the full lockdown conditions (S3); it is set at 22 • C in winter and 26 • C in summer.
The energy intensity for heating is similar for the three scenarios. On weekdays, the daily demand for the three scenarios is 1121 kWh/day (S1), 1207 kWh/day (S2), and 1273 kWh/day (S3), while on the weekend, it is 1172 kWh/day (S1), 1217 kWh/day (S2) and 1290 kWh/ day (S3). The heat demand for the entire week increases by 6% under partial lockdown conditions and by 12% for full lockdown, compared to S1.
The differences are more pronounced during the hottest week. The weekday consumption without any lockdown measures is 156 kWh/day; during the weekend, it is 237 kWh/day. The cooling demand becomes 207 kWh/day (+33%) and 243 kWh/day (+2%) in the partial lockdown. With more restrictive measures (full lockdown), energy use reaches 245 kWh/day and 271 kWh/day (S3). Considering the energy use of the week, the cooling demands for the three scenarios are 1326 kWh/week (S1), 1588 kWh/week (S2), and 1838 kWh/week (S3).
The differences in the energy demand mainly depend on the occupancy behavior and the external outdoor conditions. Fig. 18 shows the annual space heating demand, expressed in kWh/ m 2 /y at the building level, for the three scenarios. The results refer to a block of buildings located in NBH 3 , in which the GIS-based model is accurate with an average MAPE of 18%. In this block of buildings, the average heating demand of these 42 residential buildings is 99 kWh/m 2 / y during S1, 108 kWh/m 2 /y during S2, and 114 kWh/m 2 /y during S3. Therefore, there is an increase of 15 kWh/m 2 /y from S1 to S3.
All together, these results provide important insights into the impacts of the COVID-19 pandemic on the energy performance of residential  buildings. The pandemic has caused an increase in the energy demand for heating and cooling. In the three analyzed neighborhoods, the energy use increased by 13% and 28% during the full lockdown for heating and cooling, respectively. The findings on the peak demand variation can be used to manage the energy system. In order to optimize the energy use of the entire system, it is fundamental to carry out these analyses at a neighborhood scale and not at a building level.

Discussion
During the COVID-19 pandemic, the lifestyle of individuals has changed drastically. Such changes have led to larger peak loads and higher average energy demand intensities in the residential sector.
Literature shows contradictory impacts of the COVID-19 pandemic on the use of energy in residential buildings, mainly when the results are based on simulations. Several studies have shown that the total energy demand increases, whereas several other studies have shown a decrease.

Table 9
Annual energy demand in the three neighborhoods for the three different scenarios. *The percentage increase in energy demand for the S1 scenario is indicated in brackets. These contradictory results are primarily due to a lack of input data, including information on the occupants' behavior in residential buildings during the pandemic. Thus, we have developed a GIS-based simulation and bias-corrected random forest method to quantify the impacts of the pandemic on the hourly energy demand for space heating and cooling in three residential neighborhoods. Detailed occupancy scenarios have been defined to improve the accuracy of the energy simulation. Since the proposed methodology is based on a bottom-up GISbased engineering model that includes a quick energy simulation process, there is no need for computationally intensive models at the building scale.
The results show to what extent the energy demand for heating and cooling has changed during the period of restrictive measures (i.e., partial and full lockdown). The impact of the pandemic on the energy use in residential buildings is influenced to a great extent by the occupancy behavior and by the thermophysical properties of the buildings.
An increase in energy demand of 15 kWh/m 2 /y for space heating and 3 kWh/m 2 /y for space cooling was observed during the full lockdown scenario. This trend may have led to an increase in CO 2 emissions and an increment in energy bills.
The results provide important information that can be used for the evaluation of the energy trends in Switzerland. According to the Swiss Federal Office of Energy, the country's electricity consumption in 2020 decreased by 2.6% (Swiss Federal Office of Energy SFOE, 2020). In addition to the effects of the lockdown, the economic trend, the weather conditions, and the increase in energy efficiency led to a reduction in energy consumption (Swiss Federal Office of Energy SFOE, 2020). The GIS-based approach presented in this study can be used to evaluate thermal consumption, when all the different aspects that affect the energy performance of buildings are considered. It can also provide more reliable information on energy trends at the urban scale than other tools at the existing state of the art. Thus, this model could be used to mitigate  The GIS-based simulation method has been developed for the residential sector. However, the model could also be applied to other sectors, such as offices, commercial, and industrial buildings, in the future. A limitation is related to the availability and accuracy of the input data. As in all energy simulation models, the accuracy of the results depends on the precision of the input data. The input data in this work includes the local climate conditions, the geometry of the buildings and the thermal properties, occupancy profiles, and morphological parameters. The thermal properties of the buildings are defined according to the year of construction. However, it is not known whether the considered buildings have undergone any energy renovation measures. It is also not feasible to update the input data as thermal capacities and thermal transmittances of the materials. This limitation could reduce the accuracy of the model . To overcome this limitation, a machine learning model was developed to improve the accuracy of the GIS-based engineering model. Starting from a limited dataset of about 550 buildings, a data-driven error correction was used to define the RF model. The precision of the GIS-based model does not depend on the urban thermal balance equations, but on the low accuracy of the input data. Therefore, the machine learning-based method has not been embedded in the GIS-based engineering model equations. The method has only been used to apply an a-posteriori, data-driven correction using the RF algorithm.
The purpose of the present work has been to show that an ML-based method can be used to correct, at a large scale, the intrinsic biases and imprecision that the GIS-based model contains, provided there is a sufficiently heterogeneous dataset for its training, thus making the simulation of the heating demand even more realistic. When the RF model was applied, the average MAPE in the energy simulation, considering the pre-pandemic conditions, was reduced by 10%. The error-corrected random forests method can be applied at the national scale, in combination with the GIS-based model, to obtain more accurate results. Although the measured energy data used for model verification may be inaccurate in a few cases, the obtained results indicate that the errorcorrected random forests model does not depend on the occupancy behavior variables. Fig. 19 depicts the relationship between the scale factor, that is, the ratio between the measured and simulated energy data and the occupancy behavior variables. There is no correlation between the mentioned variables. Therefore, the RF model can also be used to improve the results of the COVID-19 pandemic scenarios.

Conclusion
The purpose of the current study has been to quantify the impacts of the COVID-19 pandemic on the energy performance of urban neighborhoods. A GIS-based simulation and a bias-corrected random forests method have been developed to quantify the impacts of the pandemic on the hourly energy demand in three residential neighborhoods. Detailed occupancy scenarios have been defined to take into account the behavior of the residents during the pandemic. Detailed occupancy  Fig. 19. Relationship between the scale factor and: (a) internal gains; (b) the heat transfer coefficient resulting from ventilation. V. Todeschi et al. behavior significantly improves the accuracy of energy simulations. The use of heat in residential buildings in the Canton of Geneva, Switzerland, was simulated by investigating three scenarios: pre-pandemic, partial lockdown, and full lockdown.
The hourly energy demand for space heating and cooling was assessed for a large number of residential buildings. The analyzed buildings, which had different urban forms, were located in three neighborhoods and the energy data for the annual heating consumption of residential users from 1999 to 2010 were known.
A dynamic "GIS-based engineering model" was used to simulate the energy data for the three scenarios. The accuracy of the model was improved by adopting a data-driven correction that was able to predict the ratio between the measured energy demand and the simulated heating demand. It has emerged that the GIS-based model tends to overestimate the energy data for buildings that have a higher heating demand than 150,000 kWh/year. Through the application of the datadriven error correction, which uses a random forest algorithm, it was possible to improve the precision of the energy simulations during the pre-pandemic conditions.
The results regarding the energy simulations of the three scenarios indicate that the energy demand for the space heating and cooling of residential buildings tends to increase during lockdown conditions. In the energy simulations, the hours of operation of the energy system, the internal heat gains due to the presence and the activity of people in the buildings, and the heat losses due to window openings were adapted for the partial and full lockdown scenarios. During the partial lockdown, the space heating demand increased by 8% and the cooling demand by 17%. During full lockdown conditions, the energy demand increased by 13% and 28% for space heating and cooling, respectively (compared to the pre-pandemic conditions). However, these percentages differ for new and old buildings.
This work provides some useful insights into the impacts of the COVID-19 pandemic on the use of heat in buildings. The method used for the energy assessment can be applied to other residential buildings, or to other neighborhoods, districts, and cities. The findings of this study have important implications on obtaining a better understanding of the energy performance of urban neighborhoods in the case of unexpected events, such as energy price fluctuations, disruptions of the energy supply, and any possible future pandemics. The scope of this work has been to help make cities more resilient during any future pandemics. Further research should be undertaken to explore the energy trend in other sectors (such as in the commercial, industrial and educational sectors) and to apply the proposed approach at a national scale.