Urban Nighttime Leisure Space Mapping with Nighttime Light Images and POI Data

: Urban nighttime leisure spaces (UNLSs), important urban sites of nighttime economic activity, have created enormous economic and social benefits. Both the physical features (e.g., location, shape, and area) and the social functions (e.g., commercial streets, office buildings, and entertainment venues) of UNLSs are important in UNLS mapping. However, most studies rely solely on census data or nighttime light (NTL) images to map the physical features of UNLSs, which limits UNLS mapping, and few studies perform UNLS mapping from a social function perspective. Point-of-interest (POI) data, which can reflect social activity functions, are needed. As a result, a novel methodological UNLS mapping framework, that integrates NTL images and POI data is required. Consequently, we first extracted high-NTL intensity and high-POI density areas from composite data as areas with high nightlife activity levels. Then, the POI data were analyzed to identify the social functions of leisure spaces revealing that nighttime leisure activities are not abundant in Beijing overall, the total UNLS area in Beijing is 31.08 km 2 , which accounts for only 0.2% of the total area of Beijing. In addition, the nightlife activities in the central urban area are more abundant than those in the suburbs. The main urban area has the largest UNLS area. Compared with the nightlife landmarks in Beijing established by the government, our results provide more details on the spatial pattern of nighttime leisure activities throughout the city. Our study aims to provide new insights into how multisource data can be leveraged for UNLS mapping to enable researchers to broaden their study scope. This investigation can also help government departments better understand the local nightlife situation to rationally formulate planning and adjustment measures.


