Community Resilience in Accessing Essential Service Facilities Considering Equity and Aging Demand: A Case of Shanghai, China

: The COVID-19 lockdown has deepened inequity among vulnerable groups, such as the elderly. Reducing inequity in access to essential service facilities is an effective way to improve community resilience in dealing with pandemics. In this research, three indexes were created to measure community resilience in accessing essential services. Speciﬁcally, we have considered the different walking capacity and different needs of the elderly and the general population. We selected Shanghai as the case for our research and analyzed the spatial patterns of both space-based and population-based essential service facilities. The Lorenz curve and the Gini coefﬁcient were used to measure the spatial equity. And, we attempted to reveal the relationships between the population density and three indexes through bivariate Local Indicators of Spatial Association. The results suggest that the Diversity Index enjoys the highest equity, followed by the Demand Accessibility Index, and the equity of the Per Capita Quantity Index is the lowest. Furthermore, the accessibility of essential services in urban areas is excellent, while in some suburban areas it is low. Our ﬁndings contribute valuable scientiﬁc insights for policy makers to strengthen community resilience and address inequities for immediate or long-term measures.


Introduction 1.Background
COVID-19 has caused heavy damage to the whole world in the past three years.In the academic world, the challenges of the COVID-19 pandemic have led us to refocus on urban planning, design, and management.It is necessary to discuss the measures implemented and find weaknesses during the pandemic in order to be more prepared for other unexpected events in the future.
During the most severe period of the pandemic, most countries adopted many restrictions on travel and activities [1], which is called "lockdown".When the virus spreads rapidly and causes serious harm to people's health, lockdowns are considered to be the most effective way to control the spread of the virus [2], but they also inevitably lead to a decline in urban functions and affect citizens' normal, daily life.During lockdown, what the government should do is minimize the adverse effects of the lockdown on people's lives and improve community resilience.Many studies give suggestions and strategies for planning more resilient communities [3], which is also the focus of this research.Many scholars have conducted research on essential services during the pandemic, but their focus is different.The focus on food access includes food security [27,28], food purchase behavior [29], and food supply chain [30], but less research has been conducted on the spatial distribution and accessibility of food stores.There have been more studies on access to health care services focusing on various groups of people with regard to race, age, disability, etc.For example, a study in Brazil [31] showed that low income and black communities in the urban periphery have less health care access.In addition, there are few studies on the spatial distribution and accessibility of delivery terminals and bank ATMs.Therefore, this study can fill the research gap in the accessibility of these essential service facilities.

Equity
Equity is another focus of our research.Recent studies show that the vulnerability of the population and built environment are two key factors that affect the resilience of communities affected by COVID-19 [32].In this paper, we analyzed the equity of community resilience in terms of residents' access to essential service facilities, especially among vulnerable communities and senior citizens, because we found that COVID-19 has deepened inequity among vulnerable groups: Firstly, due to spatial disparities of resource access, residents in communities with different locations and population densities may have different access to essential services [33].Secondly, the elderly will suffer more unfairness due to COVID-19.They are at a higher risk of contracting the virus and progressing to a life-threatening state [34].Research shows that adults over 65 years of age represent 80% of hospitalizations due to COVID-19 and have a 23-fold greater risk of death than those under 65 [35].Due to limitations in physical condition and mobility, they have more difficulties in accessing essential services.They are typically less likely to travel long distances [36].In addition, they also have some unique needs for essential services, such as a higher demand for health care resources.Thus, examining whether the elderly enjoy equal access to essential services is greatly needed.

Research Aim
Considering that our world may still face various risks of pandemics in the future, it is necessary to enhance community resilience and identify some weaknesses of urban planning and management in dealing with COVID-19.Reducing inequity will improve people's happiness and make cities more livable and harmonious, which is what this study hopes to contribute to urban research.
The objective of this study is to find weaknesses and inequity in community resilience in accessing essential services so as to find implications for policy makers.The specific purposes are to: (1) propose a method for measuring community resilience in accessing essential services; (2) identify inequities in accessing essential services between the elderly and the general population, as well as inequities in high-density and low-density areas; and (3) provide insightful suggestions for building more resilient communities in megacities.
In this paper, we have developed three criteria for equity in accessing essential services during lockdown: (1) Residents should be able to reach essential services within walking distance.During the lockdown period, people have to stay at home and many public transport services are decreased, so essential service facilities should be accessible within walking range.(2) The types of essential service facilities should be complete.The specific needs of the elderly in the community should be considered, especially in areas with high residential density for the elderly.(3) Regardless of the high or low population density of the community, the quantity of essential service facilities per capita should be balanced as much as possible.Areas with a large number of essential service facilities may also be densely populated.Due to capacity limitations in public places during lockdown, the per capita quantity of facilities needs to be balanced.
Based on these three criteria, three indexes were created to measure community resilience in accessing essential services.This paper takes Shanghai as an example to analyze the distribution equity of essential service facilities.Firstly, the spatial distribution of eight essential service facilities was demonstrated.Then, the Lorenz curve and the Gini coefficient were used to measure the spatial equity of the three indexes in terms of all residents and senior citizens.Finally, the relationships among population density and the three indexes were displayed through the Bivariate Local Indicators of Spatial Association measure.
This paper is organized into sections.Section 2 briefly introduces our study area, data, research design, and methodology.Presented in Section 3 are the results.Section 4 provides the discussion of the results.Section 5 concludes with the highlights of this study and discusses future research.

