Site Selection for Pre-Hospital Emergency Stations Based on the Actual Spatiotemporal Demand: A Case Study of Nanjing City, China

: Rapid economic and social development has been accompanied by the occurrence of many major issues throughout the world. Speciﬁcally, there is an ever-increasing demand for emergent medical services among the public. In order to ensure timely responses to emergency demands, it is critical to reasonably conﬁgure the emergency stations. In general, emergency stations are mostly distributed according to the distribution of emergency demands and response time, which, however, fails to consider the negative impacts of randomly occurring emergency demands and tra ﬃ c delays. In this study, ﬁrst aid demands are combined with tra ﬃ c states based on the spatiotemporal big data set covering model, which alleviates the negative impacts of randomly occurring ﬁrst aid demands and tra ﬃ c delay time on the planning of pre-hospital ﬁrst aid stations. Moreover, the accuracy of the site selection model is improved, which meets the requirements that all randomly occurring simulated ﬁrst aid demands can be approached within the target time under planning conditions and actual tra ﬃ c constraints. Taking Nanjing City as an example, this study obtains multi-source big data, such as ambulance-carried GPS data from June 2018 to June 2019, Gaode Map-recorded tra ﬃ c congestion data, and survey data of emergency rescue facilities. Basing on the processing and analysis of these data, it shows that ﬁrst aid demands in Nanjing City are highly region-speciﬁc with high time delay. Various required factors are determined based on modeling and analysis, and the target time is agreed to be 8 min. The average vehicle speed on each road is calculated, accompanied by the establishment of an actual road network model. In this context, the transit time from the randomly distributed ﬁrst aid stations to the hospital can be calculated, which are set to satisfy the model conditions so as to obtain the solution. Finally, such a solution is adjusted and veriﬁed according to the land-use situation. The results of this study, based on spatiotemporal big data, are expected to provide insights into improving the site selection model and enhancing e ﬃ ciency while providing new technical methods.


Introduction
With the advancement in the global economy and people's living standards, conflicts between resource exploitation and environmental protection have intensified. Emergencies such as natural disasters, accidents, and infectious diseases continuously occur, causing huge economic losses and serious life threats. Specifically, emergency-related economic loss has reached 6% of the total GDP in China, which, together with the public's growing demand for emergency facilities, reveal the prominent importance and urgency of effective urban emergency management. The outbreak of COVID-19 not only threatens the safety and properties of individuals but also disrupts the global economic order.
Moreover, anxiety has been spreading due to the economic slowdown and infrastructure imbalance. Although all countries have taken active countermeasures, there are still many exposed problems in emergency management, especially when it comes to the emergency medical service system.
Pre-hospital care refers to medical activities prior to the arrival of patients at hospitals, including on-site care and monitoring during transit. This should be performed by professional emergency groups that are equipped with communication tools, transportation gears, and medical instruments. The pre-hospital care system, the development of which is highly emphasized in countries all over the world, is an integral part of both the urban public security emergency system and the public health system. It does not only directly impact the actual demands of health protection and safety of people, but also is an important representation of public service equalization. The response time to an emergency call is a critical measure of the efficacy of the pre-hospital care system, and moreover, a reasonable placement of emergency facilities is key to effectively reducing the response time to emergency calls [1]. Construction of emergency facilities is guided and controlled during urban planning, via allocation and configuration of city space and specifically the use of land resources [2]. It is necessary to study the reasonability of the emergency facility's site selection to build a fair and accessible pre-hospital emergency network, so that any patient can receive timely and effective help when they need emergency treatment.

Literature Review
On the site selection of first aid stations and other emergency facilities, previous research on planning methods was often based on the graph theory, in which each demand zone is represented by a point in a network and the site selection problem is equivalent to the problem regarding the minimum distance or overall coverage of multiple point sets to/on specific facilities. For the preliminary site selection models represented by the coverage model, p-center model, and p-median model and its modified model, the geographic/gravity center of each demand zone is used to replace the set of demand points [3][4][5][6][7]. Correspondingly, site selection considers only the decreasing coverage level with the increasing distance and ignores the effects of the specific spatial distribution of demands within a certain zone upon site selection. Accordingly, a considerable part of demands is in fact ineffectively covered, especially in the case of a large demand zone. Estimation of demand coverage suffers from great errors, which leads to inappropriate station configuration in actual applications of many cities.
Over the recent years, the detailed spatial information provided by the expanded application of the Geographic Information System (GIS) and big data offers people more accurate measurement approaches, and researchers begin to realize the constraints of the previous data and technical approaches. Under such circumstances, a more precise and accurate description of the temporal-spatial variables of demands has gradually become a research hot spot. Some scholars attempt to integrate the first aid demand temporal-spatial variable into the site selection model based on the minimum distance solution, and thus overcome the failure of homogeneous distribution of demand zone points to capture differentiation of emergency demands. For instance, Degal et al. [8] and Chen et al. [9], with the help of GIS, make attempts on meshing the research area and statistically summarize the temporal-spatial emergency demand by grids, which however fails to efficiently reduce the impacts of the random spatial distribution of demands. This is because some grids may present no demands for several months, and moreover grids in corners are also required to fulfill the constraint of coverage levels. Then, Fan [10] applies the K-means clustering data mining to site selection of emergency response centers, in which facilities are constructed at the centroids of the current data point clusters. Zhou [11] and Dou [12] simplify zones with high medical emergency activity densities into demand points, by mapping medical contacts of pre-hospital care, and these demand points are preferably placed with first aid stations. Although one is able to simulate the complex demand distribution within a certain area via methods such as kernel density estimation and artificial neural network, it is hard to ensure that the obtained distribution can remain stable for a long period of time. Furthermore, the occurrence of medical emergency activities is uncertain. Given this, some researchers further incorporate randomness of first aid demands into their studies. Recently, to accurately describe the random spatial distribution of first aid demands for the site selection has become a key aim. For example, Beraldi and Bruni [13] propose a probabilistic model to optimize the emergency service vehicle location. Nonetheless, they describe the probable coverage of demands simply by introducing a sole randomness parameter and do not probe deep into the specific effects of spatial randomness upon demand distribution. Su [14] applies the Gaussian mixture model (using a soft clustering approach) into the depiction of spatial randomness of demand. Based on the emergency service data of the Songjiang District of Shanghai, China, in 2013, he manages to decompose the massive spatially random first aid demands into the mixture of multiple Gaussian-distribution clusters, and constrain that each cluster has only one primary station and one alternative station. In essence, the demand zone is represented by a point as before, which roots in low guidance provided by this research upon practical site selection.
Neglecting the spatiotemporal status of traffic can be fatal, in terms of ambulances that chase time. The ever-intensifying traffic jam in cities may result in delayed delivery of medical emergency service and elongated emergency response distance, which greatly threatens people's lives. In previously adopted models, the division of grids or the linear distance cannot represent the actual road route. Fortunately, this has been noticed, and some scholars have presented the spatial distance calculation method based on obstacles.
In the urban traffic system, the straight-line distance and the actual route distance between the demand point and the facility location have huge gaps. With the deepening of research work, it is found that demanders prefer to choose the least time-consuming route rather than the shortest-distance route. Therefore, time consumption should be introduced into the location model of emergency facilities as the transportation cost. However, since it is difficult to acquire the actual transit time of specific roads, the design speed for various roads [15] or the running speed of vehicles [16][17][18] are used to estimate the minimum travelling time in most research. Due to urban traffic congestion, vehicles cannot run at the designed speed most of the time, and thus the actual transit time is mostly longer than the designed counterpart. The development of wireless positioning technology and telecommunication technology provides a more precise way to acquire traffic congestion conditions and corresponding transit time. Recently, some studies have begun to use Gaode Map or Baidu Map to calculate the travelling time [19][20][21][22], acquiring the least transit time to the emergency facility with various traffic modes through the route-planning interface in API. This method sufficiently exploits road data provided and updated by the map developers to estimate the travelling time using reliable real-time vehicle speed data.
To conclude, much progress has been made in addressing the emergency site selection issue based on models that consider temporal-spatial demands. However, there are two prominent shortcomings in these models. The first one is the insufficient investigation into the randomly occurring first aid demands. Specifically, existing site selection models mainly focus on the statistical significance of the spatial distribution of first aid demands, which, however, is only a description of the historical data. In this context, these site selection models are not guaranteed to always be valid within the planning period. Although certain efforts have been made to incorporate the spatial randomness factor into the site selection model, there is still a lack of a random simulation method for spatial demands. Specifically, such a method is expected to not only accurately describe the demand distribution, but also effectively optimize the model based on the description. In this context, the emergency site selection issue can be better solved. The second shortcoming of existing models refers to unconsidered impacts of travel temporal distance. Although there have been studies that obtain traffic data through API and confirm the impact of traffic conditions on the accessibility of emergency facilities, the traffic factor has not been quantitatively incorporated in the site selection methods. This paper proposes a set covering model for site selection based on spatiotemporal big data. The massive simulated emergency service demands that are spatially random and the traffic status are integrated into the set covering model, which overcomes the difficulties in the description of emergency service demands, due to their complicated distribution, and also eliminates errors induced by the idealization of the traffic status. With Nanjing City taken as an example, multi-source data, such as the GPS data carried by the ambulances as well as the real-time traffic data and road network data obtained through the OPEN API of Gaode Map, are integrated into a spatiotemporal database. Based on this database, the annual first aid service data of the city in 2018-2019 are put into the clustering analysis. The clustering analysis simulation results and the characteristic speed of municipal roads of Nanjing City are input into the actual road network model, and substituted into the location-set model constrained by the planned land use. The models are solved, which can provide guidance on other similar emergency plans such as fire-fighting facilities and public security agencies while helping to optimize the urban emergency site selection in the context of the big data era. This paper is organized as below: The first part is the statement of the adopted model and method; the second is the basic analysis of the temporal-spatial data; the third part presents testing results of data and validation; and the last part states our research conclusion.

