# Identification of Risk Factors for Bus Operation Based on Bayesian Network
## 2 Methodology and Dataset
### Dataset  
The dataset used in this case study was obtained from the Zhenjiang Public Transport Company (Zhenjiang, Jiangsu, China). The driver smart band and bus operation monitoring records were included in this dataset. The sensors installed on buses were mainly responsible for determining, c gathering, and uploading the monitoring records of bus operation. It can collect corresponding risk information during bus operation, including aberrant states of the bus, such as sudden deceleration, forward collision, and lane departure, along with aberrant behavior of the driver, such as distraction, calling, and yawning. In addition, it can record the data, such as time, speed, specific road, driver's personal information, and license plate number of the aberrant state. Bus operation spatial risk refers to the probability of risk occurring during the operation of buses on specific road sections or within a certain range. Drivers, vehicles, roads, and the environment were the variables considered. The driver's smart band was primarily responsible for gathering and uploading wristband data. Bus driver's physiological parameters were recorded every two minutes, including heart beats and blood pressure. The road data were captured using the Amap software (v13.07.0.2160). The monthly average road condition data were used as the basis for traffic volume. The environmental data were obtained from weather websites. The problems of the data used in this research mainly include missing and abnormal data. For missing data, we delete all alarm records where it is located. For abnormal data, we use box plots to identify outliers and delete them. We use five statistical values of the dataset, including the minimum value, first quartile (Q1), median, third quartile (Q3), and maximum value. Assuming \(IQR=Q3-Q1\), values outside of \([Q3+1.5\ (IQR)]\) and \([Q1-1.5\ (IQR)]\) are considered outliers. The driving factors in the dataset were age, gender, blood pressure, and heartbeats. The vehicle factor included the instantaneous bus speed. The number of bus stops, lanes, intersections, isolation measures, and traffic volume were the road factors. The environmental factors included the weather. The descriptions and classifications of each factor are listed in Table 1. Each factor was modeled as a discrete variable. The data were binned for ease of modeling. The methods of data partitioning included boxplot, isometric, natural discontinuity, quantile, and standard deviation methods. The equidistant approach was used to redivide the independent variables based on the features of the data distribution. In this study, the target (dependent) variable was the spatial risk of bus operation. Gender, age, systolic pressure, diastolic pressure, heartbeat, speed, lane, traffic volume, isolation measure, bus stop, intersection, and weather were the explanatory (independent) variables. Table 2 presents a quantitative analysis of the cleaned data. Quantitative analysis of data is beneficial for understanding the basic situation of the dataset. Statistical indicators include mean, standard deviation, maximum value, and minimum value.