Study Area
Shanghai, located in eastern China, is the most rapidly urbanizing and developed megacity in China, with a total area of 6340.5 km 2 and a total population of 24.87 million in 2020 [37].Shanghai is divided into 16 administrative districts and numerous subdistricts.There are three Ring Roads in Shanghai: the Inner Ring Road, the Middle Ring Road, and the Outer Ring Road (Figure 1).The region within the Outer Ring Road is classified as the central urban area, with an area of 660 km 2 .The urban areas are very densely populated, while some parts of the suburbs are less densely populated (Figure 2a).
(3) Regardless of the high or low population density of the community, the quantity of essential service facilities per capita should be balanced as much as possible.Areas with a large number of essential service facilities may also be densely populated.Due to capacity limitations in public places during lockdown, the per capita quantity of facilities needs to be balanced.
Based on these three criteria, three indexes were created to measure community resilience in accessing essential services.This paper takes Shanghai as an example to analyze the distribution equity of essential service facilities.Firstly, the spatial distribution of eight essential service facilities was demonstrated.Then, the Lorenz curve and the Gini coefficient were used to measure the spatial equity of the three indexes in terms of all residents and senior citizens.Finally, the relationships among population density and the three indexes were displayed through the Bivariate Local Indicators of Spatial Association measure.
This paper is organized into sections.Section 2 briefly introduces our study area, data, research design, and methodology.Presented in Section 3 are the results.Section 4 provides the discussion of the results.Section 5 concludes with the highlights of this study and discusses future research.

Study Area
Shanghai, located in eastern China, is the most rapidly urbanizing and developed megacity in China, with a total area of 6340.5 km 2 and a total population of 24.87 million in 2020 [37].Shanghai is divided into 16 administrative districts and numerous subdistricts.There are three Ring Roads in Shanghai: the Inner Ring Road, the Middle Ring Road, and the Outer Ring Road (Figure 1).The region within the Outer Ring Road is classified as the central urban area, with an area of 660 km 2 .The urban areas are very densely populated, while some parts of the suburbs are less densely populated (Figure 2a).In addition, Shanghai has entered an aging society.The Shanghai government announced that the number of those aged over 60 was 5.82 million, or 23.4 percent of its residents, which is 4.68 percentage points higher than the national average and an 8.3 percent increase compared to 2010 [38].Adults over 65 years of age in Shanghai tend to live in urban areas or in the outer suburbs, which used to be rural areas (such as Chongming and Jinshan District) (Figure 2b), and the proportion of elderly living in new towns in suburbs (such as Jiading and Minhang District) is lower than average.and Jinshan District) (Figure 2b), and the proportion of elderly living in new towns in suburbs (such as Jiading and Minhang District) is lower than average.
Due to the high level of aging and the large difference in population density between urban and suburban areas, Shanghai was selected as the case for our research.It is of great significance to study the equity of essential service facilities' distribution and to consider the implications for community resilience in such a megacity.