Set Covering Model
The set covering model is, in essence, a model for the solution of optimal location of discrete points. Discrete points generally refer to points with known demands, and the goal of the model is to find a solution fulfilling all known demand points. During the solving process, the quantity and location of placed facilities as well as the economic benefit shall be considered comprehensively. Depending on the solving method, the set covering model is divided into two types: the set covering model, and the maximum covering model. The set covering model requires minimum costs of facilities or construction, under the premise that all demand points are covered, while the maximum covering model pursues a maximum quantity of demands that can be fulfilled by appropriately placing service facilities, in the case of defined service station quantity and service range. The biggest difference between the maximum covering model and the set covering model is whether or not the quantity of facilities is considered. The former method emphasizes the fulfillment of demands, and yet the latter pays more attention to lowering cost ( Figure 1). Given that the first aid station planning in China aims at achieving the full coverage of the medical emergency service network upon urban and suburban areas of the whole city and actual conditions of the Nanjing City, the set covering model is used in this paper. The location coverage model is one of the most important site selection models for emergency response stations [23]. Toregas et al. [4] apply, for the first time, the location set covering problem (LSCP) model to determine the layout of fire stations, with the goal to cover all objects (points, lines, and planes) with emergency service demands while minimizing the emergency service facilities [24]. The basic model is shown below: min where V is the set of demand points, W is the set of facility service stations, i and j denote the different demand points and service stations, N i is the number of stations covering demand points i, and x j is a bool variable to evaluate the necessity of the j-th station. The objective function Equation (1) is to achieve a minimum amount of newly established stations. According to constraint Equation (2), each demand point is covered by at least one station. Equation (3) specifies that the variable x j is a bool type. Equations (1)-(3) are discrete models, requiring the input of a series of spatial demand elements (points, lines, and planes) and potential location sets of facilities.
x j is a node, and j reflects whether or not this node is chosen to build a facility (for being chosen, the value is 1; otherwise, 0). The facility planning with minimum quantities of planned facilities at certain locations enables the LSCP model to cover any continuous space, which also requires the value determination of the variables, namely the demand and candidate points, and solving x j . The detailed site selection optimization procedure of the model is presented below.

