ANALYZING THE SPATIOTEMPORAL PATTERNS OF EMERGENCY MEDICAL TRAVELS FROM FCD DATA

Night emergency medical service as an emergency situation usually requires fast response time. This is not only related to the accessibility of the road, but also to the spatial distribution pattern of the hospital. A reasonable spatial distribution can help reduce travel time. Based on the characteristics of hospital trips in Shanghai, this paper extracts the night emergency medical visit trajectories of Shanghai from Floating Car Data (FCD) and analyzes the general statistical characteristics, including time characteristics, travel distance, etc. Using the alpha-shape algorithm and Moran ’s I index, the spatial distribution patterns of medical facilities in Shanghai was explored. The results show that: (1) The emergency medical travels mainly occur before midnight (18:0024:00), and the number of weekend travels is slightly less than that of working days; (2) The travel radius of most emergency travels is less than 15km, and the time consumption is less than 30 minutes; (3) In terms of spatial distribution, the medical resources in Shanghai have great regional differences and high concentration, showing a "core-edge" pattern. The medical resources decrease from city centre to the suburban area in a radial pattern. These findings are helpful for us to understand the characteristics of emergency travels in cities and identify areas where medical resources are scarce. It can provide suggestions for the decision makers in the Ministry of Health and help optimize the allocation of medical resources. * Corresponding author


INTRODUCTIONS
As the core element of public infrastructure, medical facilities are closely related to the health of residents. The reasonable allocation of medical resources is not only related to the life quality of residents, but also to the stability of the country and society (Jia et al., 2015;Nakamura et al., 2017). Analysis of the use and spatial allocation of medical institutions may provide guidance for the choices of patients and reduce the time cost of hospital travels. Especially for the hospital visits at night (i.e., emergency medical travel), the travel time consumption should be reduced as much as possible, which pose higher challenges to the rational allocation of urban medical resources. In addition, for the emergency travels, the choice of hospital is mainly affected by the spatial location and traffic conditions. Consequently, the analysis of the emergency medical travels of residents can allocate the medical resources more accurately and reasonably.
Traditionally, the analysis of spatial allocation of medical facilities is mainly based on census data, survey data, hospital records and other static data (Kong et al., 2017). However, since these data are related to the privacy of patients and their statistics usually take a long time, it is difficult to use them to analyze the accurate spatial distribution of medical institutions. With the development of sensor technology, the availability of FCD data has been widely concerned Zhong et al., 2014;Van et al., 2019). FCD data contains location and time information, which can help research in many related fields. For example, Gong et al. (2016) inferred the purpose of travel from a large amount of FCD data and enriched the semantic information of the trajectory data.  designed a new recommendation system to provide better suggestions for people's travel choices. Kong et al. (2017) use FCD data to classify hospitals from the perspective of spatial interaction. Wang et al. (2019) use FCD data to estimate the area wide traffic congestion of hospital. Except that, the urbanism research using the newly movement data can improve its ability to understand the city pattern (Sulis et al., 2018). According to a research in Shen Zhen (an important city in china), the taxi travels account for 20-30% of total travels to general hospitals (Chen et al., 2014). Especially, in case of emergency medical travels at night, that are all travel s related to the hospital at night, the proportion of taxi travel will be even greater. Consequently, it is reasonable to use a large amount of FCD data to explore the patterns of emergency medical travels.
Shanghai is one of the most important cities in China, with a very high population density. With the acceleration of urbanization, the scope of urban has continued to expand. However, most medical facilities are located in the centre of city, which makes the contradiction between the increase in health needs and the shortage of medical resources increasingly serious. Therefore, from the perspective of spatial interaction, exploring the spatiotemporal patterns of medical resources in Shanghai has important theoretical and practical significance for understanding the status of medical resources. In this study, we use a large amount of FCD data to extract emergency medical travels, and analyze the general statistical characteristics of emergency travels, including time characteristics, travel distance, etc. On the basis of extracting the service scope of the hospital, the number of available hospitals in the area is counted, and the spatial patterns of the number of available hospitals are analyzed using an autocorrelation algorithm.
The contributions of this study can be concluded in two aspects. First, from the perspective of spatial interaction, FCD data is used to connect medical facilities with customers, instead of using static data such as census data. Therefore, the results have good real-time performance. Secondly, unlike traditional algorithms, which use a circular area to represent the hospital's service scope, this study uses the boundary extraction algorithm (alpha-shape) to extract the service scope of the hospital. It makes the calculation results more accurate. Moreover, this research can provide reference for government and health sector and help optimize the spatial allocation of medical resources.
The remainder of this paper is organized as follows: Section 2 describes the study area and methods used in this research; Section 3 present the results of the spatiotemporal patterns of emergency medical travels in Shanghai; and Section 4 offers conclusions and future research directions.