Introduction
Leisure is defined as activity engaged in during free time [1,2]; according to the Athens Charter, in addition to dwelling, work, transportation, and leisure representing one of the four basic functions of a city [3][4][5]. After the reform and opening up program was enacted in 1978, the acceleration of urbanization throughout China has triggered rapid growth of the national economy [6][7][8]. Unfortunately, the proportion of urban nighttime leisure space (UNLS) did not keep pace with the urban growth rate, which led to a decline in the quality of life [9][10][11][12]. Characterizing the spatial distribution of UNLS can facilitate a better understanding of urban form [13], particularly as detecting spatial regularities assists in solving certain social problems in the real world [14,15]. UNLSs, referring to the spaces where urban residents engage in leisure activities between 6:00 PM and 6:00 AM, have wide-ranging impacts on urban economic growth [16], employment [17], urban competitiveness [18], urban vitality [19], and social justice [20,21]; consequently, UNLS is considered one of the key countermeasures to activate the urban economy; and accordingly falls under the scope of this paper [22]. A UNLS map can indicate the socioeconomic activities that are carried out in different urban nighttime areas. However, due to the lack of an effective data source, the UNLS distribution is sometimes difficult to acquire at the regional scale. In addition, social census data always suffer from coarse temporal and spatial resolutions because data on basic districts or areas of arbitrary shape are inaccessible in many countries [23]. Therefore, conducting UNLS mapping at different spatial resolutions using geographical big data as an alternative to traditional social census data is an important and challenging task for the academic community [24,25].
UNLS is an important host of urban nighttime economic activities, and therefore plays an increasingly important role in the urban economy [26]. In addition, urban leisure space is a kind of living entity because of the continuous integration of service providers and scenic spots, thus forming a dynamic space of consumerism. However, this dynamism makes it somewhat difficult for urban policy-makers and planners to manage and enhance the attraction of urban leisure spaces, and it is also difficult for residents and tourists to fully understand and obtain accurate information about the leisure facilities provided [27]. At present, studies on NTLS [28][29][30] are mostly focused on economics [31], sociology [32], public safety [33][34][35], resident health and happiness [36], and urban management [37]. According to the different types of data, the existing research can be divided into the following three categories. (1) Based on survey statistics, Song et al. [10] conducted a questionnaire survey on the daily leisure activities and places of Shanghai residents. The results show that although, the daily leisure time and disposable income of Shanghai urban residents are relatively sufficient, there are few leisure activities available. Compared with the level of leisure in western developed countries, the leisure level of urban residents in Shanghai is still in its primary stage. At present, there is a small number of outdoor leisure places, and their layout is not optimal, in addition, open public green spaces are the most popular type of leisure space. Ngesan et al. [38] used Shah Alam as a case study to develop an open-ended questionnaire by collecting previous research data on nighttime activities, and used the questionnaire as a tool to assess whether Shah Alam would be a suitable night market. Hsieh et al. [39] employed statistical information from the Taiwan Tourism Bureau to understand tourists' motivations and their preferred leisure activities when they shop at tourist night markets. The result shows that novelty-seeking, exercising, and experiencing local culture and customs are major factors that motivate tourists to shop at tourist night markets: Eating out overwhelmingly dominated the leisure activities (88.5%), followed by everyday shopping (56%), and novelty-seeking (32%). Mohd et al. [40] used a behavior mapping survey and a questionnaire survey to study the nighttime urban public parks between Shah Alam and Putrajava. The results show that urban public parks could provide more benefits and function to the leisure and recreation lifestyles of urban communities. John et al. [41] utilized survey data to examine the leisure and recreation activities of people living in urban residential estates in the Lower Hunter, New South Wales. Their results demonstrate that substantial numbers of respondents are dissatisfied with the provision of recreation resources. There was an expressed need for larger areas of open space and parkland and better facilities for a wider range of age groups. (2) Based on network geographic data, Demi et al. [23] proposed a method to determine the potential of leisure activities from urban spatial network data by using the semantic theme model. Taking the city of Zwolle as an example, network text data and geographical location tags were used to estimate the different types of leisure activities. Revealing that the services and functions of leisure spaces can be identified by combining various text and tag sources from the web. Jing et al. [5] employed the gradient analysis method which integrates a geographic information system (GIS) technology (kernel density analysis), curve fitting analysis, and correlation analysis to theoretically determine the spatial gradient changes among urban leisure places and their significant correlation with the population distribution. (3) Based on NTL data, taking Guangzhou as an example, Guo et al. [42] analyzed the factors that influence the development of nightlife tourism by using NTL engineering data and divided the nightlife scene of Guangzhou into three axes, one core, four centers, and one area. The results show that the government does not fully realize the importance of nighttime tourism. One of the major drawbacks is the limited hours of operation, most tourist attractions close before 6:00 PM, which limits the development of nighttime tourism.
Although these methods have greatly contributed to UNLS research, previous studies suffer from three recurring issues.
(1) Traditionally, the data sources used for UNLS research involve household surveys or census data collected by the government or research organizations. However, the varying qualities of these surveys and censuses and the substantial monetary and time costs required to conduct these studies hamper efforts to evaluate the UNLS distribution.
(2) With respect to NTLS, most previous methods focused on recessive economic factors without considering the spatial distribution, morphological characteristics, and other influencing factors.
(3) Using NTL data alone to map leisure spaces may result in inaccurate determinations due to the excessively high radiance in specific types of areas such as commercial zones and transportation hubs.
To address these issues, we employ NTL and point-of-interest (POI) data instead of census and questionnaire data for UNLS analysis. NTL data record the NTL intensity at the Earth's surface, thereby reflecting the magnitude of human activities [43,44]. In addition, NTL images have certain advantages in monitoring the UNLS distribution because of their large spatial coverage, high temporal resolution, and wide availability [8]. In addition, the NTL data is widely used to study urban expansion and relevant sociodemographic activities across a variety of spatial scales, such as population density [45,46], urban extent mapping [47,48], energy consumption [49,50], environmental changes [51,52], and socioeconomic activities [24,53]. Currently, most studies mainly use the following two types of NTL image sources: The Defense Meteorological Satellite Program Operational Line-scan System (DMSP-OLS) and the Suomi National Polar-Orbiting Partnership Visible Infrared Imaging Radiometer Suite (NPP-VIIRS). However, due to the blooming effect, the nighttime leisure spaces observed in the DMSP-OLS dataset are generally larger than the actual area of human activity [54]. In addition, both DMSP-OLS and NPP-VIIRS data are insufficient to reflect human activities at an adequately fine resolution (in terms of the temporal and spatial resolutions).
POI data, which comprise geographic coordinates and reflect socioeconomic features create new opportunities for UNLS mapping at a high resolution [55]. Certain POIs, such as service, leisure, and entertainment areas, are more closely associated with human activities and may indicate a richer UNLS than other POIs. Hence, as NTL images do not possess these features, POI data can be viewed as an analog complement to NTL data [56,57].
The combined advantage of these two data sources, boast considerable potential to achieve better insights into UNLS distribution patterns. The physical features extracted from NTL images and the functional features retrieved from POI data can be combined to characterize UNLSs with great accuracy. To the best of our knowledge, no previous reports have been published on the joint use of NTL and POI data to produce UNLS maps. To bridge this gap, we develop a framework that utilizes NTL images and POI data to conduct UNLS mapping. In the remainder of this paper, we describe the details of the framework and its application to Beijing, China. We also examine the strengths and limitations of the proposed framework and formulate suggestions for future work in this field.

