Find the safest walking route in Vancouver — not just the fastest. Safe Maps considers historical crime data and street lighting to recommend routes that prioritize pedestrian safety.
- Safety-first routing: Compares multiple route alternatives and ranks them by safety score
- Crime awareness: Uses Vancouver crime data (VPD GeoDASH) to avoid high-incident areas
- Street lighting: Factors in street light density for night walking
- Night mode: Toggle "Walking at night" to weight lighting more heavily
- Node.js 18+
- npm
From the project root:
cd safe-maps
npm install
npm run install:allOr install backend and frontend separately:
cd safe-maps/backend && npm install && cd ..
cd safe-maps/frontend && npm install && cd ..From the safe-maps directory:
cd backend && node scripts/fetch-crime.js # Uses demo grid if no CSV; place VPD CSVs in backend/data/crime/ for real data
node scripts/fetch-lighting.js # Fetches street lighting from Vancouver Open Data
cd ..Option A — One terminal (recommended):
cd safe-maps
npm run devOption B — Two terminals:
Terminal 1 — API server:
cd safe-maps && npm run backendTerminal 2 — Frontend:
cd safe-maps && npm run frontendClick any preset in the sidebar for instant demo routes:
- Gastown → Yaletown
- Downtown → Strathcona
- East Hastings → Mount Pleasant
Or enter coordinates (lat, lng) manually.
| Data | Source |
|---|---|
| Crime | VPD GeoDASH — Download CSV by year/neighbourhood, place in safe-maps/backend/data/crime/ |
| Street lighting | Vancouver Open Data |
| Routing | OSRM (foot/walking profile) |
safe-maps/
├── frontend/ # React + Vite + Leaflet frontend
├── backend/ # Express API (routing, scoring)
│ ├── scripts/ # Data pipeline (crime, lighting)
│ └── data/ # Raw data (gitignored CSVs)
├── package.json # Root scripts (install:all, dev, backend, frontend)
└── README.md
GET /api/route?from=49.28,-123.12&to=49.27,-123.11&night=true
Returns { routes: [...], recommended: index } — recommended is the index of the safest route.
Open source. Data: Vancouver Open Government Licence.