Method, data and roadmap
This is the first complete frontend trial. Every number on the site comes from one generated dataset behind a single provider function, so a real backend can be swapped in without touching a single chart.
All figures shown are temporary demonstration data generated for this prototype. They are not official Kenyan road-safety statistics.
The five analytical pillars
Vehicle, driver and road
Vehicle class, registration type, driver behaviour and status, mechanical faults, road defects and visibility hazards.
Victims and demographics
Victim category, injury severity, casualty counts, gender, age group, seating position and safety gear.
Geography
County, sub-county, police jurisdiction, highway corridor, landmark, blackspot classification and coordinates.
Time
Date, year, month, weekday, hour, six-part time block and a holiday-period flag.
Crash mechanics
Collision type, single-vehicle incident type, pedestrian crash type, vehicles involved and post-crash events.
Data architecture
- Typed contracts. Every record conforms to the `Incident` interface. Charts are typed against aggregates, never against raw sources.
- One seam. A single provider returns the dataset. Replacing it with an API call is the only change needed to go live.
- Pure aggregation. Grouping, cross-tabs, flow and treemap layouts are computed by pure functions that can move server-side unchanged.
- Global filter state. Filters live in one context so the map, tables and every chart always describe the same slice.
Next steps
- 1. Connect verified crash records from NTSA and police reporting.
- 2. Add authenticated data entry for field officers and newsroom editors.
- 3. Publish an open API and downloadable county extracts.
- 4. Layer in exposure data (traffic volume, road length) for fairer rate comparisons.
Dataset snapshot 2025-12-31