Interactive Risk Explorer v2 — Severity + Frequency Model
Source: NZTA Crash Analysis System (CAS). Updated every 4 hours.
Loading...
Safe Journeys is an interactive crash risk explorer for New Zealand roads. It predicts where crashes are most likely to occur and how severe they may be, using machine learning applied to real crash data.
| Metric | Value |
|---|---|
| Total crash records | 910,823 |
| Time period | 2000 – 2025 |
| Average crashes per year | ~33,700 |
| Total people killed | 9,371 |
| Total seriously injured | 63,316 |
| DSI (Death or Serious Injury) crashes | 60,627 (6.7%) |
New crash data is automatically pulled from the CAS API every 4 hours.
The system uses two separate models that answer different questions, then combines them:
1. Severity Model — "If a crash happens here, how bad will it be?"
A LightGBM gradient-boosted decision tree trained on 789,270 historical crashes (2000–2021) with 80 features covering road attributes, weather, light, vehicle types, impact objects, and location history. It predicts the probability of Death or Serious Injury (DSI) for each location. Test accuracy: AUC 0.82 on unseen 2024–2025 data.
2. Frequency Model — "How often do crashes happen here?"
A statistical Poisson rate model that counts historical crashes per H3 hexagonal cell (~600m across) and computes an hourly crash rate. This is adjusted in real time based on current conditions:
3. Combined — ETNA (Expected Time to Next Accident)
The frequency rate, adjusted for current conditions, gives the expected time between crashes at each location. This is a statistical average, not a countdown — a cell showing "6 months" means crashes occur there roughly every 6 months on average.
| Element | Meaning |
|---|---|
| Coloured hexagons | Severity risk — green (low DSI probability) to red (high) |
| Pulsing red markers | Frequency hotspots — locations with the shortest expected time to next crash |
| Condition multiplier | How much current weather/light/holiday conditions change the baseline crash rate |
Where available, traffic volume data (Annual Average Daily Traffic) is sourced from NZTA's Carriageway dataset covering state highways and some local roads. This allows crash rates to be expressed per 100 million vehicle-kilometres — separating genuinely dangerous roads from merely busy ones.
Built with LightGBM (machine learning), H3 hexagonal spatial indexing (Uber), Flask, Leaflet.js, PostgreSQL, and Open-Meteo weather API. No GPU required — all inference runs on CPU in milliseconds.
Data: NZTA/Waka Kotahi Crash Analysis System (CAS), 2000–2025
Traffic: NZTA Carriageway ADT dataset
Weather: Open-Meteo API (open source, free)
Safe Journeys is a research tool and does not constitute official road safety advice.