# Kenya Road Accident Risk Dashboard
A machine learning powered dashboard that analyzes Kenya road accident
patterns, predicts journey risk levels and delivers evidence based road
safety recommendations - built on real NTSA accident data.
---
## The Problem
Kenya loses over 3,000 lives to road accidents every year. Most drivers
have no way of knowing how dangerous a particular journey is before they
set off. This project turns historical accident data into actionable
risk intelligence.
---
## Live Dashboard
> Coming soon — deploying to Streamlit Cloud
---
## What This Dashboard Does
| Feature | Description |
|---|---|
| Accident Hotspot Map | Interactive Kenya map showing accident frequency and risk level by county |
| Risk Predictor | Input your county, road and travel time to get a personalised risk score |
| Analytics | Charts showing peak accident hours, dangerous roads and victim patterns |
| Recommendations | Evidence based safety advice for drivers, authorities and insurers |
---
## Key Findings from the Data
- **8pm is the most dangerous hour** - night driving accounts for a disproportionate share of casualties
- **Sunday is the deadliest day** - weekend fatigue and late night travel elevate risk significantly
- **Nairobi-Mombasa highway** has the highest recorded accident count of any road in the dataset
- **85% of victims are male** - male drivers aged 25 to 40 represent the highest risk demographic
- **Careless driving and speeding** are the two leading causes - both preventable
---
## Model Details
The risk prediction model classifies journeys as High or Low risk
based on time and location features.
| | |
|---|---|
| Algorithm | Random Forest Classifier |
| Features | Hour, night indicator, weekend indicator, peak hour indicator, county, road |
| Class Imbalance | Oversampling applied to training set only |
| Test Evaluation | Original unseen data - no data leakage |
| High Risk Recall | 100% — model catches every dangerous journey …