Study area and data
2.1.1 Study area: In this study, the urban area of Shanghai is selected as the study area (excluding Chongming island and Changxing island) (see Figure 1). As a most international city of china, Shanghai is the centre of economic, financial, trade and technological innovation. In 2018, Shanghai had 24 million permanent residents (Wei et al., 2019) and 16 districts with the total area of more than 6340km 2 . In Shanghai, there are three most important transport rings, namely the inner ring, the middle ring and the outer ring (see Figure 1). The population of Shanghai is mainly distributed within the outer ring road, which is the central area of the city.

Hospital data description:
The hospital data were obtained from the Shanghai Health Statistics Yearbook 2017, the Shanghai public open data system (https://data.sh.gov.cn/ index.html) and OpenStreetMap (http://www.openstreetmap. org). The hospital data contains the information on name, type, location, the number of beds. The preprocessing of hospital data is as follows. Firstly, the point data of the hospital is superimposed on the Gaode map through coordinate transformation. Then through the data vectorization processing, the point data is converted into the surface data. Finally, the area of surface medical facilities is calculated. Considering the comprehensive strength of the hospital and the particularity of emergency travel, hospitals with an area of less than 50 m 2 are deleted. In the end, the number of medical facilities we selected is 320, among them, there are 78 top third-class hospitals, 7 General tertiary hospitals, 137 second-class hospitals and 105 first-class and below hospitals. These hospitals do not include specialist hospitals such as cosmetic surgery.

General FCD data:
The taxi trajectory data used in this paper are provided by a commercial company. It is temporally ordered position records collected from about 6000 GPS-enabled taxis. The data is collected in a period of 30 days from 1th June to 30th June, 2018 with the average sampling interval of 10s. In the databased, each vehicle trajectory data is a series of position records arranged in chronological order. Each record has 9 fields: Taxi ID, Day, Time, Speed, Direction, Longitude, Latitude, Vehicle status (occupied or not), Company. The Taxi ID is the unique identifiers for the taxis. The day and time are the accurate data and time for each record. Speed represent the speed of the taxi at the given time. The direction is the horizontal angle measured clockwise from north direction. Vehicle status is a Boolean variable that denotes whether the taxi is carrying passengers.
In space, the raw trajectory data is represented by a series of discrete points. Figure 2 illustrates the GPS points of one taxi. The blue line indicates that the taxi is occupied and the gray line represents the cruise status. The trajectory line is generated in chronological order.

Travel indicators:
According to previous studies on transportation travel, the characteristics of transportation are mainly described by travel volume, travel time, distance, speed and direction (Xiaona et al., 2017). In order to explore the characteristics of hospital travels, four indicators are selected in this study: travel volume, departure time, travel time consumption and travel distance. We first give the formal definition of these indicators.
Travel volume. Number of all trajectories related to the hospital Departure time. The departure time of the travel. Travel time consumption. It refers to the total time of the travel from the beginning to the end. Travel distance. It refers to the trajectory distance of the travel, which is the actual distance travelled by taxi on the road network.

Hospital visit travels detection
Step1 Detection of OD travels Medical travel is a kind of travel where the destination or departure is within the scope of the hospital. In order to extract medical travels, we first constructed the origin-destination (OD) travels of trajectories. An OD travel is denoted by a vector from (xo, yo, to) → (xd, yd, td), where (x, y) represents the coordinates of the origin / destination (O/D) point and t represents the time. Figure 3. An example of the hospital scope. The red line represents the initial hospital scope, the blue line represents the hospital scope including the road width and the black line is the final scope of the hospital.
Step2 Determination of hospital scope Since most hospitals do not allow taxi to enter and the origin/destination points are located on the road network, road information is required to determine the scope of the hospital. The determination of the hospital scope is shown in Figure 3. Firstly, expand the scope of the hospital according to the road network around the hospital. Secondly, for the data has a 10-20 meters error due to unstable signals, we choose a size of 20 meters for buffer processing in the hospital.

Step3 Extraction of emergency medical travels
Since this study is an analysis of the spatiotemporal patterns of emergency medical travels at night, we only need to select the arrival activities happened in the scope of the hospitals. In other word, we choose the trajectory whose destination point (D) is within the scope of the hospitals. The time range is 0-6 a.m. and 18-24 p.m.
After extracting all eligible OD travels, the corresponding occupied trajectories are obtained in the database. And use these trajectories to analyze the spatiotemporal patterns of emergency medical travel at night. In addition, we filter out the unreasonable travels less than 500 m or more than 100 km, which are typically caused by operation errors or data transfer errors.

ALPHA-SHAPE
For simplicity, previous studies generally considered that the service scope of a hospital is a circular area, with the hospital as the center and the radius as a specific value. In reality, the service scope of the hospital will be affected by other factors such as the road network. It is inaccurate to simplify the service scope of a hospital to a circle area. Recently, the development of the spatiotemporal trajectory has provided a new perspective for the research of service scope. When depicting the daily activity space of an individual, the most widely used measurements are standard circle, standard distance ellipse, and so on (Yin et al., 2013). However, there are some problems in these methods, such as the enlargement of space scope and the difficulty of parameter determination (as shown in Figure 4). In order to solve these problems, some scholars have proposed the alpha-shape algorithm, which can extract data boundaries from a set of unordered points (Asaeedi et al., 2013). Suppose there is a point set S, which consists of n points. Draw a circle with radius α through any two points P1 and P2. If there are no other points in the circle, it is determined that the line between the points P1 and P2 is a boundary line segment. For a better understanding, we can imagine a circle with radius α rolling around the point set S, and the rolling route is the boundary of the point set. So theoretically, if α is small enough ( 0  → ), then every point in the point set is a boundary point. If α is large enough ( →), then the polygon is the convex hull of the point set. This method can effectively avoid the problem of space expansion (Mu et al., 2011). Consequently, the alphashape algorithm is used to extract the service scope of the hospital in our research.  Tobler (1970) pointed that all attribute values are geographically related, but closer values are more closely related than distant values. Therefore, the geographic data may not be independent, but interconnected due to spatial interactions (Yin et al., 2018). In this section, the spatial autocorrelation is used to explore the spatial distribution characteristics of medical facilities. Spatial autocorrelation includes two parts: global spatial autocorrelation and local spatial autocorrelation.

Spatial autocorrelation
Spatial autocorrelation is an important index to study whether the attribute values of a certain location are related to those of adjacent locations . Global spatial autocorrelation is a global description of the spatial characteristics of attribute values, which is used to evaluate whether the distribution pattern is clustered, discrete or random. In this study, Moran's I index, a very classical global spatial autocorrelation index proposed by Patrick Alfred Pierce Moran in 1950(Moran, 1950De et al., 2010), is used to evaluate the spatial distribution of medical facilities. It is calculated as follows, indicates that the study object is spatial positively autocorrelated, and I < 0 shows a spatial negative autocorrelation. I = 0 means spatially uncorrelated. In order to further analyze the relationship between local area unit and adjacent units, the local spatial autocorrelation of each location space needs to be calculated. Through local spatial autocorrelation analysis, the spatial distribution of cold spots and hot spots can be identified. The local spatial autocorrelation is calculated as follows,

General statistical characteristics
From 1th June to 30th June, 2018, the total number of emergency medical travels at night is 78849, with an average of 2700 per day. Spatially, the origin points of emergency medical travels are concentrated in areas within the outer ring of Shanghai, and the rest are scattered in the centre of the suburbs (as shown in Figure 5). In order to better understand the spatiotemporal characteristics of emergency medical travels, we made statistical analysis on travel volume, departure time, travel time consumption and travel distance. Travel volume. The line chart of the number of emergency travels is shown in Figure 6, in which 2, 3,9,10,16,17,23,24 are weekends. From the change of the number of emergency travels, the number of travels at weekend is lower than that at weekdays. It may be that people are more likely to choose other ways to go to the hospital on weekends, such as private car.  Figure 7), it can be found that the number of emergency travels before midnight is significantly higher than the number of emergency travels in the time after midnight. The number of travels between 18 p.m. and 24 a.m. shows a stable high state, and the number of travels after midnight has been declines significantly. And after 5 a.m., the number tends to rise.  Travel distance. The travel distance is consistent with travel time consumption, which is very important for patients to choose hospital. As shown in the Figure 9, the travel distance is mainly distributed between3 km and 5km. Overall, 75% of travels are within 15km. Figure 9. Frequency histogram of travel distance.

Spatial characteristics analysis
This section mainly analyzes the spatial distribution characteristics of medical resources in Shanghai. An important indicator is the number of available hospitals in the region within a certain distance, which accounts for the potential interaction between patients and hospitals. In this study, two steps are needed to calculate the number of available hospitals. For the service points (hospitals), the service scope of the hospital is extracted based on the origin points of the hospital travels. Then, for the demand points, using spatial statistical methods to calculate the number of available hospitals. For example, assuming that the service scope of N hospitals includes area i, the number of available hospitals in area i is N.
The origin points of emergency travels of each hospital are extracted to form a point set (see Figure 5). In this study, the alpha-shape algorithm is used to extract the boundary of point set as the service scope of hospital. For example, it is the boundary of origin points of emergency travels of Ruijin Hospital in Shanghai (as shown in Figure 10,). The alpha-shape algorithm can effectively filter out some sparse noise points and obtain a more reasonable service range. After calculated the service scope of all hospitals, we further perform a visual analysis of the service scope of all hospitals. Figure 10. The boundary of origin points of emergency travels.
The study area is discretized into 1,000×1,000m grids and the number of the available hospitals within each grid cell is computed to depict the geographic distribution of the supply of medical resources. From the spatial distribution of the supply of medical resources (as shown in Figure 11), we can see that the spatial distribution of medical resources in Shanghai is unbalanced. It is worth noting that the medical resources in the area within the outer ring are distributed in a circular pattern, which overlaps with the ring lines in Shanghai (see Figure 1). There are abundant medical resources available in the area within the outer ring, but few in the suburb. Figure 11. Spatial distribution of the number of available hospitals.

