Quantiﬁcation of Spatial Association between Commercial and Residential Spaces in Beijing Using Urban Big Data

: Commercial and residential spaces are two core types of geographical objects in urban areas. However, these two types of spaces are not independent of each other. Spatial associations exist between them, and a thorough understanding of this spatial association is of great signiﬁcance for improving the efﬁciency of urban spatial allocation and realizing scientiﬁc spatial planning and governance. Thus, in this paper, the spatial association between commercial and residential spaces in Beijing is quantiﬁed with GIS spatial analysis of the average nearest neighbor distance, kernel density, spatial correlation, and honeycomb grid analysis. Point-of-interest (POI) big data of the commercial and residential spaces is used in the quantiﬁcation since this big data represents a comprehensive sampling of these two spaces. The results show that the spatial distributions of commercial and residential spaces are highly correlated, maintaining a relatively close consumption spatial association. However, the degrees of association between different commercial formats and residential spaces vary, presenting the spatial association characteristics of “integration of daily consumption and separation of nondaily consumption”. The commercial formats of catering services, recreation and leisure services, specialty stores, and agricultural markets are strongly associated with the residential spaces. However, the development of frequently used commercial formats of daily consumption such as living services, convenience stores, and supermarkets appears to lag behind the development of residential spaces. In addition, large-scale comprehensive and specialized commercial formats such as shopping malls, home appliances and electronics stores, and home building materials markets are lagging behind the residential spaces over a wide range. This paper is expected to provide development suggestions for the transformation of urban commercial and residential spaces and the construction of “people-oriented” smart cities.


Introduction
As one of the most important types of places for human activities, urban spaces are composed of various subfunctional spaces. Of these functional spaces, commercial and residential spaces are the two most active and core components of urban spaces, and they. have been a focus of urban geography research [1,2]. Along with economic and social development, commercial and residential spaces have gradually become two closely related physical spaces among urban functional spaces, with the characteristics of causal symbiosis, spatial dependence, and close association [3,4]. Thus, research on the spatial structure of commercial and residential spaces and their association can not only effectively explore the organization mode and mechanism of urban commercial and residential spaces, but also help to optimize the organization structure of urban spaces, to improve the allocation efficiency of urban spaces, and to realize scientific spatial planning and governance [5].
Currently, with the scale of urban built-up areas expanding from large cities to megacities, the number of urban populations increasing from millions to tens of millions, and the spaces, who goes first in the accelerated development of suburbanization? (2) Which kind of commercial space would contribute to the development of residential space? Which kind of commercial space would be attracted by the development of residential space? Further, this study can provide implications to develop a commercial-residential balanced region, which should be the key issue in polycentric urban development.

Study Area
In this research, the city of Beijing in China is selected to investigate the spatial association between commercial and residential spaces. Beijing, with a long history of commercial development and well-developed commercial service functions, is one of the top ten commercial cities in China. In recent years, the commercial space of Beijing has gradually transformed from a monocentric pyramidal hierarchy to a polycentric flattened hierarchy [36]. Meanwhile, in the context of market-oriented transformation and rapid urbanization, the differentiation of social class in residential spaces in Beijing is becoming increasingly significant. Thus, the spatial association between commercial and residential spaces has been undergoing profound transformation. Therefore, Beijing is a representative city for exploring the spatial association between commercial and residential spaces. Beijing consists of 16 districts ( Figure 1) and 4 zones divided according to Beijing Urban Master Plan (2016-2035), i.e., the core area, the central area, the inner suburb, and the outer suburb. In addition, four grades of commercial centers can also be found in Beijing, i.e., the regional level, municipal level, district level, and community level ( Figure 1). and their association relationships are investigated by using GIS spatial analysis of the average nearest neighbor distance, kernel density, and spatial correlation. Honeycomb grid analysis is also applied to identify the associated types of commercial and residential spaces. The specific questions to be addressed are: (1) For the commercial and residential spaces, who goes first in the accelerated development of suburbanization? (2) Which kind of commercial space would contribute to the development of residential space? Which kind of commercial space would be attracted by the development of residential space? Further, this study can provide implications to develop a commercial-residential balanced region, which should be the key issue in polycentric urban development.

