Reduced visibility, rain, and snow are among the top predictors of traffic fatalities. Our project takes a data-driven approach to risk analysis through weather APIs and modeling of crash statistics, making the world a safer place one text at a time!

What it does

GetOffTheRoad is a public API for predicting the 'drivability' of a user's commute. The project is presented as a webpage where a user may sign up to receive a daily text message describing the weather and road conditions in their city.

How we built it

The demo web application uses the Accuweather API to gather historical and forecasted weather data in the user’s location. Each datapoint is configured in our algorithm with adjustable weights, which are tuned to aggregate a relative safety score from 0-10. The backend is implemented with a Python Flask server on an Amazon EC2 box.

GetOffTheRoad uses the following technologies in the sample implementation:

  • Twilio Communications API
  • Accuweather API
  • Apache HTTP Server
  • Python / Flask Web Framework
  • MongoDB
  • Amazon Web Services (Ubuntu EC2 Server)

Challenges we ran into

One of the major difficulties in implementing the drivability score was the lack of historical data and crash statistics for tuning the regression coefficients used to factor the score. This model will need to be improved in the future though more powerful APIs and larger datasets.

Accomplishments that I'm proud of

We managed to assemble a working website with text notifications, data analysis, and a user database all in 24 hours!

What we learned

None of our team members had significant experience with web frameworks. We gained valuable experience with jQuery, Flask, and REST APIs while implementing the demo web application.

What's next for GetOffTheRoad

To further improve the usefulness of the drivability score, our algorithm could utilize machine learning to correlate crash reports with existing weather data to improve the weights of each datapoint. This would require a subscription to a traffic condition API such as Google Roads API, which we could use to build a dataset for training. A multivariate linear regression can then be trained by gradient descent, minimizing an error term equal to the distance between predicted traffic fatalities and historic trends. The result would be a robust tool for predicting the weather-adjusted risk of driving in a given area.

Share this project: