Inspiration

According to the Federal Highway Administration (FHWA) out of nearly six million vehicular accidents that occur every year in the U.S., approximately 22 percent are weather-related. Nearly 6,000 people are killed and another 445,000 injured due to accidents that occur during bad weather. We built an app to help State Farm customers reduce the number of car accidents.

What it does

Safe Travel aims to give users the information they need to minimize their risks while traveling by car. By taking multiple weather data points along routes between two locations, Safe Travel determines the route with the best weather conditions to make your travel experience safer.

How we built it

The application was built using React, Typescript, and a host of APIs, including the Google Directions API, Google Maps API, Google Geocoding API, and OpenWeather API.

Challenges we ran into

It was a challenge to integrate all the APIs into a functional project, synthesizing the latitudes and longitudes from points taken along several routes and then feeding them into the OpenWeather API to get the weather location at those points. It resulted in a ton of asynchronous functions and messy code, but we pulled through in the end! We also had to be mindful of keeping the API usage under the limit of calls (the project ate through a good chunk of our free GCP credits!).

Accomplishments that we're proud of

We're proud of getting to use some of the Google Cloud Platform APIs for the first time such as Google Maps and Directions, as well as successfully integrating the APIs together into a single working project. It was cool to put our heads together and devise a method to tangibly score each route from Google Directions on the basis of their weather; we had to consider how to sample points along those routes and assign each weather condition at those points with a "safety score." The method we ended up with is something we can be proud of, and we believe it can be expanded to include other risk factors as well!

What we learned

We gained experience working with Google Maps APIs and how to integrate a project overall. It was also a good lesson in writing scoring algorithms that take inputs and give a quantitative output, an introduction into the world of data analytics and scoring systems.

What's next for Safe Travel

We would love to be able to use other risk factors in our calculations, including road conditions and crime rates, and later we hope to add a function that allows a user to send their selected routes to their mobile device.

Share this project:

Updates