Steps of the Algorithm
The framework of the method illustrating the steps of the algorithm is presented in Figure 2. Firstly, ensure the variable values of the set covering model, candidate station sites are selected according to land use planning, and written in the set M, clustering analysis is performed for first aid service data and simulation of first aid demands is carried out as set V. Then build an optimization algorithm based on the site covering model and solve the model. The final planning sites are collected and written in the Set W, requiring that the ideal travelling time from the first aid station set M to the service demand zone V, t ij is lower than the specified time t r s for any simulated demand point in the context of the road network model T. The steps are described in detail below.

Determination of Variable Values (Demand Points and Candidate Points)
Identifying candidate station points according to the planning condition: Currently, there are 6 main modes for pre-hospital care in China due to differences among cities in their economic development and local medical emergency systems, including independent, hospital-built-in, government-operated, affiliated, fire-fighting department-integrated, and coordinative modes. For each mode, candidate site points are identified, according to the planned land use condition, and the set of candidate points is defined as M. For the demand temporal-spatial point presenting first aid service demands in 2019, the K-means clustering analysis is carried out. Subsequently, the Monte Carlo simulation of demand points is conducted, based on the results of the data clustering and Gaussian distribution fitting, which generates several random demand points for calculating the confidence level (under the premise that it follows the Gaussian distribution).
As a common method based on the probability statistics theory, a Monte Carlo simulation, also referred to as random sampling or the statistical test method, can be used to estimate the probability of an event based on the probability of the event in a large number of experiments. It works particularly well in estimating the dynamic nature of risk event systems such as first aid, and thus it is able to solve uncertain and complex problems. Its assumed function is as follows: where (X 1 , X 2 , . . . X n ) represents the probability of the spatial distribution of each group of demand points in the known demand point clusters in 2019. It is generally difficult to use analytical methods to solve the probability distribution of Y and its mathematical characteristics. The Monte Carlo method uses a random number generator to directly or indirectly sample the value of each group of random variables, and performs a large number of repeated independent random samplings of the random variables to generate a probability distribution of the function Y (i.e., the simulated first aid demand) that is close to the actual situation. The sampled values will then be substituted into the function in step (2) group by group until the final result is obtained.

Building the Site Selection Model
Now the model can be solved for x j , and the set of the ultimately planned stations W can be obtained by substituting the demand and candidate station points into the model. In terms of the set of the existing stations H, the default practice is to directly merge it with Set W with no change. Given the predictability of medical emergency service demands, the optimization algorithm of the set covering site selection model is used to determine whether or not each station j of Set M shall be included in Set W, and consequently, the minimized station quantity and distribution with maximized first aid service efficiency are obtained. The algorithm is shown below: where i is the label of a random simulated demand point, j is the label for a candidate station, V is the set of demand regions, M is the set of the new candidate sites, W is the set of planned emergency stations, H is the set of existing stations, t ij is the travelling time from station j to demand region i, according to the actual road network model T, and x j is a 0-1 variable, which equals 1 if an alternative site j is enabled and 0 otherwise.
Objective Function (5) requires that the quantity of constructed service facilities is minimized. Moreover, Objective Function (6) is a global constraint condition, requiring that the ideal travelling time from the first aid station to the service demand zone t ij is lower than the specified time t r s for any simulated demand point in the context of the road network model T incorporating traffic jam. Calculation of the actual traveling time t ij from the first aid station j to a random simulated demand point i within the research area needs the values of distance and vehicle speed. Here, first, we convert the coordinates of the random demand points, and candidate and current first aid stations defined in Section 3.1 into a unified coordinate system and then the temporal-spatial database. Meanwhile, with the help of the route planning program based on the Dijkstra algorithm, the shortest route between two element points in the weighted graph (namely the road network T) is calculated, which is divided by the transportation characteristic speed of the corresponding road to yield the traveling time that is converted into the time matrix t ij . It is required that more than 97% of the emergency services meet the maximum travelling time criterion (considering errors, α is artificially specified as 97%). This paper, taking the Nanjing City as an example, provides more accurate measurement methods for each variable in model equations, since it is based on actual demand points of emergency service events and road network data. Therefore, this study is able to more accurately capture the temporal-spatial characteristics of first aid service events, and ultimately generates more optimal site selection decisions. The next part describes the data sources obtained in Nanjing City.