Spatial autocorrelation analysist
The global spatial autocorrelation of the number of available hospitals in the study area is analyzed to explore the distribution patterns in space. The result shows that a significant positive global spatial autocorrelation exists with a Moran's I index of 0.98 (p<0.001). It means that the statistical analysis of the available hospitals in the entire study area presents a strong intensity of clustering in space. A phenomenon of imbalance exits in some areas of more medical resources and less medical resources.
In addition, the local indicators of spatial association (LISA) is adopted to explain the relationship between its adjacent space units and identify the hot and cold spots in the entire study area. As shown in Figure 12, H-H type distribution shows an obvious agglomeration pattern, which is mainly distributed in the area within the outer ring of Shanghai, accounting for 11% of the entire study area. There are more available hospitals in the H-H type area compared with the entire study area. The L-L type occupies a large area in the suburbs, accounting for 45% of the entire study area. There are fewer hospitals available in the L-L type areas compared to the entire study area. Figure 12. The spatial distribution of local correlation.

CONCLUSIONS AND DISCUSSION
In this study, the FCD data are used to explore the spatiotemporal patterns of emergency medical travels. The results are twofold. On the one hand, it reveals the spatiotemporal statistical characteristics of emergency travels, which can provide some references for the work of the medical department. On the other hand, by extracting the service scope of the hospital, the spatial distribution characteristics of medical resource services are calculated and analyzed. We find that the medical resources in Shanghai have great regional differences and high concentration, showing a "core-edge" pattern. These findings are helpful for us to understand the characteristics of emergency medical travels and identify areas where medical resources are scarce.
However, this study has some limitations. Firstly, the FCD data used in our research is the taxi dataset without considering other individual patient travel data such as private cars and ambulances. While these datasets are more ideal, considering their unavailability due to privacy, the taxi dataset are used in our study can serve as a good proxy to analysis the characteristics of hospital visits. Consequently， the calculation results can only qualitatively reveal the spatial and temporal characteristics of emergency medical travel, and the parameters such as the number of visits have no reference value. Secondly, the rationality of medical resource allocation is a complex issue, which is closely related to population density and transportation.
In the further, more detailed analysis of the distribution characteristics of medical resources should be combined with population data and road network data, which may be helpful to supplement the results of this study.