How phanikumar122/public-transport-demand-prediction works
Public Transport Demand Prediction integrates bus, rail, and air data into a warehouse and analytics pipeline, then exposes demand forecasts and operational insights through a web dashboard. The principal workflow is raw data cleaning, warehouse loading, mining and model development, followed by API-served predictions and analysis. README documents OLAP, clustering, anomaly detection, model comparison, tuning, and SHAP; sampled source confirms ETL orchestration, warehouse loading, selected API handlers, and frontend dispatch. Some subsystem wiring is documented rather than directly sampled, so uncertain internal links are omitted.
Main entry points: App.tsx Dashboard App · pipeline.py ETL Orchestrator · train.py Model Training · load.py Warehouse Loader
Components 29
Data Ingestion
- ETL Orchestrator
src/etl/pipeline.py - Bus ETL
src/etl/apsrtc.py - Rail ETL
src/etl/railways.py - Air ETL
src/etl/flights.py - Warehouse Loader
src/warehouse/load.py
Analytics
- OLAP Analysis
src/warehouse - Route Clustering
src/mining/clustering.py - Anomaly Detection
src/mining/anomaly_detection.py - Feature Preparation
src/ml/preprocessing.py - Model Training
src/ml/train.py - Model Evaluation
src/ml/evaluate.py - Hyperparameter Tuning
src/ml/tune.py - SHAP Explainability
src/ml/explain.py
Prediction Service
- Demand Prediction
src/ml/predict.py - REST API
src/api/main.py
Dashboard
- Dashboard App
frontend/src/App.tsx - API Client
frontend/src/services/api.ts - Overview Dashboard
frontend/src/components/OverviewDashboard.tsx - Prediction Simulator
frontend/src/components/PredictionSimulator.tsx - Model Performance
frontend/src/components/ModelPerformance.tsx - Cluster Analysis
frontend/src/components/ClusterAnalysis.tsx - Anomaly Explorer
frontend/src/components/AnomalyDetection.tsx - Explainability Studio
frontend/src/components/ExplainabilityStudio.tsx - Batch Explorer
frontend/src/components/BatchExplorer.tsx - Geospatial Map
frontend/src/components/NetworkGeoMap.tsx
Other components
- Analyst
- Transport Datasets
- MySQL Warehouse
- Dashboard User
Connections 30
- Transport Datasets → Bus ETL: supplies data
- Transport Datasets → Rail ETL: supplies data
- Transport Datasets → Air ETL: supplies data
- ETL Orchestrator → Bus ETL: runs
- ETL Orchestrator → Rail ETL: runs
- ETL Orchestrator → Air ETL: runs
- Bus ETL → Warehouse Loader: cleaned data
- Rail ETL → Warehouse Loader: cleaned data
- Air ETL → Warehouse Loader: cleaned data
- Warehouse Loader → MySQL Warehouse: loads tables
- MySQL Warehouse → OLAP Analysis: provides warehouse data
- ETL Orchestrator → Route Clustering: mining step
- ETL Orchestrator → Anomaly Detection: mining step
- Feature Preparation → Model Training: prepares features
- Model Training → Model Evaluation: evaluates models
- Model Training → Hyperparameter Tuning: tunes models
- Model Training → SHAP Explainability: explains best model
- Model Training → Demand Prediction: supports forecasting
- Dashboard User → Dashboard App: uses dashboard
- Dashboard App → API Client: requests data
- API Client → REST API: HTTP requests
- REST API → Demand Prediction: runs prediction
- Dashboard App → Overview Dashboard: renders
- Dashboard App → Prediction Simulator: renders
- Dashboard App → Model Performance: renders
- Dashboard App → Cluster Analysis: renders
- Dashboard App → Anomaly Explorer: renders
- Dashboard App → Explainability Studio: renders
- Dashboard App → Batch Explorer: renders
- Dashboard App → Geospatial Map: renders