Research Area
The present pre-hospital care mode in Nanjing city, the capital of Jiangsu Province, falls in the category of the affiliated mode, which means first aid stations are supported by general hospitals and community health services or township hospitals.
According to the analysis of a survey questionnaire, a total of 52 (i.e., the value of H) first aid stations are available in Nanjing City by June 2019. The allocation of these operating stations exhibits a general pattern with a higher density in the central urban area and a lower density in outer new districts or towns. Specifically, the density is obviously higher in districts such as the Xuanwu, Gulou, Qinhuai, Yuhuatai, Jianye, Qixia, and Pukou Districts (Figure 3). According to the Nanjing Regulation of Pre-Hospital Medical Emergency Service, urbanized regions should be equipped with stations within an ambulance action radius of 3~5 km, regions with dense population should be allocated with at least one station per 200,000 citizens, and each designated town or sub-district should have a station. It provides an estimation method for the coverage of emergency services in various areas. The coverage rates are 32% and 49% for service radii of 3 and 5 km, respectively.

GPS Data of Ambulances
The ambulance is a critical transportation tool for medical groups and services in case of emergency, and the installed GPS device on it records its moving trajectory and status within a certain period, which provides information on positions of accidents and first aid stations. GPS data of ambulances in Nanjing City during the period from 1 June 2018 to 1 June 2019 are obtained under the help from the Nanjing Emergence Center. In total, 99,598 records are valid, including critical information such as emergency call positions, responsive ambulance positions, and response time ( Figure 3). The data consist of 85,332 records of patient information, corresponding to a service rate of 85.7%. The total number of station-based and empty-run responses is 67,802 accounting for 79.5%, and the rest is for inter-hospital-transfer response and is beyond the scope of this study. The attribute data are processed and spatialized using the PostGIS software, and the attribute fields after processing include the ambulance plate number, departure time, site arrival time, site longitudes and latitudes, and name of the target place and its longitudes and latitudes (Table 1). It is seen that medical emergency service demands in Nanjing City is highly heterogeneous, in terms of the spatial distribution, and characterized by series delay, from a temporal point of view, which further validates the necessity of clustering simulation of the demand zone and obtaining the transportation characteristic speed in our model.  (1) According to the autocorrelation analysis of the whole area after spatial visualization, the global Moran's I coefficient has a value of 0.28, and z, a value of 3.60, suggesting the presence of high-demand cluster regions, and prominent spatial positive correlation and concentration characteristics of first aid service demand distribution. Generally speaking, the heterogeneous demand distribution features the central urban area, with intensively high demands and the circumferential newly emerging municipal area with relatively low demands. Moreover, the visualization analysis of the OD (original-destination) service distance from the first aid demand point to the first aid station in the ArcGIS software confirms the regional differentiation of first aid service demands. The first aid stations in the central urban areas are close to each other, resulting in highly overlapped service regions among neighboring stations and a consequently short service radius for each station. It indicates that several stations are commonly available for an individual position, without a clear boundary of the service area ( Figure 4). The outer suburban areas have a relatively low density of first aid stations, which thus have a large service region per station. The emergency routes converge to single points, as shown in Figure 4. In the suburban areas, emergency demands in Liuhe District mainly rely on Liuhe People's Hospital, those in Gaochun District on Gaochun People's Hospital station, and those in Lishui District on Lishui People's Hospital. Similar rules are also true for Gaochun District Dongba Station, Pukou Central Hospital Linqiao Station, and Meishan Hospital Sub-Station. Quantitative statistics show that the average response distance for first aid services is 3.8 km, while the peak probability is located from 3 to 4 km. The cases with response distances over 4 km account for 37.3%, which is a considerably large fraction ( Figure 5).  (2) According to the time difference between the ambulance departure time and the site arrival time, the average ambulance travelling time is 14.6 min. Spatial statistics of seriously-delayed cases with travelling time over 20 min show that the distribution of highly-delayed demand points generally coincides with that of the overall service demand points, which therefore demonstrates that the response delay is a city-wide systematic issue. Although the central urban area has a high first aid station density, it suffers from response delays due to the low traffic efficiency. On the contrary, the circumferential suburban area is prone to medical emergency service delay, owing to the low density of first aid stations and thus long travelling distance. According to the average travelling time per unit distance (Figure 6), the travelling time consumed by the same distance is highly differentiated, and the response time of ambulances during rush hours is longer than that during non-rush hours. These indicate that the travelling time of ambulances is tremendously restrained by traffic efficiency, and thus obtaining the characteristic road speed of Nanjing City through the API of Gaode Map is necessary for the estimation of ambulance response time.

