SafeRoute

An open-source hackathon project that enables safer pedestrian travel





FEBRUARY 2017


HackIllinois, UIUC


Tools: Google Maps API, HTML, CSS, JavaScript, JQuery, Azure


Award: Google Grand Prize for "Everyday Usefulness"





The challenge


As we were brainstorming hackathon project ideas, a friend brought up how dangerous it was for him to to travel to and from his high school in the Chicago Public Schools system. Hearing his story made us realize that street safety is a serious and constant concern, especially for younger people in inner cities. No one should feel unsafe on their way to school, which is why we decided to build an app that could help make journeys safer for pedestrians, using public data made available by the city of Chicago.


Our solution


Our group of 4 came up with SafeRoute, a data-driven web app that leverages Google Maps API and a unique path-finding algorithm to redirect users along the fastest and safest route. To inform our design, we used public Chicago crime data from the past year which had over 30,000 time-stamped crime data points.


First, we used the Google Maps Directions API to build a traditional, speed-focused route from point A to point B. Then, our algorithm uses specialized marker objects that indicate areas of high-crime and adds waypoints, diverting the route from the crime hotspots. We also added a crime heatmap and an adjustable clock to observe how the crime spots change according to different hours of the day. For instance, crime at 1 PM generally happens at different places than crime at 3 AM, so we made sure our algorithm accounted for those differences.


When a user inputs two locations, we compare the time and distance of SafeRoute's suggested route and Google's suggested route. When comparing the two routes, we found that our routes were often not longer than the ones recommended by Google, proving our app was a viable alternative for users.


Reflection


We had actually started out making an Android app, but due to several unresolvable dependency issues, had to scrap our work and start over in the last 10 hours of the hackathon. Despite the setback, we kept going and submitted our project in time, which we were really proud of. We even ended up taking home Google's Grand Prize for "Everyday Usefulness". My contributions were parsing the JSON data, integrating the Google Maps API, and CSS styling. Overall, I had a lot of fun on this project and learned about working with APIs and open-source community standards.


Award ceremony. Thanks for the prizes, Google! [source]


Hackathon submission on Devpost. Also, check it out on Github!