← Work / Traffic Accident Hotspot Detection
Independent 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 — main interface

Overview

The problem

Road safety in Kathmandu lacks data-driven infrastructure — accident patterns exist in the raw data but aren't visible or actionable to anyone without a way to surface them.

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.

My role & approach

Solo project — I designed the data pipeline, engineered features from the raw accident records, trained the DBSCAN and Random Forest models, and built the full Django backend, REST API, and Leaflet/Chart.js map interface end to end.

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.

43 hotspots identified from 1,498 real accident records

Stack

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

A closer look

Impact

Next project

Secure Skills Hub

Private instructor-led LMS with token-based enrollment, role-based access control, and Google OAuth — built for focused learning.