- This project builds a Flask App with leaflet.js to make predictions of NYC Traffic using machine learning.
- This is a sub-project of this older kaggle project: https://github.com/benduong2001/ArcGIS_Project_nyc_traffic
Get a new conda environment up and running and run as follows
conda create --name geoenv python=3.11
conda activate geoenv
conda install -c conda-forge scikit-learn=1.0.2
conda install -c conda-forge geopandas
conda install -c conda-forge werkzeug=2.0.3
conda install -c conda-forge flask=2.1.0
conda install -c conda-forge geojson -y
conda install -c conda-forge tqdm -y
conda install -c conda-forge gdown -y
conda install -c conda-forge statsmodels
conda install -c anaconda beautifulsoup4 -y
pip install sodapy
pip install polars
pip install pyarrow
Activate the environment; clone the project locally and run the run.py file with argument "setupdisplay" one time only (it will take ~20 minutes).
conda activate geoenv
git clone https://github.com/benduong2001/nyc_traffic_flask.git
cd C:/Users/Benson/nyc_traffic_flask/
python run.py setupdisplay
conda deactivate
After that, all that is needed is to run the app.py
conda activate geoenv
cd C:/Users/Benson/nyc_traffic_flask/
python app.py
Docker Image: bensonduong/nyc_traffic_prediction_app:latest
docker run -d -p 5000:5000 bensonduong/nyc_traffic_prediction_app1