Obtaining Real-Time Traffic Data through the Gaode Map Open API
It is noted that a more accurate calculation for transportation costs would contribute to a more accurate evaluation for medical service efficiency and capability, during the investigation on emergency service accessibility. Thus, through the analysis of big data concerning transportation, road congestion is introduced into the optimization of site selection in this study, for the sake of more rational planning. Gaode Map offers travel data of both the floating car of the transportation industry and over 700 million users of this app, and it is available in 40 cities of China including Nanjing. The traffic situation data for roads of all levels within the research area are requested and obtained via the Gaode web-service OpenAPI, specifically including the road name, road geographic coordinate geometry, road speed, congestion status, and so on. The overall idea can be summarized as follows: To begin with, data for model parameters are requested via the traffic situation API of Gaode. Since it is required that the request zone shall be rectangular, the urban road network is first divided into several units when obtaining the actual road network model T. Then, the traffic situation acquisition software runs, and the original traffic information within the longitude and latitude range of each unit is extracted and imported into the database. Finally, the units are merged into the actual regional road network, and the original data are pre-processed and linked to the effective traffic information. Furthermore, it is set that the traffic information database acquisition software runs automatically for 28 days in a row at the interval of one hour (3600 s), which achieves the intelligent batch processing of streaming data and thus automatic acquisition, pre-processing, spatialization, and saving (in the format of shapefile) of the city-wide traffic situation data and building the traffic situation temporal-spatial database. After dimensionality reduction, the characteristic speed of each road is extracted and mapped. Statistics of all traffic data of Nanjing City from May 28th to June 10th 2019, provided by Gaode Web API show that the city-wide daily traffic congestion delay index of Nanjing is about 1.55, and the daily average speed is around 28.29 km/h. During rush hours, the congestion delay index grows to 1.81, with the average speed slowed down to 24.21 km/h. The region within~5 km from the central urban area is characterized by overall slow (jammed) traffic and local presence of unblocked traffic. Meanwhile, in the region far away from the urban area, traffic in most roads is smooth, while some congested road sections exist in the central areas of this region and cross-region main roads. Urban traffic congestion of Nanjing has evolved into a malady and severely impacts emergency response and rescue.

Determination of t r s
t r s refers to the target response time for first aid services in Nanjing City, and is typically defined as the time consumption between the emergency call and the arrival of the ambulance at the demand location, composed of the time for emergency call answering, staff response, and ambulance travelling. Therefore, before determining the target time, one first needs to analyze the current temporal characteristics of medical emergency service in Nanjing Cities, using the GPS data of ambulances. According to the statistics of Nanjing Emergency Center, the current average emergency call answering time is 1 min, and the average staff response time is 3 min. The analysis of ambulance GPS data reveals an average travelling time of 14.6 min. Hence, the total average response time is 18.6 min, with a median of 17.03 min, which is slightly longer than the Chinese national standard of 15 min [25][26][27]. This paper highlights the planning and site selection of first aid stations constrained by the emergency response time, so as to reduce the time consumed by the process to transfer patients to hospitals for medical emergency services after answering the emergency call and sending out the ambulance. At present, the average emergency call response time for developed countries is within 8-12 min [28][29][30], based on which the target emergency response time is set as 12 min, also with consideration of illness and megacity. Given the current pre-hospital care reality of Nanjing City (namely the average emergency call answering time of 1 min and the average staff response time of 3 min), the ambulance travelling time t r s in this paper targets 8 min, and this time target is used for planning the first aid station network of Nanjing City.

