Inspiration
Most map apps look for the fastest routes, but the fastest route is not always the route someone feels most comfortable taking/safe in. A route might be poorly lit, close to busy intersections, or not even contain a side walk.
This can be especially devestating if older people like our grandparents/parents who might not be able to understand technology enough to look for these things get harmed, hence this is a vital issue.
What it does
The user enters a starting point and a where to go. SafeRoute finds up to three walking routes and displays them on a map. It samples points from each route and checks four factors (shown in the map as well for convenience):
- Crime reports: 40%
- Traffic collisions: 25%
- Street lighting: 20%
- Current weather: 15%
The risks are combined into an score out of 100. A higher score means the route has a lower estimated risk based on the data we collect.
How we built it
The front end uses HTML, CSS, JavaScript, Bootstrap (styling), and Leaflet (map). The back end is a small Flask server written in Python.
For every route, the server checks up to three points, combines the four risk values using our weights, and sends the result back to the browser and displays result to the user.
Challenges we ran into
The hardest part was working with several data sources at once. They all return data in different formats, and some websites' apis run really slow compared to others (for example the Lighting API which takes a while).
The crime and collision datasets are also only for Seattle (although they are working with cities around Seattle)
We also had to be careful about missing data. If SafeRoute cannot calculate every score correctly, it keeps the routes in the order returned by the routing service instead of pretending one is safer.
Another major issue we encountered is running out of tokens to use the API's often when testing to make sure that our website functions correctly, which took a while at times.
Accomplishments that we're proud of
Learned a TON of skills such as connecting multiple API's together to work seemlessly, learning to connect backend python to frontend html, css javascript through Flask, etc.
What we learned
We learned how to connect a JavaScript map to a Python APIs, work with geographic coordinates, draw GeoJSON routes in Leaflet, and combine multiple APIs into one result (which was a big struggle for us especially since we had to do so much troubleshooting).
What's next for SafeRoute
If we continue the project, we would like to add route detail cards, support more cities and data sources, account for the time of day, and let users decide which factors matter most to them. We would also like to test the scoring model with more data and feedback from real users.
Log in or sign up for Devpost to join the conversation.