Safe-route
Navigate smarter. Avoid danger. Arrive safe.
Created on 8th March 2026
•
Safe-route
Navigate smarter. Avoid danger. Arrive safe.
The problem Safe-route solves
Most navigation apps like Google Maps route you based purely on distance or time — they have no awareness of crime hotspots, dangerous neighbourhoods, or how safety changes after dark.
Safe-route solves this by:
Ingesting 600,000+ real crime incidents from Chicago's open data portal (2025 year)
Clustering them into danger hotspots using HDBSCAN
Embedding danger scores directly onto every street edge in an OSMnx graph
Running a custom A* algorithm with three safety modes — Fastest, Balanced, and Safest
Who needs this:
A woman walking home alone at 2 AM
A tourist unfamiliar with which neighbourhoods to avoid
A delivery worker choosing between two routes at night
The app shows all three routes simultaneously on a live map with safety scores out of 100, danger cluster overlays, and a time-of-day slider that dynamically recalculates risk — because a street that's safe at noon can be a danger zone at midnight.
Challenges we ran into
- Balanced and Safest routes were identical
The original cost function used a flat additive penalty (+500 × danger). With safety_weight=0.2, balanced barely differed from safest — on a 40km route, balanced was taking 66km just like safest. The fix was switching to a proportional formula (length × (1 + danger^1.5 × time_mult × weight)) so penalties scale with edge length, not overpower it. - Safest route was cutting straight through danger clusters
Even with penalties, the green route passed directly through the largest crime hotspot. The issue was the penalty coefficient wasn't strong enough to make a 500m safe detour cheaper than a 50m dangerous shortcut. Raising the coefficient and adding hard physical distance caps (A* prunes any path exceeding fastest × 1.80) fixed this. - Night-time routing produced runaway detours
At 3 AM (time_multiplier = 10×), the safest route was adding +147 minutes and scoring lower than balanced — it was taking such a massive southern detour that it passed through entirely different crime clusters. The fix was capping time_mult independently for each mode rather than letting it multiply unchecked. - HDBSCAN on 680,000 crime points was computationally infeasible
Running haversine-metric HDBSCAN on the full dataset would have taken hours. We stratified-sampled down to 80,000 points while preserving the severity distribution, bringing runtime to under 5 minutes without losing meaningful cluster structure.
Technologies used