Selecting Candidate Station Sites According to Land Use Planning and Writing the Selected Sites in the Set M
The pre-hospital care mode in Nanjing City falls into the category of affiliated mode, i.e., hospitals are involved in the co-building of their respective emergency stations. According to Nanjing Medical Treatment and Public Health Facility Planning, a total of 2083 sites are selected as candidates from three kinds of land usages, including general hospitals (A5), community public health service centers (Aa), and community public health service stations (Rc) (Figure 7).

Clustering Analysis for First aid Service Data and Simulation of First aid Demands
The K-means clustering analysis is conducted for the first aid service demand spatiotemporal points n in 2018-2019, with the cluster number of K. The averages of the lateral and vertical coordinates of points of each cluster relative to the cluster center µ and the covariance COV are calculated and satisfy the test function of the normal distribution. The Monte Carlo simulation of demand points, based on the results of clustering and Gaussian distribution fitting of data for 2019, is performed to generate several random demand points, in order to calculate the confidence level. It should be noted that the K-means clustering requires the input of the cluster number K (in this paper, 200). The clustering process mainly involves three steps: First, K random initial points are taken as the centroids of clusters. Then, according to the distance to the centroid, data in the data set are allocated to each cluster, and the average value of the data within each cluster is computed and taken as the new centroid. At last, the previous step is repeated until all clusters remain un-changed. The analysis of the clustering results in cases of different K values shows that K = 200 presents the optimal performance in data grouping based on temporal-spatial characteristics, specifically with neither shadowing of characteristics nor chaotic classification (Figure 8).

Building the Road Network Model and Calculating the Minimum Time Matrix t ij
The road network data set is constructed and used as the traffic network model, based on the processed Shapefile-format road network file, after topological processing such as intersection breaking and interface merging. The data set includes road sections and intersections. The road section is the line element for the road network, and it is represented by the arc in ArcGIS. Each road section possesses attributes such as the congestion vehicle speed (km/h), average vehicle speed (km/h), traveling time in the case of the average vehicle speed (s) and length (km). Road intersections are represented by nodes in ArcGIS and combined with the table of turning instruction at road intersections. Thus, they are able to truly mimic the actual traffic scenarios such as waiting for the red light, no-straight-through, no-left-turning, and driving through an overpass. In ArcGIS, the time required for each road section is calculated, with respect to the actual road network and corresponding characteristic speed. In this research, the characteristic speed refers to the actual average travelling time. Vehicle speed data between two consecutive weeks within the research period are compared, and the covariance calculation results show that the distribution curves for the average speeds at a certain o'clock sharp can be well fitted, with a correlation coefficient of 0.973. Thus, it is safe to say that the data of the two weeks used in this research are periodically representative.

Collecting Final Planning Sites and Writing Them in the Set W
The existing 52 sites of Set H are directly added to Set W. Via the algorithm presented in the first part of this paper, the calculation is performed to determine whether or not each station j in Set M should be included in Set W. The actual factors of Nanjing City are substituted into the global condition constrain equation one after another. As stated above, t r s is set as 8 min, and α is 0.97. For any random simulated demand point j generated by clustering, it is required that the travelling time to the station i in Set M (plus the OD time matrix t) should be less than 8 min. Accordingly, the least station quantity x j and distribution of j, with the maximized emergency response efficiency, can be obtained.

Iterative Computation in Matlab
Results show that at the 120th iteration the optimum solution is obtained (Figures 9 and 10). The optimal quantity of constructed stations is 134. After mapping the results into space, the 52 existing facilities can be simply identified, and 82 potential station sites can be selected among the other candidate points.