Study Area
To evaluate the potential of combining NTL images and with POI data for UNLS mapping, we considered Beijing, the capital of China, as our study area ( Figure 1). Beijing, which occupies an administrative area of 16,410.54 km 2 , lacks a tradition of nighttime leisure activity, is trying to stimulate its nighttime consumption potential. To accelerate the development of nighttime leisure spaces in Beijing, the government issued a work report in January 2019 in which a policy was proposed to intensely stimulate the nighttime economy and promote consumption, by encouraging key districts, shopping malls, supermarkets, and convenience stores to extend their business hours appropriately. In addition, plans were developed to build late-night dining halls in select catering districts in Xicheng, Chaoyang, Fengtai, Shijingshan, Sub-Center, and Changping. Moreover, in July 2019, the Beijing Municipal Bureau of Commerce proposed the Further Prospering Night Economy and Promoting Consumption Growth plan in Beijing, the goal of which is to establish a number of functional nighttime landmarks, nighttime business districts, and nighttime living areas in Beijing by the end of 2021. Thus, government departments need to obtain data on the area and location of each nighttime leisure space in a timely and effective way. This urban planning requirement is one of the motivations of this study.

NTL Images
Luojia-1 NTL data taken on 23 November 2018 (http://datasearch.hbeos.org.cn:3000/) were used in this study. We extracted the data for the Beijing region by using the administrative boundary of Beijing as a mask polygon. These Luojia-1 NTL data were converted into the WGS_1984_Web_Mercator_Auxiliary_Sphere projection at a resolution of 130 m ( Figure 2); the local visit time is approximately 10 PM, and the revisit period is 15 days. The NTL intensity may be affected by seasonal vegetation changes [58]. November data were chosen to reduce the effects of leaves on the NTL intensity, and the visit time of 10 PM was selected mainly because most business establishments in Beijing are closed after this time. According to a released report of Luojia-1(http://www.lmars.whu.edu.cn/index.php/en/researchnews/2169.html), the released images are systematically geometric corrected, and the positioning accuracy ranged from 0.49 to 0.93 km. In addition, precise geometric correction is necessary for the experimental image. Twenty ground control points were manually collected to estimate the rational function coefficients using the L1-normal-regularized least squares method [59], which are used to conduct ortho-rectification with the help of the global Shuttle Radar Topography Mission Digital Elevation Model data [60].
The digital number values of the Luojia-1 images were converted into radiance values using the following equation, which is based on a laboratory calibration, provided by the satellite data website: - 10 3 / 2 r = 10 d w (1) where d denotes the digital number value of a pixel, w denotes the bandwidth, and r denotes the radiance, in units of W/( 2 * sr). The radiometric range of Luojia-1 is 460-980 nm, and therefore, w is equal to 5.210 -7 m. After the radiance of each pixel is calculated, the units are converted into nWc −2 −1 .

POI Data
The POI data used in this study were collected in 2019 from Baidu Map (https://map.baidu.com/), one of the most popular online map service providers in China. We compiled a crawler program and examined the POI data of Beijing using the free interface provided by the Baidu application programming interface (API) (http://lbsyun.baidu.com/index.php?title=webapi/guide/webserviceplaceapi). A total of 320,785 POIs were obtained within the study area, and the Baidu POI data include 19 first-level categories and 138 second-level categories. We chose 11 first-level categories related to leisure as the research data (recreation and entertainment, daily life service, dining service, shopping, beauty parlor, business company, sports facility and gym, education and training, cultural media, natural features, and tourist attraction).

Generating the POI Density Layer
Two steps were followed to generate the POI density layer with POI data: (1) The qualities of POIs vary among different categories, i.e., the number of shopping POIs is greater than the other types. This may result in an unbalanced distribution of the numbers of points among different POI types. Therefore, we regard different types of POIs as having composite functions rather than a single function [61]. Then, kernel density estimation [62] was used to convert each POI category into a smooth and continuous density map. Previous studies have shown that kernel density estimation results were influenced mainly by the bandwidth selection but are less affected by the selected kernel function [63,64]. In this study, we use the spatial variable of Sliverman's "rule of thumb" to calculate the bandwidth for kernel density estimation (Table 1).
Where ℎ is the bandwidth; is the number of event points; is the standard distance; is the median distance. (2) Using the principal component analysis [17], the POI density maps were combined into a composite POI density layer. Due to the strong correlations between the POI density layers of each category, we conducted the principal component analysis to eliminate redundancy. Since the contribution rate of the cumulative squared sum reaches 83.17%, only the first principal component image was used (Figure 3). A change in color from blue to red in Figure 3 corresponds to an increase in the POI density.

Composite POI Density and NTL Intensity Layers
Given that both the POI density and NTL intensity are linearly correlated to the leisure spaces, a multiple linear regression model was built as follows: where Compo represents the composite data of the study area, and the coefficients α and β are the weights of the POI density and NTL intensity, respectively. The optimal values of α and β are mainly obtained through repeated trials. Details will be discussed and explained in Section 4.5. The composite data generated will be used as the data for the subsequent research.

Theoretical Basis
In general, higher NTL intensities and POI densities indicate a higher possibility of nighttime activities. Moreover, specific POI categories are more closely related to nighttime leisure activities than other categories [65]. Therefore, the POI density and NTL intensity for a region can be conceptualized as a continuous surface of the intensity of human nighttime activity, in which the nighttime leisure space is analogous to a mountain on the Earth's surface topography [66]. Accordingly, by analogy, the detection of UNLSs can be regarded as identifying a mountain, namely, a set of contours, from a numerical composite data surface.
Driven by this analogy between UNLS and topography, we established a detailed workflow for UNLS mapping (Figure 4). This workflow includes four major components. First, we use NTL images and POI density maps generated from POI data to synthesize the composite data. Second, we extract the distributions of high-nighttime activity layers from the composite data. Third, we utilize these distribution layers to conduct functional classification and identify UNLSs using POI data. Finally, we calculate the attributes of UNLSs to reflect the UNLS distribution pattern.

Contour Map Generation
To prevent the generated contour lines from being jagged and irregular, a majority filter in ArcGIS was employed to smooth the composite data to attenuate noise within the data. Since the detected NTL intensity and the POI density of an urban leisure space must be higher than a certain threshold value, we first selected a threshold value as the base contour value, which was determined by using the density-curve method [67]. The core idea is that UNLSs are located in areas with high NTL intensities and POI densities. To improve the calculation efficiency of constructing contour trees, the contour interval was set to one.
Since an urban leisure space is associated with a set of concentric closed contours, to avoid the generation of open contour lines at the boundaries of the study area, we choose an external buffer zone of 5 km, however, when extracting a larger area of data, an open contour buffer zone of more than 5 km is not considered in this study, and the detected urban leisure space is defined as an area with a spatial extent of at least 0.1 km 2 . Specifically, if the area of a closed contour is smaller than 0.1 km 2 , the contour will be discarded without further consideration. From the perspective of local knowledge, we believe that selecting a threshold value in this manner can ensure that all important urban leisure spaces are included.

Localized Contour Tree
The localized contour tree method is a useful geographic tool that has been used to identify hierarchical relationships from topographic data [68]. In recent years, through improvement and promotion by scholars, this approach also has been successfully used for many purposes, such as map generalization [69], terrain analysis [68], and urban structure analysis [67,70]. In the current work, we use a contour tree to represent the topological relationship between adjacent nodes. A tree consists of a root node, a set of intermediate nodes, and a set of leaf nodes. Each node represents a closed contour, and the boundary between two adjacent closed contours. Each node has only one parent node, but there may be multiple children nodes.
A localized contour tree is constructed by using the tree growing algorithm. There are four steps to generate the contour tree: (1) Locate the seed contours; (2) generate the contour trees; (3) simplify the contour trees; and (4) extract the leaf nodes. Figure 4 shows how to construct contour trees based on sample intensity contour maps of the composite data, how to simplify these contour trees, and how to extract the leaf nodes.
The generation process of local contour trees is demonstrated in Figure 5 as an example. First, we define the seed contour as a closed contour that contains a sink point but does not contain any other contours inside. As shown in Figure 5, there are two seed contours, S and M, which are the firstlevel contours of the local contour tree; these seed contours are the starting points for generating the local contour tree. Then, we use the breadth-first priority search algorithm to identify and add the next two adjacent closed contours, N and R, around the seed contour M as their parent node to grow the contour tree. The process continues until the outermost closed contour V is included as a root node. Figure 5b depicts a simple two-branch contour tree generated by a two-level UNLS. Next, the contour tree is simplified to reflect the hierarchical structure of the UNLSs. Figure 5b shows that contours M, N, and R belong to the same branch of the contour tree, and there is no topological change along the branch; these contours can be regarded as the same contour, only contour R is retained to represent the whole M-N-R branch. In addition, the last node of the branch, R, represents the boundary of the leisure space. This procedure applies to all similar branches in the contour tree. V represents a composite leisure space containing two independent basic leisure spaces. Finally, we extract all leaf nodes as UNLSs. For example, in Figure 5d, leaf nodes S and R represent two UNLSs, which are delimited by the leaf-node contours of the simplified contour tree. It should be noted that in the process of growing a contour tree, if the value of the adjacent contour without topological change is greater than the value of its child node contour, for example, if the value of parent node R is greater than the value of child node N, then branch R-N-M proceeds from low to high, thereby forming a black hole against a bright background, and the contour and its branch both need to be discarded.

Identifying UNLSs from Contour Trees
An important and meaningful UNLS should have a sustained NTL intensity and POI density that are significantly higher than those of the surrounding areas. In a simplified contour tree, the contour lines corresponding to the leaf nodes represent the spatial extent of the UNLSs.
Since there are many kinds of nighttime activities in addition to leisure activities, there are also different behaviors such as working overtime. Furthermore, airports, hospitals, and residential areas also have high NTL intensities, and thus, these locations may be mistaken as UNLSs. Therefore, not all the leaf nodes representing the range of urban nightlife activity can be considered UNLSs. It is therefore necessary to identify the functional characteristics of these areas through the quantitative indicators of specific POI category, to remove nonleisure spaces and accurately extract UNLSs. In addition, we need to classify the nighttime leisure activities that correspond to the main functions of the corresponding leisure space. Referring to the research of Samuel et al. [71], we divide nighttime leisure activities into the following categories: Entertainment, life, sport, culture, and outdoor leisure activities. With each leisure activity category, the POIs that can best reflect different nighttime leisure activities are reclassified ( Table 2).
where is the leisure activity category, is the number of POIs in the ith category represented by each leaf node, and is the total number of POIs in the ith category. The largest i CR value represents the functional category of the leaf node.

Derivation of UNLS Attributes
In Table 3, two geometric attributes and four statistical attributes for each nighttime leisure space were calculated, the district (D), total number of leisure space (TN), total circumference (TC), total area (TA), total contour (TC), maximum area (MaxA), and maximum contour (MaxC). The contour of the largest leisure space in each district

Uncertainty and Sensitivity Analysis
The reliability and accuracy of UNLSs identified using our proposed method may be influenced by many factors. There are four uncertain factors in this research, namely, the data quality, basic contour, contour interval, and minimum UNLS area. (1) It should be noted that the geometric characteristics of a UNLS, especially its area and intensity, may be affected by the time and season in which the NTL data were collected. For example, an NTL image not only reflects the distribution of UNLSs, but also may include the distributions of streetlights and airports. In autumn, some UNLSs may be partially covered by leaves. In this case, the derived area and NTL intensity of a corresponding UNLS will be significantly underestimated. Therefore, the determination must be corrected by incorporating POI information. (2) When using NTL data and POI data to synthesize composite data, the selected weight coefficients and also determine the number and areas of detected UNLSs. When NTL data accounts for a large proportion of the total weight, a great number of small-area of nonleisure spaces may be generated. When POI data accounts for a large proportion of weight, the area UNLSs may be larger than the actual area. Therefore, we choose 0.1 as the interval to calculate the weight values between zero and one. (3) Since our method is based on the generation of contours, the selection of the basic contour and contour interval will also affect the detection result. The primary parameter is the contour threshold value, which is designed to ensure the detected UNLS are indeed UNLSs. (4) A large contour interval may produce fewer contours and decrease the calculation time of our method, but smaller leisure spaces are likely to be missed. Conversely, if the contour interval is small, the detection results will be more accurate and smaller leisure spaces are more likely to be included, but this will lead to an increase in the calculation time. Therefore, three different values (0.5, 1.0, and 1.5) are selected to analyze the sensitivity of the method to the contour interval. At the same time, a value of eight is used as the basic contour threshold. (5) In addition, due to the lack of quantitative UNLS research, the selection of the minimum UNLS area threshold will have an impact on the detection results. Selecting a low threshold may produce many meaningless UNLSs, while selecting an excessively high threshold may result in certain UNLSs being ignored. Therefore, we evaluate a series of minimum area values (0, 0.05, 0.1, 0.15 and 0.2) to estimate the impact of this threshold on the UNLS detection performance, in which the basic contour interval is eight and the contour interval is one.

Results
In this study, we utilized composite data generated from NTL images and POI data to map the UNLSs in Beijing, China. The UNLS distribution is suitably reflected. The physical features (i.e., location, shape and area) derived from the composite data effectively describe the physical elements of the UNLSs. The POI data indicate the function of a space, especially in areas with nighttime economic activities. Hence, the use of both data sources is beneficial for identifying the UNLS distribution in an urban area.

Generating a Contour Map from Composite Data
First, we sample the POI density map of the first principal component image at the same resolution as that of the NTL images. According to Equation (2), we generate composite data from the NTL images and POI data, where α is 0.2 and β is 0.8. Then, the density contour map of the composite data is generated by using a basic contour line of eight and a contour interval of one. A change from blue to red in Figure 6 reflects a transition in the POI density and NTL intensity from low to high. .

UNLS Distribution
According to the simplified contour map of composite data, Figure 7 depicts the specific geographical locations and scope of these detected UNLSs. This paper deduces 138 leaf nodes, which represent 138 UNLSs. The main area of Beijing has the largest amount of UNLS, accounting for approximately 80% of the total UNLSs. The locations of these UNLSs are associated with Beijing Commercial Street, such as Sanlitun, Wukesong, and Dashilan, etc. Tongzhou has the second largest number of UNLSs, mainly for life leisure activities. Shunyi and Daxing have the third largest number of UNLSs. Fangshan and Yanqing have the fifth largest number of UNLSs. Changping, Huairou, MIyun, Mentougou, and Pinggu, which are located in the suburbs of Beijing, have the fewest UNLSs, most of which are accompanied by government agencies, that is, in these suburbs, nighttime leisure takes place around government agencies.

Validation of the Identified UNLSs
Since our method can detect the location of each UNLS and their spatial range, our analysis results can be used to evaluate the actual nighttime life development plan of Beijing. The measures in the Further Prospering Night Economy and Promoting Consumption Growth plan issued by the Beijing Municipal Bureau of Commerce are important for assessing the nighttime economic development in Beijing; among these measures, there are important metrics: Nighttime landmarks, nighttime business districts, and nighttime living areas. For the purpose of verification, we manually identified the location of four nighttime landmarks, five nighttime business districts, and eight nighttime living areas (Figure 7), and compared the detected UNLSs with the urban nighttime life circles described in Table 4. All four nighttime landmarks, five out of nine nighttime business districts and eight out of nine nighttime living areas were detected successfully.  Table 5 lists the results of the two geometric attributes and four statistical attributes of the 138 UNLSs shown in Figure 7. The total UNLS area in Beijing is 31.08 km 2 , accounting for 0.2% of the total administrative area of Beijing. The largest UNLS is located in the main urban area, with an area exceeding 0.67 km 2 , and the smallest UNLS is also located in the main urban area, with an area of only 0.11 km 2 . In addition, according to the UNLS distribution in Beijing, we generated a UNLS intensity map of Beijing, as shown in Figure 8; where the intensity index is the ratio of the UNLS area to the total area.

Uncertainty and Sensitivity Analysis Results
As show in Figure 9a, to verify the impacts of the weights coefficients on the results, the total number of UNLSs in Beijing and the total number of planned UNLSs detected when β is between zero and one are counted at 0.1 intervals. The results show that when β is relatively small, the total number of UNLSs that can be detected is low, and almost all planned UNLSs can be detected, but there are cases where multiple UNLSs cannot be distinguished. When the value of β is relatively large, the total number of UNLSs that can be detected is high, the area of each UNLS is somewhat small, and different UNLSs can be clearly distinguished. In particular, when the value of β is 0.8, the total number of detectable UNLSs suddenly increases, but the planned number of UNLSs remains stable. Therefore, we set β to 0.8 and the α to 0.2.
As show in Figure 9b, when β = 0, the position of the detected UNLS in Beijing is basically the same as that obtained when β = 0.8. However, when β = 0, the area of UNLSs obtained are too large to give the precise distribution. In addition, when β = 0, the detected UNLSs are not all open at night. As shown in Table 6, the UNLS range and locations in the center of Beijing are not sensitive to changes in the basic contour threshold value, partly because the NTL intensities and POI densities of the UNLSs in this area are much higher than those elsewhere in Beijing. Due to the low basic contour threshold value, many small UNLSs outside the Fifth Ring Road can be identified. By comparing the results for basic contour threshold values of four, eight, 12, and 16, we found that at a threshold of four, more UNLSs can be detected in the suburbs, but the average area of 24 additional UNLSs is less than 0.1 km 2 . When the threshold value is 12, the number of UNLSs and their average area are significantly reduced. When the threshold value is eight, the number of UNLSs is stable, and the average area of UNLS is 0.23 km 2 . This sensitivity analysis shows that changes in the basic contour only slightly affect the UNLS detection results.  Figure 10 indicates that the result when using a contour interval of one is almost the same as that when using a contour interval of 0.5; that is, the resulting UNLS areas are very similar.
Although four additional small UNLSs are detected at a contour interval of 0.5, four small UNLSs were combined into four large UNLSs at a contour interval of one. Therefore, in fact, no additional UNLS is identified. When the contour interval is larger than one, the UNLS area slightly decreases, but the total number of UNLSs remains unchanged. Ultimately, we proposed a contour interval of one. Table 7 indicates a smaller contour interval does not seem to significantly improve the detection results, but the calculation cost greatly increases with a decrease in the contour interval.   Figure 11 illustrates that when the minimum UNLS area is in the range of 0-0.2 km 2 , the number of detected UNLSs gradually decreases, but when this parameter is larger than 0.1 km 2 , the number of UNLSs detected remains the same. This parameter is driven by the specific research area and objectives, and thus should be determined according to the actual situation of the research area. Figure 11. Sensitivity of the detected UNLS to the minimum area parameter.

Discussion
In this study, we used NTL images and publicly available social data to identify UNLSs, and we examined the spatial distribution of UNLSs in Beijing. The global UNLS distribution successfully extracted. We deduced the location and morphological and functional attributes of each UNLS from composite data. Available social data can reflect the human activities occurring within a space, especially a UNLS; accordingly, by using POI data, we labeled all detected UNLSs with their functions, as shown in Figure 7. Entertainment and life services clearly occupied a dominant position among the UNLSs. Next, we will discuss the UNLS distribution, and the sensitivity, uncertainty, and drawbacks of the proposed method.
(1) Spatial distribution of the UNLSs in Beijing From the NTL images and POI data, the distribution, geometric characteristics, and functional attributes of UNLSs were deduced. These characteristics and attributes may be related to the economic functions of the corresponding regions. Business and entertainment play leading roles in the central part of the city. Compared with those in the city center, the nightlife activities in the suburbs are not only small in both quantity and area, but also occur adjacent to government agencies. However, the growth of nighttime economic activities and the expansion of UNLSs in Tongzhou and other places indicate that Tongzhou is likely to become a core of UNLS development in the future.
(2) Superiority of the proposed method First, our method can not only detect the locations of UNLSs, but can also determine their spatial scope and boundaries; as a result, we were able to quantitatively analyze the morphological characteristics and related indicators of UNLSs. Second, the detected UNLS boundaries are not limited by those of the administrative unit within which the UNLS in located; consequently, the natural form of a UNLS can be reflected. Moreover, the proposed method can determine the nesting level relationship among different UNLSs and is suitable for identifying UNLSs at different scales. Third, we further performed tests using POI data or only UTL data to extract UNLSs. The results with only POI data reveal that because of the large number of POIs, many locations that are not open at night are also considered, and thus, the UNLS area extracted using POI data is too large to tell people exactly where to go at night. However, the area extracted by NTL data alone can be described only as an area with frequent nighttime activities. In other words, not all the areas with frequent nighttime activities are leisure areas; instead, these areas may be important transportation hubs, such as airports. However, when NTL images and POI data are combined, we can identify UNLSs more accurately.
(3) Limitations of the proposed method Although our approach can generate an UNLS distribution map for a given urban area, there are limitations, including the following. 1) The parameters selected, and linear model selected have uncertainties. The four parameters adopted in our method are based mainly on trial-and-error experiments and empirical knowledge, hence, these parameters may be arbitrary and subjective to a certain degree. In addition, a linear model may not be the best choice for combining two kinds of data. We will further study the data fusion model in subsequent research to obtain an improved model. Furthermore, the qualities of NTL images and POI data are not effectively verified, which may affect the experimental results to a certain extent. 2) Quantifying a UNLS results in a large area. To map in more detail, more quantitative indicators need to be integrated. 3) The socioeconomic factors of UNLSs need to be further analyzed to better reveal how social and spatial relationships dominate nighttime leisure activities.

