← Work / Traffic Accident Hotspot Detection
Academic project 2026

Traffic Accident Hotspot Detection.

Live ML system that clusters 1,498 real accident records to identify hazard zones and predict risk by time, weather, and road type.

Traffic Accident Hotspot Detection

— Overview

What it is

Road safety in Kathmandu lacks data-driven infrastructure. This system ingests real accident records, applies DBSCAN clustering to surface 43 statistically significant hotspots, and layers a Random Forest model on top to predict risk given conditions like time of day, weather, and road type. The result is a live map interface that makes the patterns visible and actionable.

How I built it

DBSCAN was chosen over k-means because accident hotspots are irregularly shaped and vary in density — k-means would have forced arbitrary cluster boundaries. The Random Forest model was trained on engineered features from the accident records including hour bins, weather codes, and road classifications. The Django backend serves predictions via REST API, with Leaflet.js rendering the map and Chart.js handling the risk breakdowns.

— Stack

Python Django scikit-learn DBSCAN Random Forest PostgreSQL Leaflet.js Chart.js Open-Meteo OpenStreetMap Render

— Impact