Data
The population data were collected from the WorldPop-Constrained-individualcountries-2020-UN-adjusted dataset (https://hub.worldpop.org/geodata/summary?id=50346, accessed on 30 November 2020), which limiting population estimates to cells with buildings or built-up features.Then we aggregated the population data into 5425 communities in Shanghai using a resampling method.In addition, population data for those aged 65 and above were also extracted as the elderly population for comparison with the overall population in this research.The age of 65+ was chosen because research has shown that people over the age of 65 are more likely to experience health problems [39], and 65 years old is a common starting point for research involving the elderly [40].
The digital geographic data, including eight types of essential service facilities, were acquired from POIs in Gaode map, and the data have been converted into WGS1984 coordinates.

Methodological Framework
In order to comprehensively demonstrate community resilience in accessing essential service facilities from multiple perspectives, we designed a workflow.Firstly, we wanted to know how these essential service facilities are distributed spatially as a whole.Next, we took the analysis a step further, as we considered the walking capacity and demands of different populations and created three indicators to measure the accessibility of essential service facilities, which can reflect different aspects.After the indicators were Due to the high level of aging and the large difference in population density between urban and suburban areas, Shanghai was selected as the case for our research.It is of great significance to study the equity of essential service facilities' distribution and to consider the implications for community resilience in such a megacity.

Data
The population data were collected from the WorldPop-Constrained-individualcountries-2020-UN-adjusted dataset (https://hub.worldpop.org/geodata/summary?id= 50346, accessed on 30 November 2020), which limiting population estimates to cells with buildings or built-up features.Then we aggregated the population data into 5425 communities in Shanghai using a resampling method.In addition, population data for those aged 65 and above were also extracted as the elderly population for comparison with the overall population in this research.The age of 65+ was chosen because research has shown that people over the age of 65 are more likely to experience health problems [39], and 65 years old is a common starting point for research involving the elderly [40].
The digital geographic data, including eight types of essential service facilities, were acquired from POIs in Gaode map, and the data have been converted into WGS1984 coordinates.

Methodological Framework
In order to comprehensively demonstrate community resilience in accessing essential service facilities from multiple perspectives, we designed a workflow.Firstly, we wanted to know how these essential service facilities are distributed spatially as a whole.Next, we took the analysis a step further, as we considered the walking capacity and demands of different populations and created three indicators to measure the accessibility of essential service facilities, which can reflect different aspects.After the indicators were calculated, we wanted to know whether the accessibility of essential service facilities for the elderly and the general public is equal in these three indicators.Therefore, we referred to the methods of measuring equity from the literature and finally chose the Lorenz curve and the Gini coefficient to measure it.In the last step, in order to guide urban planning practice, we needed a spatial perspective again.We wanted to understand the relationship between population density and the three indicators.Areas with high population density and low community resilience deserve the most attention, as they are the weakest areas of the city.We sketched the above workflow as a methodological framework (Figure 3), which includes 5 main steps: 1. Measuring the spatial distribution of eight types of essential service facilities.
(1) Measuring the spatial distribution of points through the Nearest Neighbor Index (space-based).(2) Spatial cluster and spatial outlier analysis of per capita quantity of essential service facilities in community units (population-based).the elderly and the general public is equal in these three indicators.Therefore, we referred to the methods of measuring equity from the literature and finally chose the Lorenz curve and the Gini coefficient to measure it.In the last step, in order to guide urban planning practice, we needed a spatial perspective again.We wanted to understand the relationship between population density and the three indicators.Areas with high population density and low community resilience deserve the most attention, as they are the weakest areas of the city.We sketched the above workflow as a methodological framework (Figure 3), which includes 5 main steps: 1. Measuring the spatial distribution of eight types of essential service facilities.
(1) Measuring the spatial distribution of points through the Nearest Neighbor Index (space-based).(2) Spatial cluster and spatial outlier analysis of per capita quantity of essential service facilities in community units (population-based).The following sections give details on each of these steps.The following sections give details on each of these steps.

Spatial Distribution Characteristics of 8 Types of Facilities 2.4.1. The Nearest Neighbor Index
The Nearest Neighbor Index is an indicator widely used in many studies to measure the levels of spatial clustering in a set of points [41,42].Firstly, the distance from each point to its nearest neighbor point was calculated.Then, the average of such distances was compared to a theoretically estimated average nearest neighbor distance for the point set if the point set is randomly distributed.In mathematical terms, the Nearest Neighbor Index is equal to observed distances divided by expected distances.If the value equals 1, it means the observed point set is randomly distributed.If the value is less than 1, it indicates the pattern exhibits clustering.Conversely, if this value is greater than 1, it means the distribution of points is discrete [43].

Local Indicators of Spatial Association
The Nearest Neighbor Index tells us whether the data are clustered or discrete in space.However, this method cannot distinguish localized clustering patterns, which are more useful for decision making and policy implications [44].Therefore, the Local Indicators of Spatial Association (LISA) was used to explore localized heterogeneities of the distribution of essential service facilities.
LISA was developed by Anselin [45].It measures local spatial autocorrelation and evaluates the existence of local clusters of similar behavior in the spatial arrangement of a given variable.
Univariate LISA measures the correlation of neighborhood values around a specific spatial location.It can identify localized statistically significant (p = 0.05, CI = 95%) clustering of four types: In our research, it is obvious that the density of essential service facilities in the urban area is high, while the density in the suburbs is low.However, during lockdown, the capacity of various essential service facilities is limited due to the consideration of social distancing.Although the density of facilities in urban areas is high, the population is also large.Therefore, in this paper, we measured the spatial distribution of the per capita quantity of essential service facilities in each community.
The univariate LISA is given as: where x represents the per capita quantity of essential service facilities within each community, i is the candidate community for which I i is being calculated, j represents different neighboring communities, x is the mean of x, n is the total number of communities (5425 in our case), and w ij is the spatial weight matrix (it defines a neighborhood for each community, which is further used for the measurements of spatial autocorrelation).In our case, w ij was generated using Queen's contiguity method to quantify the spatial proximity between communities [46], which defines neighbors as spatial units sharing a common boundary of non-zero length.
The spatial cluster and spatial outlier analysis were generated from the ArcGIS 10.4 environment.

Measurement of Community Resilience in Accessing Essential Service Facilities through Three Indexes
Accessibility generally includes the dimensions of proximity, availability, acceptability, affordability, adequacy, and awareness [47].The measurement in our case was based on proximity, which is a necessary component for access to essential services that provides insight into the resilience of a community.
The differences in community area caused some inconvenience for measurement.In the city center, the community size is small, and people living in one community can easily access nearby communities for essential service facilities, while in the suburbs, the community area is too large to reach nearby communities by walking.Therefore, for the accuracy of the calculation, the raster data for Shanghai were established at the size of a 300 m × 300 m grid to estimate the three indexes.
We mainly chose this unit size based on the considerations of data availability and computing efficiency.The 300 m × 300 m grid is about the same size as many communities in the urban center, and this scale enabled us to detect the heterogeneity of small units but minimized the computing burdens of finer scales.Therefore, the population layer was rescaled to 300 m × 300 m grid maps using a resampling method in the ArcGIS 10.4 environment.

The Walking Range Area for the Elderly and the General Population
During lockdown, people's activities are limited, and many public transport services are also decreased.Therefore, walking is the most available option for essential travels.In this paper, we mainly considered the ability to obtain various essential service facilities within walking range.
Due to poor physical strength in the elderly, the acceptable walking range is smaller than that of the general population.For each grid, we set different buffer zones for the general population and for senior citizens.
We assumed that 15 min is the maximum acceptable walking time [48].Based on the walking speed of 1.4 m/s for a general individual [49] and 1.1 m/s for the elderly [50], the walking distance of 15 min is 1260 m and 990 m, respectively.We set the buffer distance based on the maximum walking distance of different groups of vertices at the edge of each grid (Figure 4).For the general population, the buffer zone distance is 600 m (Figure 4a), while, for elderly, the buffer zone distance is 400 m (Figure 4b).We assumed that all essential service facilities within this range are reachable.The following three indexes for measuring the ability to obtain essential service facilities were calculated within these two buffer ranges, respectively.

Three Indexes
Accessibility generally includes the dimensions of proximity, availability, acceptability, affordability, adequacy, and awareness [47].The measurement in our case was based on proximity, which is a necessary component for access to essential services that provides insight into the resilience of a community.
The differences in community area caused some inconvenience for measurement.In the city center, the community size is small, and people living in one community can easily access nearby communities for essential service facilities, while in the suburbs, the community area is too large to reach nearby communities by walking.Therefore, for the accuracy of the calculation, the raster data for Shanghai were established at the size of a 300 m × 300 m grid to estimate the three indexes.
We mainly chose this unit size based on the considerations of data availability and computing efficiency.The 300 m × 300 m grid is about the same size as many communities in the urban center, and this scale enabled us to detect the heterogeneity of small units but minimized the computing burdens of finer scales.Therefore, the population layer was rescaled to 300 m × 300 m grid maps using a resampling method in the ArcGIS 10.4 environment.

The Walking Range Area for the Elderly and the General Population
During lockdown, people's activities are limited, and many public transport services are also decreased.Therefore, walking is the most available option for essential travels.In this paper, we mainly considered the ability to obtain various essential service facilities within walking range.
Due to poor physical strength in the elderly, the acceptable walking range is smaller than that of the general population.For each grid, we set different buffer zones for the general population and for senior citizens.
We assumed that 15 min is the maximum acceptable walking time [48].Based on the walking speed of 1.4 m/s for a general individual [49] and 1.1 m/s for the elderly [50], the walking distance of 15 min is 1260 m and 990 m, respectively.We set the buffer distance based on the maximum walking distance of different groups of vertices at the edge of each grid (Figure 4).For the general population, the buffer zone distance is 600 m (Figure 4a), while, for elderly, the buffer zone distance is 400 m (Figure 4b).We assumed that all essential service facilities within this range are reachable.The following three indexes for measuring the ability to obtain essential service facilities were calculated within these two buffer ranges, respectively.

Demand Accessibility Index
The first index is the Demand Accessibility Index.Although we assumed that the services in the buffer zone are accessible to the residents in the grid, people have different needs and preferences for service facilities.We employed an online questionnaire survey in March 2020 to characterize the travel demands and frequencies of different groups in Shanghai during lockdown.The survey covered 1540 respondents (9.4% > 65 years old).Respondents reported the purposes of essential travels (commuting/shopping/seeing a doctor/picking up packages/throwing away garbage/taking care of elders/other), the purchasing choice for food and daily necessities (shopping at a physical store/online), pref-erences for shopping places (supermarket/convenience store/food market/greengrocery), as well as the number of times per week that they generally go out.
Although the sample size of the elderly population is relatively small (mainly because this is an online survey, and the proportion of the elderly accessing the Internet is relatively low), the survey results can reflect certain trends.Based on the survey results and some existing studies [51][52][53][54], there are many differences in demands and preferences between the elderly and the general population.In terms of purchasing food, senior citizens prefer cheap and fresh food, so they prefer to go to food markets rather than supermarkets and convenience stores [55].Due to being more vulnerable to health issues, elderly people have a higher demand for hospitals and pharmacies [56].In addition, express delivery and smartphone payment services are currently developing rapidly in China [57].Young people prefer online shopping and smartphone payments, but the elderly are still accustomed to shopping in physical stores and pay with cash due to their inability to master the use of the Internet and smartphones [58].Therefore, senior citizens have a lower demand for express delivery services and a higher demand for bank ATMs.
In this research, the weighted value was applied to calculate the Demand Accessibility Index (see Table 1).The determination of the weights (totaling up to 1) comes from our previous survey data, and it also refers to some previous research [59,60].The calculation method for the Demand Accessibility Index of a grid is to multiply the quantity of each essential service facility in the buffer zone of each grid by its weight and then sum it up.

Diversity Index
As Jacobs [61] commented, fine-grained mixing of diverse uses creates vibrant and successful neighborhoods.The Shannon information entropy is the most widely used diversity index to measure diversity in the distribution of land use types [62].In this paper, Shannon entropy was applied to measure the Diversity Index of essential service facilities in each buffer zone, which is calculated using the following formula: where H(X) represents the diversity of essential service facilities within the buffer zone of each grid.X represents the number of essential service facility types.In this paper, it mainly includes eight facility types: supermarkets, convenience stores, food markets, greengroceries, hospitals, pharmacies, delivery terminals, and ATMs.p(x) refers to the proportion of the xth types of facilities in each buffer zone.Due to the different buffer areas between the elderly and the general population, this index was calculated separately for these two groups.

Per Capita Quantity Index
The two indexes mentioned above are not related to the population, while the Per Capita Quantity Index is related to population size.This index is calculated by dividing the quantity of essential service facilities in each grid's buffer by the population in the grid, which reflects the intensity of facility usage.As mentioned above, due to restrictions on people's social distance during lockdown, the capacity of each service facility is also limited, so it is necessary to measure the quantity of facilities per capita.
The LISA analysis introduced in Section 2.4.2 measures the per capita level of essential service facilities based on the community, while the Per Capita Quantity Index was calculated based on the buffer zone of each grid.Of course, it was also calculated separately for all residents and the elderly.

Min-Max Normalization of the Data
Because the measurement unit of each index is different, a minimum-maximum normalization approach was adopted to convert the data into dimensionless values between 0 and 1.The higher the value of the three indexes, the higher the resilience of the community; as such, the minimum-maximum normalization was based on the following equation: where z is the normalized value between 0 and 1, x is the original value, x max is the maximum for a specific index, and x min is the minimum value for a specific index.

Equity Assessment
In order to assess equity, we resorted to Lorenz curves, which allowed us to visualize and quantify the fairness of the three indexes among residents in different grids.In economics, the Lorenz curve is widely used for measuring income or wealth inequality, and it shows the relationship between the population (%) and wealth (%) [63].Now, it has been applied to a range of disciplines to show the equity of resources among populations [64][65][66].
In our study, the Lorenz curve was used to indicate the relationship between the indexes and the population.Then, the Gini coefficient was calculated to quantify the spatial equity.
The Gini coefficient, which was developed based on the Lorenz curve, was calculated using the following formula [64]: where P k is the accumulative percentage of the grid population and R k is the accumulative percentage of the index.The Gini coefficient ranges from 0 to 1, where 0 means complete equity and 1 denotes complete inequity.A lower Gini coefficient indicates a more equal distribution of that index.A study suggested that a Gini value under 0.2 denotes low inequity, whereas a value between 0.2 and 0.5 indicates medium inequity, and a value above 0.5 is considered high inequity [64].In some studies, 0.4 is considered a warning line of inequity [67].

Bivariate LISA
In Section 2.4.2, we introduced univariate LISA.In this part, bivariate LISA was used to analyze the association between population density and community resilience.
The bivariate LISA is as presented below: where x represents the population density within each grid, y is the index of each grid, i is the candidate grid for which I i is being calculated, j represents different neighboring grids, x is the mean of x, y is the mean of y, n is the total number of grids, and w ij is the spatial weight matrix, which was generated using Queen's contiguity method.Through the bivariate LISA method, the spatial cluster and spatial outliers can be detected.The "high-high" clusters (population density and index value are both high) and "low-low" clusters (population density and index value are both low) indicate a significant positive spatial correlation between the population density and the index value.Furthermore, spatial outliers contain the "high-low" outliers (high population density in low corresponding index value surroundings) and "low-high" outliers (low population density in high corresponding index value surroundings).
To visualize the local spatial correlation between population density and the three indexes, the bivariate LISA agglomeration map was draw using the GeoDA software (version 1.20), and the differences between the elderly and the general population were analyzed separately.

The Nearest Neighbor Index of the Eight Essential Service Facilities
From Table 2, it is obvious that all of the Nearest Neighbor Index values are less than 1, which means the spatial distribution patterns of these eight essential service facilities are all clustering.The smaller the Nearest Neighbor Index, the higher the degree of aggregation.Therefore, the ATMs are the most densely distributed, while hospitals are more evenly distributed compared to other essential facilities.The results of the Cluster and Outlier Analysis of the per capita quantity of essential service facilities in each community are shown in Figure 5.As for supermarkets, most of the "low-low" clusters are located in the urban center.For convenience stores, the "high-high" clusters and the "low-high" outliers are both distributed in urban areas.For food markets, the "high-high" clusters are scattered in urban areas.For greengroceries, the "high-high" clusters and the "low-high" outliers are distributed in some parts within the Middle Ring Road and the Outer Ring Road.For hospitals, the "high-high" clusters and the "low-high" outliers are distributed in the outer suburbs, mainly because there are many health clinics in the outer suburbs and the population is small, so it is prone to high values in per capita terms.For pharmacies, the "low-low" cluster and the "high-low" outliers are mainly located within the Inner Ring Road.For delivery terminals, the "low-high" outliers mainly appear in Chongming District, Pudong District, and Fengxian District.For ATMs, the "high-high" clusters are mostly located within the Inner Ring Road, especially in the Lujiazui region, which is the financial center of Shanghai.many health clinics in the outer suburbs and the population is small, so it is prone to high values in per capita terms.For pharmacies, the "low-low" cluster and the "high-low" outliers are mainly located within the Inner Ring Road.For delivery terminals, the "lowhigh" outliers mainly appear in Chongming District, Pudong District, and Fengxian District.For ATMs, the "high-high" clusters are mostly located within the Inner Ring Road, especially in the Lujiazui region, which is the financial center of Shanghai.In addition, the distribution of hospitals is worth mentioning.Medical services are crucial during a pandemic.Although our results show that the per capita quantity of hospital resources is more abundant in suburban areas, in fact, people in the outer suburbs do not necessarily choose to go to the nearest hospital when they need medical services.In China, the government is establishing a three-level medical system, which intends to provide primary care in community clinics, secondary care in district hospitals (known as secondary hospitals), and tertiary care in tertiary hospitals [68].But, Chinese patients often choose to go to a high-level hospital directly, especially a tertiary hospital, even for simple health care needs.Tertiary hospitals are mainly distributed in urban areas, which are often crowded and overutilized.While the hospitals in the outer suburbs are mainly community clinics, they are always experiencing noticeable idle time.How to guide people to choose medical services based on their needs is also an issue that policy makers need to consider.6 shows the Demand Accessibility Index values for all residents and for the elderly.Overall, only the regions within the Inner Ring have a higher Demand Accessibility Index.In the urban area, the Demand Accessibility Index for all residents is higher than that for seniors.Meanwhile, in the suburban areas, the Demand Accessibility Index of the elderly in some grids is higher than that for all residents.The reason for this phenomenon is that in some places in the suburbs, which used to be the rural areas of Shanghai, there are fewer essential service facilities catering to the fast-paced life of young people, such as convenience stores and delivery terminals, but there are more essential service facilities catering to the elderly.The calculation of this index is related to the weights of demands; thus, the Demand Accessibility Index of the elderly is higher in some parts of the suburbs.
ten choose to go to a high-level hospital directly, especially a tertiary hospital, even for simple health care needs.Tertiary hospitals are mainly distributed in urban areas, which are often crowded and overutilized.While the hospitals in the outer suburbs are mainly community clinics, they are always experiencing noticeable idle time.How to guide people to choose medical services based on their needs is also an issue that policy makers need to consider.

Demand Accessibility Index
Figure 6 shows the Demand Accessibility Index values for all residents and for the elderly.Overall, only the regions within the Inner Ring have a higher Demand Accessibility Index.In the urban area, the Demand Accessibility Index for all residents is higher than that for seniors.Meanwhile, in the suburban areas, the Demand Accessibility Index of the elderly in some grids is higher than that for all residents.The reason for this phenomenon is that in some places in the suburbs, which used to be the rural areas of Shanghai, there are fewer essential service facilities catering to the fast-paced life of young people, such as convenience stores and delivery terminals, but there are more essential service facilities catering to the elderly.The calculation of this index is related to the weights of demands; thus, the Demand Accessibility Index of the elderly is higher in some parts of the suburbs.

Diversity Index
The Diversity index represents the composition of essential service facility types in the buffer zone of each grid.The larger the Diversity Index, the more types of facilities.In Figure 7, the distribution of the Diversity Index is relatively balanced.In addition to the high value in urban areas, the Diversity Index in many suburban areas is also high, with

Diversity Index
The Diversity index represents the composition of essential service facility types in the buffer zone of each grid.The larger the Diversity Index, the more types of facilities.In Figure 7, the distribution of the Diversity Index is relatively balanced.In addition to the high value in urban areas, the Diversity Index in many suburban areas is also high, with some areas even showing the same value as that in the city center.As for the comparison between all residents and the elderly, in general, the Diversity Index of all residents is higher than that of the elderly, which indicates that a larger buffer area also means a richer variety of essential service facilities.

Per Capita Quantity Index
The Per Capita Quantity Index is calculated by dividing the quantity of facilities in each buffer by the population of the grid (for the elderly, the population is calculated using the number of elderly aged 65+ in the grid).Therefore, unlike the previous two indexes, this index value is not very high for residents living in urban areas, mainly due to the high population density in urban areas (Figure 8).Meanwhile, in some centers in the suburbs, the Per Capita Quantity Index is high.some areas even showing the same value as that in the city center.As for the comparison between all residents and the elderly, in general, the Diversity Index of all residents is higher than that of the elderly, which indicates that a larger buffer area also means a richer variety of essential service facilities.

Per Capita Quantity Index
The Per Capita Quantity Index is calculated by dividing the quantity of facilities in each buffer by the population of the grid (for the elderly, the population is calculated using the number of elderly aged 65+ in the grid).Therefore, unlike the previous two indexes, this index value is not very high for residents living in urban areas, mainly due to the high population density in urban areas (Figure 8).Meanwhile, in some centers in the suburbs, the Per Capita Quantity Index is high.

Per Capita Quantity Index
The Per Capita Quantity Index is calculated by dividing the quantity of facilities in each buffer by the population of the grid (for the elderly, the population is calculated using the number of elderly aged 65+ in the grid).Therefore, unlike the previous two indexes, this index value is not very high for residents living in urban areas, mainly due to the high population density in urban areas (Figure 8).Meanwhile, in some centers in the suburbs, the Per Capita Quantity Index is high.

Spatial Equity of Essential Service Facilities
The Lorenz curves for the three indexes were drawn to show the equity of essential service facilities, and they are divided for all residents and for senior citizens (Figure 9).The Gini coefficients are shown in Table 3.
The results are summarized as follows.
Firstly, the greatest inequity lies in the Per Capita Quantity Index, as the Gini coefficients are 0.649 for all and 0.622 for the elderly.While the Diversity Index enjoys the best equity, the Gini coefficients are 0.200 for all and 0.224 for the elderly.The Gini coefficients of the Demand Accessibility Index are 0.478 for all and 0.456 for the elderly.We can see that the Gini coefficients of the Demand Accessibility Index and the Per Capita Quantity Index all exceeded 0.4, which is the warning line of inequity.
Then, let us focus on the differences between all individuals and the senior citizens in these three indexes.As for the Demand Accessibility Index and the Per Capita Quantity Index, the Gini coefficients of the senior citizens are both lower than those of all residents, which indicates that the distribution of essential service facilities is fairer to the elderly in terms of these two indexes.But, from a diversity perspective, the Gini coefficient means the elderly experience more inequity.

Spatial Equity of Essential Service Facilities
The Lorenz curves for the three indexes were drawn to show the equity of essential service facilities, and they are divided for all residents and for senior citizens (Figure 9).The Gini coefficients are shown in Table 3.The results are summarized as follows.
Firstly, the greatest inequity lies in the Per Capita Quantity Index, as the Gini coefficients are 0.649 for all and 0.622 for the elderly.While the Diversity Index enjoys the best equity, the Gini coefficients are 0.200 for all and 0.224 for the elderly.The Gini coefficients of the Demand Accessibility Index are 0.478 for all and 0.456 for the elderly.We can see that the Gini coefficients of the Demand Accessibility Index and the Per Capita Quantity Index all exceeded 0.4, which is the warning line of inequity.
Then, let us focus on the differences between all individuals and the senior citizens in these three indexes.As for the Demand Accessibility Index and the Per Capita Quantity Index, the Gini coefficients of the senior citizens are both lower than those of all residents, which indicates that the distribution of essential service facilities is fairer to the elderly in terms of these two indexes.But, from a diversity perspective, the Gini coefficient means the elderly experience more inequity.

Spatial Correlations between Population Density and Three Indexes
The bivariate LISA map displays four types of spatial correlations between population density and three indexes (Figure 10).There are some findings in the clustering pattern between population density and each of the three indexes.
(1) High-High (HH) areas are mainly concentrated in the urban area.The difference is that the HH area for population density and the Diversity Index occupies a larger area, while the HH area for population density and the Per Capita Quantity Index occupies a smaller area.Although the Per Capita Quantity Index in the urban center is slightly weak, overall, the urban area enjoys strong community resilience in accessing essential service facilities.
(2) Low-Low (LL) areas are mainly distributed in the suburbs, especially in Chongming District, Qingpu District, Fengxian District, and Pudong New District.The LL areas for senior citizens' density and the Diversity Index (Figure 10d) are slightly different from others', with a more scattered distribution.Because the population density and community resilience in those areas are both low, the government should consider setting up some temporary essential service points near the residential centers in those areas, which can be activated when lockdown is necessary due to various emergency issues.

Spatial Correlations between Population Density and Three Indexes
The bivariate LISA map displays four types of spatial correlations between population density and three indexes (Figure 10).There are some findings in the clustering pattern between population density and each of the three indexes.(1) High-High (HH) areas are mainly concentrated in the urban area.The difference is that the HH area for population density and the Diversity Index occupies a larger area, while the HH area for population density and the Per Capita Quantity Index occupies a smaller area.Although the Per Capita Quantity Index in the urban center is slightly weak, (3) Low-High (LH) areas are scattered in the periphery of the urban center and the suburbs.In LH areas, the population density is low, but the neighboring indexes are high, which indicates a high community resilience.We could see that the quantity of LH areas is relatively lower, especially for population density and the Demand Accessibility Index (Figure 10a,b).
(4) High-Low (HL) areas are the areas that should be paid the most attention by governments and policy makers.The population density in these areas is high, but the accessibility of essential service facilities is limited.The quantity of these areas is not high, but the distribution is scattered, including the northern edge of Baoshan District, the northern edge of Pudong New District, Anting Community, Nanxiang Community, Xujing Community, Xinzhuang Community, Sanlin Community, Kangqiao Community, Jinshanwei Community, Lingang Community, and so on.

Discussion
In this research, we designed a workflow to demonstrate community resilience in accessing essential service facilities from multiple perspectives.We classified the essential services and the corresponding facilities.And, we analyzed the spatial patterns of both space-based and population-based essential service facilities.The results (Section 3.1) show that the spatial distribution patterns of these eight essential service facilities are all clustering.The results are reasonable because almost all cities have a dense distribution of services in the city center and a low distribution density of services in the suburbs, which is related to population density and economic activity.Under normal conditions, people can get services by driving cars or taking public transport to further places.But, during lockdown, people's activities are restricted, and further travel will greatly increase the risk of infection.Therefore, we should consider whether these essential services can be obtained within walking distance of residential areas, and we should also consider fairness for vulnerable groups.
Based on the above considerations, we created three indexes to measure community resilience in accessing essential services.And, the Lorenz curve and the Gini coefficient were used to measure the spatial equity of the three indexes.The results (Section 3.3) suggest that the equity level is significantly different among the three indexes.The Diversity Index enjoys the highest equity, followed by the Demand Accessibility Index, and the equity of the Per Capita Quantity Index is the lowest.Shanghai is a diverse and highly commercialized city, so the types of essential service facilities are relatively balanced.However, due to the different population densities between urban centers and suburbs, there is great inequity in terms of the per capita quantity of service facilities.Fortunately, for the senior citizens, the distributions of the Demand Accessibility Index and the Per Capita Quantity Index are fairer compared to all individuals, indicating that Shanghai, as an aging city, is relatively friendly in terms of essential service facilities and demands for the elderly.These findings suggest that the diversity of essential service facilities in Shanghai is sufficient, but more consideration should be given to improving fairness in terms of per capita facilities and the demands of different groups.
Finally, we attempted to reveal the relationships between the population density and three indexes (Section 3.4) so as to identify areas with low community resilience that require special attention.From the spatial correlations between population density and the three indexes shown in the bivariate LISA map, it can be seen that the urban area enjoys better community resilience in accessing essential service facilities.In some communities with low resilience in accessing essential service facilities (especially the HL areas), governments and policy makers may consider setting up some temporary service facilities near the residential centers and providing volunteer delivery services and elderly care services for senior citizens.

Conclusions
Strengthening community resilience in cities is urgently needed in this post-COVID-19 era.Reducing inequity in accessing essential service facilities is considered an effective way to improve community resilience in dealing with pandemics and to improve the livelihoods of all populations.Although this paper takes Shanghai as a case study, the proposed indexes and methodological framework can be used for analysis and comparison in other regions of the world.And, the results can also provide some insights for policy makers and other scholars.
The highlights of this research are summarized below: (1) We have considered the equity of community resilience in accessing essential services during lockdown and proposed criteria and three indexes, which provides a new direction for community resilience that is different from previous studies on disasters and is beneficial for improving the wellbeing of community residents.
(2) We have paid close attention to the demands of the elderly, with the consideration that the accessibility of essential services during lockdown is of great significance to their health and life quality.
(3) The Lorenz curve and the Gini coefficient were adopted to measure equity in the accessibility of essential service facilities, which is an innovative application of interdisciplinary methods.
(4) We applied univariate LISA and bivariate LISA to identify the spatial clusters and spatial outliers of facilities and indicators, which can provide a focus for action for policy makers to improve community resilience and address inequities for immediate or long-term measures.Identifying the mismatch between population and essential services, especially for vulnerable groups in cities, will greatly help policy makers optimize the allocation of resources in dealing with emergencies.
A few issues should be addressed in future studies.First, in terms of equity, this paper only considers the elderly as a vulnerable group.In fact, there are many other vulnerable groups, such as low-income individuals, people with chronic illnesses, disabled individuals, and homeless individuals.In future research, these vulnerable groups should also be considered.Second, as mentioned in Section 2.5, accessibility includes multiple dimensions, and while this paper only measures accessibility from the perspective of proximity, other dimensions need to be further explored in the future.Finally, during lockdown, there were capacity restrictions in public places.This paper considered the per capita quantity of essential service facilities but did not further limit the number of people allowed to enter the facilities.In the future, this approach can be combined with epidemiological research to conduct accessibility studies based on the maximum number of people allowed to enter each type of essential service facility in order to determine whether the spatial distribution of essential service facilities is reasonable, which will be more helpful for controlling the spread of the pandemic and assisting policy makers in resource allocation decisions.

Figure 2 .
Figure 2. (a) Population density distribution in Shanghai.(b) Population density distribution of the elderly over 65 years old in Shanghai (the values are presented as quantile ranges).

Figure 2 .
Figure 2. (a) Population density distribution in Shanghai.(b) Population density distribution of the elderly over 65 years old in Shanghai (the values are presented as quantile ranges).

2 .
Establishing three indexes to analyze the ability of the elderly and the general population to access essential service facilities.3. Measuring the equity between the elderly and the general population in these three indexes through the Lorenz curve and the Gini coefficient.4. Exploring spatial correlations between population density and three indexes using the Bivariate Local Indicators of Spatial Association measure.5. Discussing implications for policy makers to improve community resilience and address inequities.

2 .
Establishing three indexes to analyze the ability of the elderly and the general population to access essential service facilities.3. Measuring the equity between the elderly and the general population in these three indexes through the Lorenz curve and the Gini coefficient.4. Exploring spatial correlations between population density and three indexes using the Bivariate Local Indicators of Spatial Association measure.5. Discussing implications for policy makers to improve community resilience and address inequities.

Figure 3 .
Figure 3. Methodological framework of this research.Figure 3. Methodological framework of this research.

Figure 3 .
Figure 3. Methodological framework of this research.Figure 3. Methodological framework of this research.

•
Hot Spots: Locations with high values and similar neighbors (High-High clusters); • Cold Spots: Locations with low values and similar neighbors (Low-Low clusters); • Spatial Outliers: Locations with high values but with low-value neighbors (High-Low outliers) and locations with low values but with high values of neighbors (Low-High outliers).

Figure 4 .
Figure 4. Buffer area for each grid: (a) for the general population; (b) for senior citizens.Figure 4. Buffer area for each grid: (a) for the general population; (b) for senior citizens.

Figure 4 .
Figure 4. Buffer area for each grid: (a) for the general population; (b) for senior citizens.Figure 4. Buffer area for each grid: (a) for the general population; (b) for senior citizens.

Figure 5 .
Figure 5.The Cluster Analysis and Outlier Analysis of eight essential service facilities.Figure 5.The Cluster Analysis and Outlier Analysis of eight essential service facilities.

Figure 5 .
Figure 5.The Cluster Analysis and Outlier Analysis of eight essential service facilities.Figure 5.The Cluster Analysis and Outlier Analysis of eight essential service facilities.

Figure 6 .
Figure 6.Demand Accessibility Index distribution: (a) for all; (b) for the elderly.

Figure 6 .
Figure 6.Demand Accessibility Index distribution: (a) for all; (b) for the elderly.

Figure 7 .
Figure 7. Diversity Index distribution: (a) for all; (b) for the elderly.

Figure 7 .
Figure 7. Diversity Index distribution: (a) for all; (b) for the elderly.

Figure 7 .
Figure 7. Diversity Index distribution: (a) for all; (b) for the elderly.

Figure 8 .
Figure 8. Per Capita Quantity Index distribution: (a) for all; (b) for the elderly.

Figure 8 .
Figure 8. Per Capita Quantity Index distribution: (a) for all; (b) for the elderly.

Figure 9 .
Figure 9.The Lorenz curves for the three indexes (the dash line represents perfect equity): (a) for the Demand Accessibility Index; (b) for the Diversity Index; (c) for the Per Capita Quantity Index.

Figure 9 .
Figure 9.The Lorenz curves for the three indexes (the dash line represents perfect equity): (a) for the Demand Accessibility Index; (b) for the Diversity Index; (c) for the Per Capita Quantity Index.

Figure 10 .
Figure 10.The bivariate LISA maps.(a) Spatial correlations between population density and the Demand Accessibility Index; (b) spatial correlations between elderly population density and the Demand Accessibility Index; (c) spatial correlations between population density and the Diversity Index; (d) spatial correlations between elderly population density and the Diversity Index; (e) spatial correlations between population density and the Per Capita Quantity Index; (f) spatial correlations between elderly population density and the Per Capita Quantity Index.

Figure 10 .
Figure 10.The bivariate LISA maps.(a) Spatial correlations between population density and the Demand Accessibility Index; (b) spatial correlations between elderly population density and the Demand Accessibility Index; (c) spatial correlations between population density and the Diversity Index; (d) spatial correlations between elderly population density and the Diversity Index; (e) spatial correlations between population density and the Per Capita Quantity Index; (f) spatial correlations between elderly population density and the Per Capita Quantity Index.

Table 1 .
Weights in the calculation of the Demand Accessibility Index.

Table 2 .
Spatial distribution of eight essential service facilities.