Automation of detection of high accident risk locations for motorcyclists in Bogotá, D.C.
This data science project analyzes accident risks for motorcyclists in Bogotá and prioritizes highway corridors for road safety operations using unsupervised learning. This is part of Team 185’s DS4A | Colombia 2022 capstone project with the Secretary of Mobility of Bogotá (SMB).
Among the many tasks the SMB does, they implement road safety operations aiming at reducing accidents, especially from motorcyclists given their higher accident risks. At the time this project was submitted (July 2022), the locations where such operations were implemented were determined manually crossing information from several Excel files. We developed a clustering module that pulls information on accidents and the city's road grid to find highway corridors with different priority levels for implementing road safety operations.
We also developed a module that analyzes the severity of accidents where motorcyclists are involved and how this relates to the type of accident and the other vehicles involved in the accident. We use this information to plot heatmaps that show the degree to which each vehicle type was responsible for different combinations of severity and accident type.
I recently added two modules to this project: the first one is an ETL module that can be used to update the local database with monthly accident data, and the second one is an API endpoint implemented using FastAPI that allows users to retrieve predictions from the clustering model without touching the clustering scripts.
Details about the implementation and the results can be found in the project’s repo.