Inspiration

Walking home at night in NYC often means choosing between the fastest route and the one that feels safe. Existing map apps only optimize for speed. We wanted something that actually factors in crime patterns, lighting, and real late-night behavior so students, workers, and tourists can feel safer moving around the city.

What it does

SafeRoute NYC shows you the shortest walking route and a safer alternative side-by-side.

Uses NYC crime data to build late-night risk zones

Calls a routing engine that avoids these zones where possible

Visualizes crime heatmaps on a Mapbox map

Lets logged-in users trigger a panic SMS to trusted contacts with their live location

How we built it

Frontend: React + Mapbox GL JS for the NYC map, route visualization, and UI

Backend: Python Flask with REST endpoints for routing, crime data, auth, and panic alerts

Routing: OpenRouteService with avoid_polygons to generate “safest” paths around high-risk areas

Data: NYC Open Data crime records, preprocessed into clustered risk polygons

Alerts: Twilio (or similar) to send SMS with a location link to trusted contacts

Storage: SQLite/Firebase for users, hashed passwords, and emergency contact info

Challenges we ran into

Cleaning and filtering real NYC crime data (time windows, offense types, noisy points)

Turning thousands of crime points into meaningful risk polygons that still produce valid routes

Handling routing API quirks and error cases when avoid_polygons was too aggressive

Making the map UI clear enough so “safer vs shortest” is obvious at a glance

Balancing safety features with a simple, fast hackathon-friendly UX

Accomplishments that we're proud of

Built a working prototype that actually shows different safest vs shortest paths in NYC

Integrated real crime data into a live, interactive map with heatmaps and risk overlays

Implemented a functional panic button that sends SMS alerts with coordinates

Designed a clean route comparison panel with distance, time, and a basic safety metric

Created a clear, extensible architecture (modular Flask services + React components) for future cities

What we learned

How to preprocess and cluster geospatial crime data into usable risk zones

How powerful avoid_polygons-style routing can be for safety-aware navigation

Best practices for connecting React, Flask, and third-party APIs (ORS, Twilio, Mapbox) under time pressure

The importance of clear UX copy and visuals when “safety” is the core value prop

Trade-offs between perfect data science and shipping a reliable MVP in a hackathon setting

What’s next for SafeRoute NYC

Add crowdsourced safety ratings and foot-traffic indicators for more nuanced “safe” routes

Integrate more up-to-date incident feeds for near real-time alerts

Expand to other cities with open crime data (Chicago, LA, etc.)

Improve personalization: safety sensitivity sliders, different profiles (student, tourist, night-shift worker)

Polish mobile experience and explore a dedicated mobile app or lightweight AR-style guidance for walking at night

Share this project:

Updates