Study Area
In this research, the city of Beijing in China is selected to investigate the spatial association between commercial and residential spaces. Beijing, with a long history of commercial development and well-developed commercial service functions, is one of the top ten commercial cities in China. In recent years, the commercial space of Beijing has gradually transformed from a monocentric pyramidal hierarchy to a polycentric flattened hierarchy [36]. Meanwhile, in the context of market-oriented transformation and rapid urbanization, the differentiation of social class in residential spaces in Beijing is becoming increasingly significant. Thus, the spatial association between commercial and residential spaces has been undergoing profound transformation. Therefore, Beijing is a representative city for exploring the spatial association between commercial and residential spaces. Beijing consists of 16 districts ( Figure 1) and 4 zones divided according to Beijing Urban Master Plan (2016-2035), i.e., the core area, the central area, the inner suburb, and the outer suburb. In addition, four grades of commercial centers can also be found in Beijing, i.e., the regional level, municipal level, district level, and community level (

Data
The POI data of commercial and residential spaces are obtained from the 2018 Baidu electronic map and the Lianjia.com data, respectively. A total of 235,549 valid commercial POI data points and 7618 valid residential POI data points were obtained in this research

Data
The POI data of commercial and residential spaces are obtained from the 2018 Baidu electronic map and the Lianjia.com data, respectively. A total of 235,549 valid commercial POI data points and 7618 valid residential POI data points were obtained in this research (Tables 1 and 2 and Figure 2). The POI data of commercial spaces include information such as the merchant name, address, latitude and longitude coordinates, and commercial formats. According to the "Retail Format Classification" national standard in China and the POI data attributes, the commercial formats in Beijing are divided into 10 categories ( Table 1). The residential POI data include the name of the residential district, housing price, building age, and latitude and longitude. To ensure the minimum within-group difference and the maximum between-group difference [37], the Jenks natural breaks algorithm is applied to divide the housing prices into three groups of residential space: high-grade (106,600-280,100 RMB/m 2 ), mid-grade (61,300-106,500 RMB/m 2 ), and lowgrade (10,000-61,200 RMB/m 2 ).  (Tables 1 and 2 and Figure 2). The POI data of commercial spaces include information such as the merchant name, address, latitude and longitude coordinates, and commercial formats. According to the "Retail Format Classification" national standard in China and the POI data attributes, the commercial formats in Beijing are divided into 10 categories ( Table 1). The residential POI data include the name of the residential district, housing price, building age, and latitude and longitude. To ensure the minimum within-group difference and the maximum between-group difference [37], the Jenks natural breaks algorithm is applied to divide the housing prices into three groups of residential space: high-grade (106,600-280,100 RMB/m 2 ), mid-grade (61,300-106,500 RMB/m 2 ), and lowgrade (10,000-61,200 RMB/m 2 ).    The average nearest neighbor distance is used to measure the macroscopic clustering degree of commercial spaces (or a certain commercial format) and residential spaces of the whole study area by calculating the distance between each element and its nearest neighboring element. The nearest neighbor ratio R is the ratio of the observed average distance and the expected average distance [16], calculated as follows: where D O is the observed average distance between each element and their nearest neighboring elements, D E is the expected average distance in a random pattern, d i is the distance of the nearest neighboring element pairs, n is the number of elements in the region, and A is the area of the envelope of all elements. When the value of R is less than 1, the elements are considered spatially agglomerated. The smaller the value of R is, the greater the degree of clustering. When the value of R is 0, the elements are completely agglomerated. When the value of R is 1, the elements are randomly distributed. When the value of R is greater than 1, the elements tend to be spatially evenly distributed.

Kernel Density Estimation
Kernel density estimation is applied to explore the spatial clustering of commercial and residential spaces in a specific region by investigating their spatial variation in POI data density [38]. The quartic polynomial kernel density function was used in this study, as follows: where p is the position of the point to be estimated, h is the radius with p as the center of the circle, ∧ λ h (p) is the value of kernel density estimation in position p, and p i is the i'th commercial or residential POI with p as the center and h as the radius of the circle. The value of h affects the smoothness of the density estimation. The area with the highest estimated kernel density is the core clustering area of commercial or residential spaces, followed by the secondary core clustering.

Spatial Correlation
Spatial correlation analysis is applied to conduct a comparative study of the raster images of commercial spaces (or a certain commercial format) and residential spaces to portray the macroscopic correlation characteristics of commercial and residential spaces of the whole study area [39], and is calculated as follows: where Corr ij is the correlation coefficient, Z is the image element value, i, j is the raster layer, µ is the mean value of image elements, N is the number of image elements, k is the specific image element, and δ is the standard deviation. Corr ij can be used to measure the interdependency relationship between two raster layers, which ranges from −1 to 1. The more Corr ij tends toward 1, the higher the degree of correlation, and the less Corr ij converges to 0, the lower the degree of correlation.

Honeycomb Grid Analysis
The spatial association relationship between commercial and residential spaces can be analyzed from two perspectives: macroscopic overall association degree and microscopic local association type. The macroscopic association degree measures the overall spatial proximity of the commercial and residential spaces. The local association type is the spatial combination mode of the commercial and residential spaces in a specific region. The honeycomb grid method can both measure the macroscopic association degree and local association type between commercial and residential spaces [40]. In this study, a hexagonal honeycomb grid is laid out in the study area to analyze the spatial association between commercial and residential spaces within each hexagon. The specific indicators of the honeycomb grid analysis are inclusion rate of commercial space (IRCS) and ratio of commercial and residential space (RCRS).
(1) Through multiple experiments, honeycombs with 500 m and 1000 m radii are laid out in the study area. IRCS is obtained by counting the number of honeycombs with residential communities with commercial service facilities in Beijing (Figure 3a), and is calculated as follows: where n r is the number of honeycombs containing residential communities and n cr is the number of residential honeycombs containing commercial service facilities. IRCS is used to characterize the degree of integration between commercial spaces (of a certain commercial format) and residential spaces. The higher the IRCS value is, the higher the probability that there are commercial and residential spaces in the same honeycomb grid, the higher the degree of integration of commercial and residential spaces, and the closer their association. When a low association exists on a small scale (500 m radius), whereas a high association exists on a medium scale (1000 m radius), the commercial space is both attractive and repulsive to residential spaces. Specifically, attractiveness is manifested as a consumption association, while the repulsive force is manifested as a negative environmental externality of the commercial space.
interdependency relationship between two raster layers, which ranges from −1 to 1. The more tends toward 1, the higher the degree of correlation, and the less converges to 0, the lower the degree of correlation.

Honeycomb Grid Analysis
The spatial association relationship between commercial and residential spaces can be analyzed from two perspectives: macroscopic overall association degree and microscopic local association type. The macroscopic association degree measures the overall spatial proximity of the commercial and residential spaces. The local association type is the spatial combination mode of the commercial and residential spaces in a specific region. The honeycomb grid method can both measure the macroscopic association degree and local association type between commercial and residential spaces [40]. In this study, a hexagonal honeycomb grid is laid out in the study area to analyze the spatial association between commercial and residential spaces within each hexagon. The specific indicators of the honeycomb grid analysis are inclusion rate of commercial space (IRCS) and ratio of commercial and residential space (RCRS).
(1) Through multiple experiments, honeycombs with 500 m and 1000 m radii are laid out in the study area. IRCS is obtained by counting the number of honeycombs with residential communities with commercial service facilities in Beijing (Figure 3a), and is calculated as follows: where nr is the number of honeycombs containing residential communities and ncr is the number of residential honeycombs containing commercial service facilities. IRCS is used to characterize the degree of integration between commercial spaces (of a certain commercial format) and residential spaces. The higher the IRCS value is, the higher the probability that there are commercial and residential spaces in the same honeycomb grid, the higher the degree of integration of commercial and residential spaces, and the closer their association. When a low association exists on a small scale (500 m radius), whereas a high association exists on a medium scale (1000 m radius), the commercial space is both attractive and repulsive to residential spaces. Specifically, attractiveness is manifested as a consumption association, while the repulsive force is manifested as a negative environmental externality of the commercial space. (2) A 1000 m radius honeycomb is applied, and the numbers of residential communities and commercial service facilities (of a certain commercial format) within a single honeycomb are counted. Then, the RCRS in a single honeycomb can be calculated as follows: where N c is the number of commercial service facilities (of a certain commercial format) in a single honeycomb and N r is the number of residential communities in a single honeycomb.
As shown in Figure 3b, the RCRSs of honeycombs K1, K2, K3, and K4 appear in the order of K4 > K3 > K2 > K1. RCRS is used to classify the association type of commercial and residential spaces.

Spatial Distribution Characteristics
The distribution of each commercial format in Beijing from the inside out can be found in Figure 4. The proportions of catering services, specialty stores, and shopping malls in all commercial formats of each circle gradually decrease in the outward direction. The proportions of living services and supermarkets appear to increase first and then decrease, with living services accounting for the highest proportion in the central area and supermarkets accounting for the highest proportion in the inner suburb. The proportion of convenience stores shows a trend of first decreasing and then increasing, with the lowest proportion in the central area. The proportions of recreation and leisure services and agricultural markets show a trend of increasing in the outward direction, with the highest proportions in the outer suburb. In general, the commercial spaces of catering services, living services, and specialty stores need to be near the living and shopping areas of customers, and these three commercial formats have the widest spatial distribution within the city. Commercial formats with very high market demand (e.g., convenience stores, supermarkets, and agricultural markets) are also distributed widely. Recreation and leisure services, which include a variety of subdivided commercial formats, present a particularly obvious trend of suburbanization. Commercial formats present in small numbers with large service areas (e.g., shopping malls, home building materials markets, and home appliance and electronics stores) are distributed dispersedly.  The nearest neighbor ratios of commercial and residential spaces are 0.200 0.2767, respectively (Table 3), indicating that the commercial and residential spac characterized by obvious clustering distributions. In addition, the nearest neighbo of each commercial format is less than 1, with aggregation degrees from high to specialty stores > catering services > home building materials markets > living ser agricultural markets > shopping malls > convenience stores > home appliance an  The nearest neighbor ratios of commercial and residential spaces are 0.2001 and 0.2767, respectively (Table 3), indicating that the commercial and residential spaces are characterized by obvious clustering distributions. In addition, the nearest neighbor ratio of each commercial format is less than 1, with aggregation degrees from high to low of specialty stores > catering services > home building materials markets > living services > agricultural markets > shopping malls > convenience stores > home appliance and electronics stores > supermarkets > recreation and leisure services. The nearest neighbor ratios of specialty stores, catering services, home building materials markets, living services, and agricultural markets are less than the average ratio of all formats. This demonstrates that commercial formats with a high frequency of daily consumption have a high degree of spatial clustering. These commercial formats appear either close to residents' needs (e.g., catering services and living services) or with specialized characteristics (e.g., specialty stores, home building materials markets, and agricultural markets). In contrast, other commercial formats, such as durable goods consumption (e.g., home appliance and electronics stores), extensive daily consumption (e.g., supermarkets and convenience stores), diversified demand and strong experiential consumption (e.g., recreation and leisure services) and comprehensive consumption (e.g., shopping malls), present relatively weak degrees of spatial clustering.

Spatial Clustering Characteristics
The overall commercial space in Beijing presents a spatial distribution pattern of "strong monocentric in the core area-contiguously agglomerated in the central area-scattered polycentric in the inner and outer suburbs" ( Figure 5). Specifically, some of the regional level, municipal level, and district level commercial centers represent the core clustering areas. Several commercial centers at the district level and community level are secondary core clustering areas. The commercial space in the inner and outer suburbs was mainly concentrated in the center of each district, presenting a multicenter point-like distribution along the main roads. The clustering of residential space is smaller than that of commercial space, presenting a spatial distribution pattern of "contiguous clustering within the central area-multiple groups along the main roads in the inner suburb". Specifically, the core clustering of residential spaces is distributed within the Third Ring Road of Beijing.
The spatial clustering of each commercial format appears differentiated ( Figure 6). Specifically, the spatial distribution of catering services is similar to that of all commercial service facilities. The suburbanization of recreation and leisure services is particularly obvious and is characterized by primary and secondary high-density clustering within the central area. A large-scale scattered distribution of recreation and leisure services can also be found in the inner and outer suburbs. The spatial distribution of living services is similar to that of catering services, with the regional commercial center of Beijing as the core clustering. Convenience stores are widely distributed, and the distribution is characterized by contiguous clusters within the central area and polycentric clusters in the inner and outer suburbs. The distribution of supermarkets is characterized by contiguous clustering in the central area, planar distribution in the inner suburb, and point-like clustering in the outer suburb. Shopping malls, present in small numbers, are widely distributed within the central area. The shopping malls are mostly located in the commercial center, and their distribution pattern is characterized by primary and secondary cores within the central area and discrete points in the inner and outer suburbs. The spatial distribution of home appliance and electronics stores is characterized by multicenter and multipoint discreteness. Home building materials markets, with a small quantity, large service areas, high product transportation costs, and strong professionalism, are concentrated in the central area and the inner suburb. The distribution of home building materials markets is characterized by a point-like distribution around the Third Ring and Fourth Ring Road. Specialty stores need to be located close to the large-scale commercial district. They are highly clustered in the regional-level and municipal-level commercial centers. Their spatial distribution pattern in the inner and outer suburbs is the same as those of catering services, living services, and shopping malls. The spatial distribution of the agricultural markets is characterized by multicentric clustering in the core area and the central area and scattered clustering in the inner and outer suburbs. Compared with other formats, the core clustering area of the agricultural markets is wider.
The high-, middle-and low-grade residential spaces present differentiated spatial patterns in Beijing (Figure 7). High-grade residential space is characterized by high clustering in the core area and a decrease in the central area. Middle-grade residential spaces are concentrated in the central area and part of the core area, presenting an annular clustering area around the core area in the Third and Fourth Ring Road of Beijing and decreasing on both sides. The low-grade residential space presents a spatial pattern of clustering along the main traffic roads from the core area outwards. A point-like clustering area is also formed in the inner and outer suburbs. In general, influenced by the residents' preference for residential space in the north of the city in Beijing, high-and middle-grade residential spaces are mostly concentrated in the north within the Fourth Ring Road. In contrast, the density of low-grade residential spaces in the south of the city is higher.

Spatial Clustering Characteristics
The overall commercial space in Beijing presents a spatial distribution pattern of "strong monocentric in the core area-contiguously agglomerated in the central areascattered polycentric in the inner and outer suburbs" ( Figure 5). Specifically, some of the regional level, municipal level, and district level commercial centers represent the core clustering areas. Several commercial centers at the district level and community level are secondary core clustering areas. The commercial space in the inner and outer suburbs was mainly concentrated in the center of each district, presenting a multicenter point-like distribution along the main roads. The clustering of residential space is smaller than that of commercial space, presenting a spatial distribution pattern of "contiguous clustering within the central area-multiple groups along the main roads in the inner suburb". Specifically, the core clustering of residential spaces is distributed within the Third Ring Road of Beijing. The spatial clustering of each commercial format appears differentiated ( Figure 6). Specifically, the spatial distribution of catering services is similar to that of all commercial service facilities. The suburbanization of recreation and leisure services is particularly obvious and is characterized by primary and secondary high-density clustering within the central area. A large-scale scattered distribution of recreation and leisure services can also be found in the inner and outer suburbs. The spatial distribution of living services is similar to that of catering services, with the regional commercial center of Beijing as the core clustering. Convenience stores are widely distributed, and the distribution is characterized by contiguous clusters within the central area and polycentric clusters in the inner and outer suburbs. The distribution of supermarkets is characterized by contiguous clustering in the central area, planar distribution in the inner suburb, and point-like clustering in the outer suburb. Shopping malls, present in small numbers, are widely distributed within the central area. The shopping malls are mostly located in the commercial center, and their distribution pattern is characterized by primary and secondary cores within the  tering area around the core area in the Third and Fourth Ring Road of Beijing and decreasing on both sides. The low-grade residential space presents a spatial pattern of clustering along the main traffic roads from the core area outwards. A point-like clustering area is also formed in the inner and outer suburbs. In general, influenced by the residents' preference for residential space in the north of the city in Beijing, high-and middle-grade residential spaces are mostly concentrated in the north within the Fourth Ring Road. In contrast, the density of low-grade residential spaces in the south of the city is higher.

Spatial Correlation of Commercial and Residential Spaces
The coefficient of spatial correlation between commercial and residential spaces in Beijing is 0.865 (Table 4). This indicates that there is a close spatial correlation between them and that the distribution of commerce is highly attached to that of residences. Obvious differences exist between the spatial correlation coefficients of each commercial format and residences, ranging from high to low: catering services, living services, specialty stores, recreation and leisure services, supermarkets, convenience stores, shopping malls, agricultural markets, home appliance and electronics stores, and home building materials markets. With a high frequency of daily consumption and residents' demands of close proximity, catering services (0.864) and living services (0.832) have the highest spatial correlation coefficients with residential spaces. Their spatial clustering patterns are closer to that of residential spaces ( Figure 5). Taking household consumption as the target market, supermarkets (0.812) have a relatively high correlation with residential spaces. In comparison, the correlation between convenience stores (0.787) and residential spaces is smaller, which is mainly attributed to the slow development of foreign-invested convenience

Spatial Correlation of Commercial and Residential Spaces
The coefficient of spatial correlation between commercial and residential spaces in Beijing is 0.865 (Table 4). This indicates that there is a close spatial correlation between them and that the distribution of commerce is highly attached to that of residences. Obvious differences exist between the spatial correlation coefficients of each commercial format and residences, ranging from high to low: catering services, living services, specialty stores, recreation and leisure services, supermarkets, convenience stores, shopping malls, agricultural markets, home appliance and electronics stores, and home building materials markets. With a high frequency of daily consumption and residents' demands of close proximity, catering services (0.864) and living services (0.832) have the highest spatial correlation coefficients with residential spaces. Their spatial clustering patterns are closer to that of residential spaces ( Figure 5). Taking household consumption as the target market, supermarkets (0.812) have a relatively high correlation with residential spaces. In comparison, the correlation between convenience stores (0.787) and residential spaces is smaller, which is mainly attributed to the slow development of foreign-invested convenience stores in Beijing before 2016. With a small quantity and scattered distribution, shopping malls (0.763) present a low correlation with residential spaces. To facilitate the transportation and trading of agricultural products, some large agricultural markets are located in the inner suburb, resulting in a low correlation (0.721) with residential spaces. The commercial formats with the sale of durable goods such as home appliances and electronics stores (0.612) and home building materials markets (0.365) are mostly scattered in areas far from residential areas, and their correlation coefficients are the lowest.
Of the high-, middle-and low-grade residential spaces, the middle-grade presents the highest spatial correlation with catering services (0.794), recreation and leisure services (0.826), living services (0.742), supermarkets (0.715), shopping malls (0.710), home appliance and electronics stores (0.561), and specialty stores (0.723). High-grade residential spaces have the highest spatial correlation with convenience stores (0.742). Low-grade residential spaces have the highest spatial correlation with home building materials markets (0.381) and agricultural markets (0.616), and their spatial correlations with other commercial formats are relatively low. This result indicates that the commercial formats of daily consumption and shopping are mostly distributed around the Third and Fourth Ring Road of Beijing and have the highest spatial correlation with the middle-grade residential spaces in this area (Figure 7). Moreover, convenience stores meet the needs of the residents in high-grade residential spaces. With a large demand for usable areas and low environmental requirements, large-scale markets such as home building materials markets and agricultural markets are closely related to low-grade residential spaces. Table 4. Spatial correlation analysis of commercial and residential spaces in Beijing.

Association Degree of Commercial and Residential Spaces
As shown in Table 5, the inclusion rates of all commercial spaces based on honeycomb grids with radii of 1000 m and 500 m are 98.1% and 91.1%, respectively, indicating a high degree of integration and a close consumption association of the commercial and residential spaces. The association degree of each commercial format with the residential space varies considerably. Within a 500 m radius of residential space, the IRCS are arranged from high to low as follows: catering services, living services, recreation and leisure services, convenience stores, specialty stores, supermarkets, agricultural markets, shopping malls, home appliance and electronics stores, and home building materials markets. However, within a 1000 m radius of residential spaces, the IRCS values are ordered from high to low as follows: home building materials markets, home appliance and electronics stores, shopping malls, supermarkets, agricultural markets, recreation and leisure services, convenience stores, specialty stores, living services, and catering services. It can be seen that the spatial association of commercial and residential spaces is characterized by the "integration of daily consumption and separation of nondaily consumption". Additionally, the trend of "mesoscale integration" of residences with commercial formats with a larger service radius and nondaily consumption (e.g., shopping malls, home appliance and electronics stores, and home building materials markets) is particularly obvious [40]. The trend of "mesoscale integration" is relatively obvious for residences with commercial formats occupying larger areas (e.g., supermarkets and agricultural markets). The trend of "smallscale integration" is obvious for residences with commercial formats with a high frequency of daily consumption and small usable areas (e.g., food services, living services, convenience stores, and specialty stores) [40]. The spatial integration degrees between high-grade residential spaces and all commercial formats, except for home building materials markets, are high, followed by middle-grade residential spaces. Low-grade residential spaces have the lowest spatial integration degrees with each commercial format. High-grade residential spaces are surrounded by abundant commercial formats, while the integration level of low-grade residential spaces and commercial spaces is relatively poor.

Association Type of Commercial and Residential Spaces
Due to the obvious differences in the service ranges and residents' daily demands of each commercial format, the mean ± standard deviation of the RCRS in a single honeycomb is used as the criterion to define the association type of commercial and residential spaces. Three association types of commercial-lagging-residential, commercial-residentialcoordinated, and commercial-advanced-residential are classified (Table 6). Table 6. Classification standard of association relationships between commercial and residential spaces. The overall association relationship between commercial and residential spaces in Beijing is dominated by the coordinated type (accounting for 56.20%), with the lagging type accounting for 29.46% and the advanced type accounting for 14.34% (Table 7). Specifically, the coordinated-type association is mainly distributed within the Fourth Ring Road of Beijing. The advanced-type association is concentrated within the central area (around the commercial centers within the Fourth Ring Road and near the traffic arteries outside the Fourth Ring Road) and in the centers of the suburban districts. The lagging-type association is widely distributed in the inner and outer suburbs (Figure 8). Table 7. The proportion of each association type of commercial and residential spaces.

Commercial-Advanced-Residential
All commercial formats 29 Significant spatial heterogeneity exists in the association relationships of different commercial formats and residential spaces in Beijing. (1) For catering services, the coordinated type, lagging type, and advanced type account for 47.80%, 37.34%, and 14.86%, respectively. Specifically, the coordinated type and advanced type are mainly concentrated within the central area. Outside of the Fourth Ring Road of Beijing, the advanced type is also distributed along the main roads and spreads to district centers in the inner and outer suburbs. Affected by the clustered distribution of government agencies, the lagging type is distributed within the Second Ring Road of Beijing. (2) For recreation and leisure services, the coordinated type, lagging type, and advanced type account for 52.45%, 31.91%, and 15.63%, respectively. The advanced type is mainly concentrated outside of the Fourth Ring Road of Beijing, and several honeycombs of the advanced type are located in the center of each district in the inner and outer suburbs. (3) For living services, the proportion of coordinated type (49.61%) and lagging type (47.16%) is approximately the same. The area within the Fourth Ring Road is dominated by the coordinated type. Some lagging type exists in the core area. The distribution of advanced type is similar to that of catering services. (4) For convenience stores, the coordinated type accounts for a relatively large proportion (44.57%). The proportion of the lagging type in the northern part within the Fourth Ring Road is relatively large. More advanced type exists for convenience stores in the southern part of the city than in the northern part of the city. (5) For supermarkets, the lagging type accounts for a relatively large proportion, 44.57%, mainly concentrated in the inner and outer suburbs and the Xicheng District within the core area. The coordinated type (38.37%) is mainly concentrated in the central area and the inner suburb, and the advanced type (17.05%) is concentrated in the district-level and community-level commercial centers. (6) For shopping malls, the lagging type accounts for 68.60%. The coordinated type (18.35%) and the advanced type (13.05%) are concentrated within the Fourth Ring Road. Specifically, the advanced type is concentrated in the regional level and municipal level commercial centers. Although the lagging type accounts for the largest proportion in the inner and outer suburbs, one or two honeycombs of the advanced type are still formed in the center of each district in the inner and outer suburbs. (7) For home appliances and electronics stores, the lagging type (accounting for 81.27%) is the most widely distributed in Beijing. The advanced type is scattered as a dotted layout mainly distributed in the areas around Shijingshan Road and in the centers of each district. (8) For the home building materials markets, the lagging type accounts for 88.37%. The coordinated type (accounting for 3.88%) is scattered in the central area. The advanced type (accounting for 7.75%) is concentrated in the southern part of the central area around the Fourth Ring Road. Additionally, one or two honeycombs of advanced type are formed in the center of each district in the inner and outer suburbs. (9) For specialty stores, the coordinated type (accounting for 52.07%) is widely distributed in the central area and part of the inner suburb. The advanced type (accounting for 11.76%) is scattered in the vicinity of the main roads. Because some spe-cialty stores for cultural and creative products are clustered in the Palace Museum and other tourist attractions, the advanced type is also concentrated in these areas. (10) For agricultural markets, the coordinated type with residential space (accounting for 56.46%) is widely distributed. The advanced type (accounting for 11.63%) is mostly distributed in the range from the Fourth Ring Road to the border of the central area and is also concentrated in the southern region of the city.  Significant spatial heterogeneity exists in the association relationships of different commercial formats and residential spaces in Beijing. (1) For catering services, the coordinated type, lagging type, and advanced type account for 47.80%, 37.34%, and 14.86%, respectively. Specifically, the coordinated type and advanced type are mainly concentrated within the central area. Outside of the Fourth Ring Road of Beijing, the advanced type is also distributed along the main roads and spreads to district centers in the inner and outer suburbs. Affected by the clustered distribution of government agencies, the lagging type is distributed within the Second Ring Road of Beijing. (2) For recreation and leisure services, the coordinated type, lagging type, and advanced type account for 52.45%, 31.91%, and 15.63%, respectively. The advanced type is mainly concentrated outside of the Fourth Ring Road of Beijing, and several honeycombs of the advanced type are located in the center of each district in the inner and outer suburbs. (3) For living services, the proportion of coordinated type (49.61%) and lagging type (47.16%) is approximately the same. The area within the Fourth Ring Road is dominated by the coordinated type. Some lagging type exists in the core area. The distribution of advanced type is similar to that of catering services. (4) For convenience stores, the coordinated type accounts for a relatively large proportion (44.57%). The proportion of the lagging type in the northern part within the Fourth Ring Road is relatively large. More advanced type exists for convenience stores in the southern part of the city than in the northern part of the city. (5) For supermarkets, the lagging type accounts for a relatively large proportion, 44.57%, mainly concentrated in the inner and outer suburbs and the Xicheng District within the core area. The coordinated type (38.37%) is mainly concentrated in the central area and the inner suburb, and the advanced type (17.05%) is concentrated in the district-level and community-level commercial centers. (6) For shopping malls, the lagging type accounts for 68.60%. The coordinated type (18.35%) and the advanced type (13.05%) are concentrated within the Fourth Ring Road. Specifically, the advanced type is concentrated in the regional level and mu- Figure 8. The distribution of association relationships between commercial and residential spaces in Beijing: (a) the overall commercial spaces, (b) catering services, (c) recreation and leisure services, (d) living services, (e) convenience stores, (f) supermarkets, (g) shopping malls, (h) home appliance and electronics stores, (i) home building materials markets, (j) specialty stores, and (k) agricultural markets.

Discussion and Conclusions
(1) The commercial spaces in Beijing are characterized by a pattern of "strong monocenter in the core area, contiguous clustering in the central area, scattered polycenters in the inner and outer suburbs". However, the residential spaces are characterized by a pattern of "contiguous clustering within the central area, multicluster distribution along the main traffic in the inner suburb". The differences in consumer groups, consumption frequencies, and service scopes of different commercial formats lead to differentiated clustering patterns. The commercial formats with a high frequency of daily consumption, resident demands of close proximity (catering services and living services), and specialized goods (specialty stores, home building materials markets, and agricultural markets) present a relatively high degree of spatial clustering. In comparison, commercial formats with durable goods (home appliance and electronics stores), daily extensive consumption (supermarkets and convenience stores), diversified demands and strong experiential consumption (recreation and leisure services), and comprehensive consumption (shopping malls) exhibit a relatively weak clustering. The high-, middle-and low-grade residential spaces present differentiated spatial patterns. Most of the high-and middle-grade residential spaces are concentrated in the northern part of the city within the Fourth Ring Road, while low-grade residential spaces are mostly concentrated in the southern part of the city, with a higher density.
(2) The distribution of commercial spaces in Beijing is strongly related to that of residential spaces. These two types of spaces are highly integrated, maintaining a relatively close consumption spatial association. However, there are obvious differences in the association degrees of different commercial formats and residential spaces, showing a characteristic of "integration of daily consumption and separation of nondaily consumption". Specifically, the commercial formats of nondaily consumption (e.g., shopping malls, home appliance and electronics stores, and home building materials markets), which occupy large areas, sell products with high durability, low consumption frequency, and large service scope, and they have a low degree of association with residential spaces. These commercial formats present a particularly obvious trend of "mesoscale integration" with residential spaces. Commercial formats with high daily consumption frequency occupying small areas (e.g., catering services, living services, and specialty stores) are highly related to residential spaces, presenting an obvious trend of "small-scale integration". For the residential spaces, except for the home building materials markets and agricultural markets, the degree of spatial association between the commercial spaces and high-and middle-grade residential spaces is higher than that of low-grade residential spaces. High-grade residential spaces are surrounded by abundant commercial formats. The integration level of low-grade residential spaces and commercial spaces is relatively poor.
(3) Significant spatial heterogeneity exists in the association relationship between commercial and residential spaces in Beijing. The overall association relationship is dominated by the commercial-residential-coordinated type within the Fourth Ring Road. The commercial-advanced-residential type is concentrated in the central area and each district center in the inner and outer suburbs. The commercial-lagging-residential type is widely distributed in the inner and outer suburbs. The association relationship between commercial and residential spaces presents a significant difference in the northern and southern regions of Beijing divided by Chang'an Street. The commercial formats (e.g., convenience stores, supermarkets, shopping malls, and home building material markets) lagging residential spaces are mainly distributed in the northern region of Beijing. In the southern region of the city, the proportion of commercial-advanced-residential spaces is relatively high. For the various commercial formats, catering services, recreation and leisure services, specialty stores, and agricultural markets have a relatively good association relationship with residential spaces. Commercial formats with a high frequency of daily consumption (e.g., living services, convenience stores, and supermarkets) lag behind residential spaces. However, large-scale comprehensive and specialized commercial formats (e.g., shopping malls, home appliances and electronics stores, and home building materials markets) appear to lag behind the residential spaces in a wide area. It can be concluded that the commercial space follows the residential space at the initial stage of suburbanization, and then the residential space follows the commercial space. The development of residential space would attract commercial formats such as catering services, recreation and leisure services, specialty stores, and agricultural markets. The development of commercial formats with a high frequency of daily consumption (e.g., living services, convenience stores, and supermarkets) would contribute to the development of residential space.
(4) Based on urban big data, this paper investigates the relationship between commercial and residential spaces from the perspective of the spatial association of elements, which enriches the current research on the matching degree of commercial and residential spaces reflected by residents' consumption travel time and distance. Currently, in the "entity-online" dual consumption era, online consumption facilitates the diverse needs of physical consumption, which has a very large impact on physical commercial formats. As a result, the goals and intentions of residents' physical consumption have changed accordingly. Residents tend to choose experiential consumption that enhances their sense of well-being, and commercial formats that focus on physical experience still have very large market potential. The spatial heterogeneity of the association relationship between various commercial formats and residential spaces in Beijing not only reflects the dislocation of commercial and residential spaces in some areas, but it also represents the adjustment of, and changes in, physical commercial formats under the impact of online consumption. Taking the current changes in residents' consumption preferences into account, and combining the spatial pattern of the association relationship between commercial and residential spaces, it is imperative to strengthen the layouts of daily consumption commercial formats (e.g., convenience stores and agricultural markets) and physical experience formats (e.g., recreation and leisure services) that lag behind the residential space. This paper can help to promote the coordinated development of commercial and residential spaces in the context of the new era.

Data Availability Statement:
The data that support the findings of this study are available from the corresponding author upon reasonable request.