A Streamlit-based dashboard for visualizing route forecast data, including overall route counts, weekly forecasts, and detailed tables by region.
- Interactive Filters: Select regions and time ranges to filter data.
- Visualizations:
- Bar chart for overall route counts (Actual, Lower, Forecast, Upper).
- Combined bar and line chart for weekly forecasts with upper and lower bounds.
- Tables:
- Route counts over time by region.
- Total route counts per region.
- Export: Download weekly forecast data as a CSV file.
Root/
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
├── README.md
└── src/
├── init.py
├── app.py
├── config.py
├── data/
│ ├── init.py
│ ├── loader.py
│ └── preprocessor.py
├── utils/
│ ├── init.py
│ └── export.py
└── visualization/
├── init.py
├── charts.py
└── tables.py- Docker (optional, for containerized deployment)
- Python 3.9+
-
Clone the repository:
git clone <repository-url> cd root
-
Install dependencies:
pip install -r requirements.txt
-
Ensure the report directory exists with your data file (results_fi_fu.csv by default):
root/src/report/results_fi_fu.csv
Run the Streamlit app directly:
cd src
streamlit run app.pyAccess the dashboard at http://localhost:8501.
- Build and run the container:
docker-compose up --buildAccess the dashboard at http://localhost:8501.
- Environment Variables
- FORECAST_FILE_NAME: Specifies the CSV file name (default: results_fi_fu).
- Set in docker-compose.yml or your shell:
export FORECAST_FILE_NAME=your_file_name-
- Add new visualization functions in src/visualization/.
- Add utility functions in src/utils/.
- Update src/app.py to include new components in the dashboard.
-
- When using Docker Compose, the src/ directory is mounted, so local changes are reflected automatically in the container.
See requirements.txt for a full list of dependencies.
License This project is licensed under the MIT License.
-
Create the directory structure as shown above.
-
Save each file with its respective content.
-
Ensure the
reportdirectory exists insidesrc/with your data file (results_fi_fu.csv). -
Install dependencies:
pip install -r requirements.txt
-
Run the app:
-
Locally:
cd src streamlit run app.py -
With Docker Compose:
docker-compose up --build
- Access the dashboard at http://localhost:8501.
