Inspiration

StrideSafe was partially inspired by WalkSafe McGill, a student-run service providing safe walking aide across the McGill campus. Expanding on this concept, StrideSafe brings the same safety-first approach to the entire city of Montreal, using crime data to optimize routes and help users avoid high-risk areas. Our goal was to extend the WalkSafe McGill initiative to mobile phones, providing everyone in Montreal with a virtual safety escort.

What it does

StrideSafe is a navigation app built for Montreal that prioritizes safety. By analyzing crime data on the island of Montreal from the past 9 years, it optimizes routes to guide users through paths with lower crime incidents, ensuring safer journeys. The app combines this crime-aware routing with standard navigation features, offering reliable directions that help users avoid high-risk areas. It’s perfect for both residents and visitors who want to explore Montreal confidently while prioritizing their personal security.

How we built it

The frontend is built with React, bootstrapped using Vite, and we used React-Leaflet to render the maps. Data was obtained from Open Montreal Crime Data and the address search uses Google Maps. The backend was built in Python, using libraries like OSMNX (Open Street Map Network X) to get Montreal's city graph, NetworkX to create both the safe route and the normal (dangerous) shortest route, Folium and Geopy were used to process geographical distances and display them, and the API was served using Flask. The directions were extracted from the shortest path and processed into a readable format.

Challenges we ran into

We ran into challenges displaying over 300 thousand crime data points in the frontend, which is why we chose to display a heatmap instead. There were many challenges with creating the routing system and the directions, since there was no library that could convert a list of coordinates into human-readable directions. We eventually resorted to writing our custom algorithm to process the list of coordinates, extract the street name, join similar segments, and create human readable directions.

Accomplishments that we're proud of

We are proud of implementing a safety-first routing system that uses over 300,000 points of data to identify the safest paths through Montreal. Coupling this advanced system with a user-friendly UI, we’ve created an interface that not only makes navigation effortless but also enhances the overall experience.

What we learned

This was our first project dealing with Maps and we definitely learned a lot about React-Leaflet, networkx, and OSMNX. We didn't expect our data structures and algorithms knowledge to come in handy for a hackathon, as we used a bidirectional Dijkstra to find the shortest and safest path.

What's next for StrideSafe

Next, StrideSafe plans to expand its dataset to include other major cities, making it a more complete virtual safety assistant to navigate around crime anywhere.

Built With

+ 1 more
Share this project:

Updates