Conclusions
Urban management requires maps of the spatial distribution of UNLSs, but the lack of available data sources poses a challenge to UNLS mapping. In addition, the physical form and function of a UNLS constitute the basis of further investigation. NTL images have the advantages of a large spatial coverage, high temporal resolution, and wide availability, etc. and these advantages enable the dynamic monitoring of UNLSs. POI data, directly reflect human activities, contain rich information on the functions of a space and can significantly complement traditional remote sensing data in the context of UNLS mapping. The physical characteristics derived from composite data and the functional attributes obtained from publicly available data are helpful for describing the utilization of UNLSs in detail. We developed a method to identify UNLSs in a large area and evaluated its effectiveness in Beijing. We successfully identified 138 UNLSs in Beijing, demarcated their boundaries, calculated their areas, and determined the overall UNLS distribution in Beijing. Most of the UNLSs in Beijing are distributed in the center of the city, which may indicate that the suburbanization of Beijing is still in its early stage. As long as there are NTL images and POI data, this method can be used to quickly obtain the UNLS spatial distribution map of any given large area. This is particularly important for developing countries.
In the future, we need to further improve the model, for example, by adopting machine learning to obtain more reasonable parameters to enhance the model accuracy.
Author Contributions: J.L., funding acquisition, project administration; Y.D., methodology, writing-original draft preparation; Y.W., data curation, validation; H.H., conceptualization of this study, supervision; Q.D., software, visualization; F.R., software, visualization. All authors have read and agreed to the published version of the manuscript.