How vishwakshenansrinivasan/urban-tourism-flow-predictor works
This is a Chennai transit-and-tourism congestion forecasting product. The workflow synthesizes hourly movement data from transit schedules and coastal weather, engineers temporal features, trains XGBoost, generates 48-hour forecasts with TreeSHAP explanations, stores results, and serves them to a React dashboard and PulseAI assistant. The README documents the major product capabilities; several connections below rely on that documentation or the SOURCE INDEX because the relevant implementation was not excerpted.
Main entry points: App.jsx Dashboard app · forecast_generator.py Forecast generator · traffic_synthesizer.py Traffic synthesizer · db_storage.py Pipeline storage
Components 24
Data pipeline
- GTFS ingestion
data_pipeline/gtfs_ingest.py - Weather service
data_pipeline/weather_service.py - Traffic synthesizer
data_pipeline/traffic_synthesizer.py - Feature engineering
data_pipeline/feature_engineer.py - City configuration
data_pipeline/config.py
Forecasting
- Model training
ml_service/train_model.py - Forecast generator
ml_service/forecast_generator.py - TreeSHAP explainability
ml_service/explainability.py
API and assistant
- Database access
backend/src/db.js - REST API routes
backend/src/routes.js - API server
backend/src/server.js - PulseAI engine
backend/src/assistantEngine.js
Dashboard
- Frontend API client
frontend/src/api.js - Dashboard app
frontend/src/App.jsx - Geospatial map
frontend/src/components/GeospatialMap.jsx - Node detail drawer
frontend/src/components/NodeDrawer.jsx - Model accuracy suite
frontend/src/components/ModelAccuracyView.jsx - Assistant interface
frontend/src/components/ChatAssistant.jsx
Data and artifacts
- Pipeline storage
data_pipeline/db_storage.py - XGBoost model
models/xgboost_congestion.json - Urban flow database
data/urban_flow.db
Other components
- GTFS transit feeds
- Coastal weather
- Dashboard user
Connections 33
- GTFS transit feeds → GTFS ingestion: provides schedules
README.md - Coastal weather → Weather service: provides conditions
data_pipeline/weather_service.py - GTFS ingestion → Traffic synthesizer: supplies schedules
data_pipeline/traffic_synthesizer.py - Weather service → Traffic synthesizer: supplies weather
data_pipeline/traffic_synthesizer.py - City configuration → GTFS ingestion: configures
data_pipeline/gtfs_ingest.py - City configuration → Weather service: configures
data_pipeline/weather_service.py - City configuration → Traffic synthesizer: configures
data_pipeline/traffic_synthesizer.py - Traffic synthesizer → Feature engineering: provides observations
data_pipeline/feature_engineer.py - Traffic synthesizer → Pipeline storage: stores observations
README.md - Feature engineering → Model training: builds training features
ml_service/train_model.py - Pipeline storage → Model training: loads training data
ml_service/train_model.py - Model training → XGBoost model: saves model
README.md - Model training → Pipeline storage: writes benchmarks
ml_service/train_model.py - XGBoost model → Forecast generator: loads for prediction
README.md - GTFS ingestion → Forecast generator: provides schedules
ml_service/forecast_generator.py - Weather service → Forecast generator: provides forecast weather
ml_service/forecast_generator.py - Feature engineering → Forecast generator: supplies feature logic
ml_service/forecast_generator.py - Forecast generator → TreeSHAP explainability: requests attributions
ml_service/forecast_generator.py - Forecast generator → Pipeline storage: loads history and saves forecasts
ml_service/forecast_generator.py - Pipeline storage → Urban flow database: writes forecast data
README.md - Urban flow database → Database access: stores served data
README.md - API server → REST API routes: registers routes
backend/src/server.js - REST API routes → Database access: queries data
backend/src/routes.js - REST API routes → PulseAI engine: dispatches questions
backend/src/routes.js - PulseAI engine → Database access: queries telemetry
backend/src/assistantEngine.js - Dashboard app → Frontend API client: fetches dashboard data
frontend/src/App.jsx - Frontend API client → REST API routes: calls API endpoints
README.md - Dashboard app → Geospatial map: renders map
frontend/src/App.jsx - Dashboard app → Node detail drawer: renders node details
frontend/src/App.jsx - Dashboard app → Model accuracy suite: renders accuracy suite
frontend/src/App.jsx - Dashboard app → Assistant interface: renders assistant
frontend/src/App.jsx - Dashboard user → Dashboard app: uses dashboard
README.md - Assistant interface → Frontend API client: submits questions
README.md