# Accident Probability Prediction and Analysis of Bus Drivers Based on Occupational Characteristics
## 4 Data  
### Data Extraction  
The data of this study came from a bus company in Chongqing, China, and the dataset mainly included five parts: a driver dataset, including the gender, education level, date of birth, etc., of bus drivers; a driving hours dataset, the daily start time and end time of all on-duty drivers; a violation dataset, the violation information of all drivers in the company; an AI alarm dataset, the alarm time and alarm type of all drivers in the company; and a bus trajectory dataset, the driving trajectory of buses and the statistics of information on entering and leaving stations recorded at a frequency of 10 s.  
Public transportation companies generally manage and summarize drivers' safety weekly or monthly. Considering the different tendencies of risk reflected by the indicator variables, model feature variables based on weekly, monthly, quarterly, and semi-annual time dimensions were selected for this study. The specific data extraction process involved the following steps:  
1. Determining Accident Risk Labels for Drivers--Bus drivers who had had accidents in June 2022 were assigned a risk label of 1. Furthermore, to ensure sample balance, a simple random sampling method was used to randomly select an equal number from the remaining group who did not have accidents. They were assigned a risk label of 0.
2. Basic Information--Four attributes, namely gender, education level, age, and driving experience, were selected.
3. Duration Information--The driving and operating duration of bus drivers in the week and month before the accident were selected. Furthermore, feature variables such as the proportion of high-peak operating duration in a week or month and the proportion of operating duration within a week in the previous month were chosen to reflect the impact of traffic congestion. Driving duration represents the cumulative time from when a vehicle starts moving (as recorded by GPS speed) to when it comes to a stop. Operating duration refers to the cumulative time during working hours when a driver has their regular passenger-carrying status.
4. Violation Information--The cumulative number of violations in the month, the number of violations in the half-year, and the length of time since the last offense were selected. The minimum violation interval in the six months was also counted.
5. Daily Risk Behavior Information--Based on the AI alarm dataset, two types of risk behaviors, namely, fatigue driving and non-standard driving, were extracted. Their cumulative occurrence counts were calculated. Moreover, statistics such as the time since the last occurrence of risk behavior were also included.
6. Vehicle Trajectory Information--This included the average speed, average acceleration and deceleration, standard deviation of speed, standard deviation of acceleration, and changes in azimuth. At the same time, the average speed and the standard deviation in and out of the station on the day of the accident also were selected.
7. Other Information--Weather conditions and rainfall information on the day of the accident were collected as environmental variables. Among others, accident drivers were characterized by the hourly rainfall at the moment of the accident, and non-accident drivers, by the average daily rainfall on the selected date.