Examining and Adjusting Simulated Results
First, the land usage corresponding to the location of the planned station site should be clarified. Fine adjustment is conducted according to the following preference sequence, general hospitals (A5) > community public health service centers (Aa) > community public health stations (Rc), to facilitate the implementation of the planning.
The eventual planning of the allocation is shown in Figure 11. The planning involves a total of 136 emergency stations, with 48 stations reserved, 88 newly established, and 8 adjusted. A total of 99 stations mainly serve the central urban regions while other 37 stations serve the suburban regions. With the planning, the coverage rate of the 3-km service radius is increased from 32% to 63%, and that of the 5-km service radius is increased from 49% to 95%. Each town in the suburban region has at least one emergency station. The average response time is decreased from 18.6 min to 12 min. Figure 11. The final layout of first aid stations.

Discussion
(1) The optimization of emergency facility sites has been a classic research topic in the field of geography. Compared with the traditional model, the optimized location set coverage model is demonstrated to greatly improve the coverage and effectively shorten the emergency response time. This confirms the presence of obvious shortcomings when it comes to the distribution of pre-hospital emergency stations in Nanjing City. Specifically, current emergency facilities are far from meeting emergency demands due to insufficient and unbalanced allocation of medical resources in various districts. The overwhelmingly concentrated medical resources in Gulou and Xuanwu Districts contradict the goal of Nanjing's multi-center development plan of "one center and three sub-cities". Moreover, the unbalanced allocation of emergency resources is also present within each district. For instance, emergency resources in the Xuanwu and Gulou Districts are mainly concentrated on the south and east of Xuanwu Lake, respectively. (2) The time target parameter in the proposed model is selected according to the existing data analysis and the actual situation of Nanjing City with references to the requirements of other cities in China and other countries. In the future, with the further improvement of the first aid legislation and various supporting facilities, the government may be able to further shorten the target emergency call response time. Moreover, the emergency response time and personnel response time may be incrementally reduced with promoted standardized management. In addition, the traffic cost based on the road network model may be changed as a result of road reconstruction and expansion. Therefore, it is crucial to adjust and update the dynamic factors in the model in a timely manner. Accordingly, traffic data over a longer period of time will be collected to observe the changes in vehicle speeds during different seasons and months, which will help obtain more accurate time cost factors that can be substituted into the model. Furthermore, the emergency data in 2020 can be acquired and substituted into the proposed model for further comparison and verification.

Conclusions
Digitalization in the new era has penetrated all aspects of urban life, transportation, and medical care. The development of spatiotemporal big data provides new opportunities for optimizing the emergency site selection. This study first introduces the basic model of emergency site selection based on actual traffic conditions and the simulation method of random spatial demands. Subsequently, it is proposed that these random spatial demands should be processed based on the actual data, accompanied by the application of the K-means clustering method to quantitatively describe and simulate the distribution characteristics of emergency demands. On this basis, an optimization algorithm that integrates the actual speed of the road network into the set coverage model is established, which contributes to a shorter time than the target counterpart from the simulated demand point to the emergency station at the actual speed. In the practical analysis, the first aid data of Nanjing City from 1 June 2018 to 1 June 2019 are first analyzed in terms of their spatiotemporal characteristics, followed by the determination of various necessary factors based on the modeling analysis. Eventually, the model is solved under the land-use constraints, with an agreed target time of 8 min. This paper attempts to apply the location set covering model integrated with the temporal-spatial big data into the urban planning, so as to provide a novel model for site selection of emergency service facilities that incorporates the randomness of emergency service events and traffic situations that have previously been neglected in research. The availability of emergency service and traffic spatiotemporal big data provides a more accurate data basis for the model, which is vital for the site selection of pre-hospital care facilities that requires high accuracy and timeliness. This research was commissioned to the Nanjing emergency center, and the research result provided theoretical support to the "layout planning of Nanjing first aid station" which is a legal planning implemented by the local government since 2019. The methodology used in this research provides a digital perspective of urban inherent law and a new branch of emergency facility renewal which could be learned and popularized. Moreover, this study also offers a digitalized perspective for probing into the intrinsic regularity of cities and modifying the conventional layout planning method.