This repo contains a flask app that, when deployed, allows users to mark their start and end location on a Google Map, and then displays a map of the relative walk safety along the route recommended by Google's Route API.
-
The user inputs the start and end locations
-
The app calls the Dark Sky API for the day's weather information and Google Maps API for the recommended route.
-
The locations and weather data are fed to the model to predict for each location. (Learn more about the model in this [repo] https://github.com/allisonhonold/walk_risk_engine)
-
The predictions are displayed for the user along with an overall risk rating and the weather.
This repo uses Python 3.6.0. All python packages can be found in the requirements.txt
file. The requirements are in pip
style, because this is supported by Heroku.
To create a new conda
environment to use this repo, run:
conda create --name flask-env
conda activate flask-env
pip install -r requirements.txt
To run in a development environment (on your local computer)
export FLASK_ENV=development
env FLASK_APP=app.py flask run
To run in a production environment (used for deployment, but test it out locally first):
export FLASK_ENV=production
python app.py