## 4 Data Preparation  
### Near-Misses  
The near-miss data were extracted from Mobileye collision warning events that were reported by vehicles equipped with Mobileye Advanced driver assistance system (ADAS) solution. A Collision Warning (CW) event is an alert generated when a Mobileye-equipped vehicle is on a trajectory to collide with another vehicle, pedestrian, or bicyclist in its path. Mobileye's Collision Warning system is based on the estimated Time to Collision (TTC), a function of velocity and distance. There are three types of collision warnings (see Figure 2) reported: Forward Collision Warning (FCW), Pedestrian Collision Warning (PCW), and Bicyclist Collision Warning (BCW). An FCW indicates a potential vehicle-to-vehicle collision, detected up to 80 m ahead and active for speeds between 1 km/h and 200 km/h. The TTC threshold for an FCW is triggered at 2.7 s. Both BCWs and PCWs involve potential collisions with bicyclists and pedestrians, respectively, detected up to 28 m ahead and active for speeds between 1 km/h and 50 km/h. The TTC threshold for these warnings is 2 s.  
The TTC threshold is crucial for defining near-misses. Since the near-miss data were provided by Mobileye, and the TTC thresholds were predetermined in the data source, we cannot modify them. FCWs, BCWs, and PCWs in the Mobileye data originate from collision warning systems. These systems typically use a TTC threshold of 2 to 3 s, allowing drivers enough time to react and take preventive action while minimizing unnecessary warnings. This threshold is supported by multiple studies [45, 46] and guidelines [47, 48]. In the literature, various TTC thresholds have been used to identify conflicts or near-misses, such as 1.5 s [49, 50, 51], 2.3 s [20], 2.5 s [52], and 3.5 s [53]. Although there is no unified TTC threshold, most studies use a threshold in the range of 1.5-3.5 s. Thus, the TTC thresholds in the source data fall within an acceptable range.  
There are two types of Mobileye-equipped vehicles. The first type is called Mobileye 8 Connect (ME8), fleet vehicles with ME8 technology. All collision warnings generated from the ME8 vehicles are collected. The second type is called Original Equipment Manufacturer (OEM), consumer vehicles with OEM Mobileye technology. A subset of collision warnings is observed from OEM vehicles, and the default collection rate is set to gathering information from 1 driver per road segment per hour.  
ME8 near-miss data used in this project cover the period from 5 July 2022, to 31 December 2022. OEM near-miss data cover the period from 16 August 2022, to 31 December 2022. During this timeframe, a total of 59,277 (ME8) and 2559 (OEM) warnings were generated, respectively (Figure 3), offering invaluable insights into potential collision events. In ME8 near-miss data, the vast majority of these warnings were FCWs (58,210 events), representing 98.2% of all warnings. PCWs and BCWs comprised a smaller portion of the dataset, with 711 (1.2%) and 356 (0.6%) warnings, respectively.  
Figure 2: The concepts of FCWs, BCWs, and PCWs (Source: Mobileye).  
Similarly, OEM near-miss data consist of 91.8% FCWs (2005 events), 4.0% PCWs (88 events), and 4.2% BCWs (91 events). For each grid cell, the total count of the three collision warning types (FCW, PCW, and BCW) was calculated to represent the number of near-misses. This calculation was performed using the Spatial Join tool in ArcGIS.