# Applying Real-Time Travel Times to Estimate Fire Service Coverage Rate for High-Rise Buildings
## 2 Methods
### Data Extracting and Processing  
The Baidu Map is one of the most widely used online maps in China and stores more than 150 million POIs [17]. In this study, POIs, longitudes and latitudes of fire trucks, and travel times and travel distances were extracted from the Baidu Map (Baidu, Beijing, China) by calling its web service APIs using JavaScript program. The extracted data was stored in an SQLite database through Web SQL of the WebKit-based browser. Subsequent data processing and analysis were also performed by the JavaScript program. There are four steps (containing identifying high-rise buildings, geocoding fire apparatuses, extracting travel times and distances, and analyzing and calculating) in the flow of data extraction and processing as shown in Figure 1.  
(1) Identifying high-rise buildings. The big data of POI stored on the online map covers the names, addresses, longitudes, and latitudes of almost all types of buildings. Obviously, most high-rise buildings are also covered. However, whether a POI is a high-rise building cannot be determined directly. When constructing a high-rise building, it is necessary to go through the administrative license procedures in the relevant government departments, among which the fire administrative license is handled in the fire department. Therefore, the high-rise building list in a region can be gathered from relevant government departments. The list often includes names, addresses, heights, areas, and other information about high-rise buildings. However, part of these names and addresses may not be accurately recorded, and they may not match the actual situation due to the updating of road networks and the renaming of buildings. However, accurate names, addresses, latitudes, and longitudes of high-rise buildings can be identified and obtained by matching the gathered high-rise building list with the POIs extracted from the Baidu Map. After matching with POIs, there may be some high-rise buildings that cannot be identified, and also these unidentified high-rise buildings cannot be used for estimation. From the view of sampling statistics, the impact of these unidentified and unused high-rise buildings on the overall estimated results can be neglected. (2) Geocoding fire apparatuses. The names, types, quantities, and deployment addresses of fire apparatuses can be gathered from the fire department. By calling the Baidu Map web service APIs to geocode the deployment addresses of fire apparatuses, their corresponding longitudes and latitudes can be obtained. (3) Extracting travel times and distances. It is very important to determine the appropriate route because different routes will lead to different travel times and distances. The shortest route considering the influence of traffic conditions was determined as the appropriate route in this study. In most cases,this determination tactic can minimize travel time. In addition, this determination tactic can be applied by calling the Baidu Map web service API. The calling parameters can be constructed with longitudes and latitudes of fire apparatuses and the identified high-rise buildings. Then, the real-time travel time and distance between each fire apparatus and each high-rise building can be extracted from the Baidu Map. (4) Analyzing and calculating. During the execution of the task, the travel velocity, travel route, and driving direction of the fire truck are not restricted by traffic rules. Therefore, the speed of the fire truck should be faster than that of ordinary vehicles. The travel time calculated by the Baidu Map based on real-time traffic conditions is mainly for ordinary vehicles. According to our previous study, 80% of the travel time extracted from the Baidu Map is used as the travel time of the fire truck in this study [8]. \(T_{\text{min}}(P_{i}\), \(WT)\) and \(T_{\text{min}}(P_{i}\), \(AT)\) can be obtained by comparing circularly using JavaScript. Other parameters (including \(ECR(C)\), \(AT(C)\), \(TCCR(C\), \(\Delta T)\), \(TAT(C\), \(\Delta T)\), etc.)