Inspiration
Often when planning trips, GPS apps and websites only recommend routes based on how quickly you get to a location disregarding there may be dangerous places along that route.
What it does
Location and severity of auto accidents since 2016 were collected from a database. We matched those coordinates with coordinates along routes from a google maps api and ran calculations to come up with an index of danger for each route.
How we built it
We used python to write a Rest API for the front end that interfaced with a MySql database (hosted on Google Cloud), containing a subset of data gathered from Kaggle. The dataset included data over accidents reported in the US over the last few years. Because there were over a million entries in the dataset we decided to select a subset of the data for Texas to provide more relevance to the immediate community. Using the google's APIs, and JavaScript map api, we were able to use this data to output the danger of each route and alternative route.
Challenges we ran into
We were trying to get coordinates every x distance along the route using the google maps direction api but after a lot of tribulation we decided to use the coordinates of turns which was provided by the directions api. Because as a team, we don't have much front-end experience we struggled with parsing json when printing the output and front end design and development in general. We also struggled a lot getting two routes to render on the map.
Accomplishments that we're proud of
We were able to complete the project on time although it isn't near a finished product. We used git version control throughout, and we communicated well remotely.
What we learned
We learnt how to use html, a react backend to query database using mySQL, how to use javascript, how to use git effectively, how to host database on google's cloud service, and how to integrate front end and backend.
What's next for HazMap
Improvements in calculating the danger index, adding more information in the output (such as time and distance for each route), and making it look better. When improvements are made we can host it publicly. Also we would like to remove the popup search and replace it with dropdown search bars for origin and destination.
Log in or sign up for Devpost to join the conversation.