Inspiration
Google Maps is great for getting you from Point A to Point B, but have you ever felt unsafe on your journey or thought: Surely, there’s gotta be a better way - why am I on this dim lit road? Introducing SafeNav: a dynamic map takes into consideration the weather, past crime occurrences, and other factors on the streets to get you to where you need to go safely and efficiently.
What it does
Our website allows users to select their origin/destination locations from a drop-down menu and computes a way to get there. It is intended to provide alternative routes based on if the weather on a recommended route is poor in some capacity or if a serious crime has occurred on a routed street. It also displays real-time weather information and offers alerts to act based on weather conditions and/or if any crimes have occurred on streets an individual may be routed down.
How we built it
We used Python to extract data from the City of Madison police incidents website and weather.gov website (the latter using an API) and write algorithms for rerouting based on weather conditions and crime (ex. if a severe crime has occurred or if visibility is low in an area, reroute to the next fastest path). We then utilized React to build the UI and flask to link the React app and Python scripts and have them communicate in real time.
Challenges we ran into
We faced challenges incorporating the rerouting algorithms into the React app using flask, extracting the time of day from police reports (not an original column), and getting the "Get route" button and accepting start/destination input in the React app.
Accomplishments that we're proud of
We are proud of working through our challenges, as well as coming up with the concept for an advanced/multi-part map GIS system and implementing the rerouting functions in our Python scripts.
What we learned
We learned a great deal about the webscraping process, as well as the intricacies behind connecting different elements of a website (ex. needing to create a compiler for a Python script to accept React input). We recognize that it is much harder than it looks.
What's next for SafeNav
For SafeNav 2.0, we would be interested in adding a dynamic element to the police reports data and having it update in real time for the rerouting algorithm to be even more accurate; introducing filters (ex. no alert if low crime happened > 3 months ago, medium > 6 months, severe > 1 year ago / toggling between types of crime displayed); and implementing a crowd-sourcing element to allow user input as to whether or not they are feeling unsafe and then use ML predictive models to assess validity and use to guide further routes.
Log in or sign up for Devpost to join the conversation.