A mini digital twin that fuses transit delay, PM2.5, and weather discomfort to estimate commuter stress hotspots.
- FastAPI backend with synthetic city-signal generator
- Stress model and discomfort index functions
- APIs:
GET /signalsGET /stress/hotspots?limit=5GET /stress/trend?hours=12GET /health
- Browser dashboard with MapLibre markers + hotspot list + 12h trend bars
pip install -r requirements.txt
uvicorn src.api:app --reloadOpen http://127.0.0.1:8000.
pytest -qsrc/model.py: stress/discomfort formulassrc/simulator.py: city signal and trend generatorssrc/api.py: API and static web servingsrc/web/: map dashboard filestests/: model/API tests
- Replace synthetic data with real APIs (weather, AQ, transit)
- Calibrate score weights by historical commute data
- Add district-level time slider and anomaly alerts