# Risk Prediction for Winter Road Accidents on Expressways
## 5 Visualization Service  
If the risk of accidents due to weather can be visualized on the map in real time on a road level, it would prove useful for enhancing the road safety in the winters. To predict traffic accidents caused by weather, information on road geometry of highways in Korea, road environment, and weather is needed. In this case, information on road geometry of highways and road environment comprises fixed values and is obtained using geographic information system (GIS) information of standard node links and the SRTM data. There were a total of 300,914 GIS links and 11,368 links on highways. To reduce the computation time, a representative GIS for each link was used. For the representative GIS information, the location of past road accidents caused by weather and the road geometry information comprising the angle of rotation and the minimum radius obtained by calculating the sum of the squares of the distance between the radii, is needed. As the accident risk is higher with an increasing angle of rotation, the angle of rotation and turning radius of GIS with the largest angle of rotation were used. Furthermore, road environment information was obtained based on this point. Weather information constantly changes. Therefore, weather information data need to be crawled at given time, and spatial interpolation should be performed. Weather data provided by KMA were collected using the readHTMLtable function of the RCurl package [41] of R, and among the collected weather data, road-level information of precipitation, air pressure, and temperature were obtained by the random forest model, and humidity and road-level information of wind speed were obtained using the generalized additive model. If the generated road geometry, road environment, and weather data are applied as input variables to the random forest model, which is the risk prediction model for weather-related accidents, the occurrence of road accidents due to road-level weather conditions can be predicted. Finally, visualization of the status of weather-related road accidents with a leaflet [42], an open map, is significantly useful for road safety management in the winter season. On 7 January 2021, the temperature was below zero Celsius nationwide, and snowfall occurred in the metropolitan area and southern regions. Figure 3 shows a visualization of the humidity information, which has the most significant impact on Korean highway information along with the angle of rotation, and weather information. Humidity was high in the western and southern regions of the Korean Peninsula. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multirow{2}{*}{**N**} & \multicolumn{2}{c}{**Accuracy**} & **Kappa** & **AUC** & **F-measure** & **G-mean** \\ \cline{3-6}  & & **Mean(SD)** & **Mean(SD)** & **Mean(SD)** & **Mean(SD)** & **Mean(SD)** \\ \hline \multirow{2}{*}{Logistic} & \multirow{2}{*}{10} & 0.742 & 0.085 & 0.790 & 0.847 & 0.786 \\  & & (0.078) & (0.023) & (0.024) & (0.056) & (0.030) \\ \multirow{2}{*}{Neural Network} & \multirow{2}{*}{10} & 0.940 & 0.331 & 0.879 & 0.969 & 0.877 \\  & & (0.008) & (0.030) & (0.008) & (0.004) & (0.009) \\ \multirow{2}{*}{XGBoost} & \multirow{2}{*}{10} & 0.980 & 0.613 & 0.898 & 0.990 & 0.894 \\  & & (0.003) & (0.038) & (0.010) & (0.002) & (0.012) \\ \multirow{2}{*}{Random Forest} & \multirow{2}{*}{10} & 0.984 & 0.658 & 0.907 & 0.992 & 0.904 \\  & & (0.001) & (0.019) & (0.008) & (0.001) & (0.008) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The prediction performance of test data. Figure 4 shows a visualization of the prediction results of road accidents due to weather conditions on 7 January 2021, based on road geometry information of highways, road environment, and weather information. Highways in the southwestern region were identified as high risk for weather-related road accidents. The number of links selected as points of risk was 73, and highways with many points of risk were the West Coast Expressway and the Gwangju-Daegu Expressway.