benduong2001 / nyc_traffic_flask

Flask App with leaflet.js that can perform NYC Traffic Prediction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nyc_traffic_flask

NYC Traffic Prediction

Setup with Cloning Repo Locally (Conda)

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

Setup with Docker

Docker Image: bensonduong/nyc_traffic_prediction_app:latest

docker run -d -p 5000:5000 bensonduong/nyc_traffic_prediction_app1

About

Flask App with leaflet.js that can perform NYC Traffic Prediction


Languages

Language:Python 74.1%Language:HTML 23.2%Language:Dockerfile 2.7%