How ignite-0/bike-share-demand-forecasting- works
This repository builds Citi Bike station-level demand forecasts, turns them into stockout alerts and suggested bike moves, and serves forecasts plus an alert track record through an API and dashboard. The documented path runs from trip, weather, and GBFS data through station-hour aggregation, feature construction, forecasting, and decisions. Training, evaluation, explanation, and tuning are supporting modeling capabilities. Several links below rely on the README or SOURCE INDEX; unsampled internals are not assumed to have been inspected.
Main entry points: data.py Model data access · predict.py Forecast prediction · weather.py Weather ingestion · raw Raw data archive
Components 24
Data ingestion
- Trip download
src/ingest/download_trips.py - Weather ingestion
src/ingest/weather.py - GBFS collector
src/ingest/gbfs_collector.py - Station-hour build
src/ingest/station_hour.py - Raw data archive
data/raw
Forecast modeling
- Feature builder
src/features/build.py - Model data access
src/models/data.py - Model training
src/models/train.py - Final model selection
src/models/final.py - Forecast prediction
src/models/predict.py - Model evaluation
src/models/evaluate.py - Classical baselines
src/models/classical.py - Model explanations
src/models/explain.py - Model tuning
src/models/tune.py
Stock decisions
- Stock projection
src/decision/rebalance.py - Alert backtest
src/decision/backtest.py
Serving and dashboard
- Forecast publisher
src/api/publish.py - Forecast API
src/api/main.py - Streamlit dashboard
app/streamlit_app.py - Published artifacts
src/api/publish.py
Other components
- Monthly trips
- Weather feeds
- Live GBFS
- Dashboard user
Connections 29
- Monthly trips → Trip download: provides files
README.md - Weather feeds → Weather ingestion: provides weather
src/ingest/weather.py - Live GBFS → GBFS collector: provides status
src/ingest/gbfs_collector.py - Trip download → Raw data archive: saves trips
- Weather ingestion → Raw data archive: saves weather
src/ingest/weather.py - GBFS collector → Raw data archive: archives snapshots
README.md - Raw data archive → Station-hour build: aggregates inputs
src/ingest/station_hour.py - Weather ingestion → Station-hour build: joins weather
- Station-hour build → Feature builder: builds features
README.md - Feature builder → Model data access: writes feature table
src/models/data.py - Model data access → Model training: loads training data
src/models/train.py - Model data access → Classical baselines: loads training data
src/models/classical.py - Model data access → Model evaluation: loads evaluation data
src/models/evaluate.py - Model data access → Model explanations: loads model data
src/models/explain.py - Model evaluation → Model tuning: scores candidates
src/models/tune.py - Model training → Final model selection: trains candidates
src/models/final.py - Final model selection → Forecast prediction: supplies models
src/models/predict.py - Feature builder → Forecast prediction: builds forecast features
src/models/predict.py - Weather ingestion → Forecast prediction: supplies forecast weather
src/models/predict.py - Forecast prediction → Forecast publisher: builds forecasts
src/api/publish.py - GBFS collector → Forecast API: fetches live status
src/api/main.py - Forecast prediction → Stock projection: provides demand forecasts
src/decision/rebalance.py - Forecast API → Stock projection: recommends moves
src/api/main.py - Stock projection → Alert backtest: shares risk scoring
src/decision/backtest.py - Forecast publisher → Alert backtest: scores track record
src/api/publish.py - Forecast publisher → Published artifacts: writes serving files
src/api/publish.py - Published artifacts → Forecast API: serves forecasts
src/api/main.py - Dashboard user → Streamlit dashboard: views results
README.md - Streamlit dashboard → Forecast API: requests forecast data
README.md