How huuluan186/tn-da22tta-110122016-phamhuuluan-epiweather works
EpiWeather combines epidemiological and ERA5 weather data to forecast weekly influenza and dengue cases and risk, then presents results through a global risk map, country detail pages, and model analytics. The user workflow runs from selecting disease, region, and week in the React interface through API requests to FastAPI forecast services, which retrieve feature snapshots and invoke production models; results return as map risk, four-week forecasts, and historical trends. The README documents ingestion and cross-correlation stages, but their implementation details were not sampled, so those links are documented at subsystem level.
Main entry points: api.py REST endpoints · forecast.py Forecast endpoint · observation.py Epidemiology and feature store · prediction_service.py Prediction service
Components 20
Data preparation
- WHO, OpenDengue, ERA5
- Data synchronization
src/scripts - Lag and feature analysis
src/scripts
Forecast backend
- Epidemiology and feature store
src/backend/app/models/observation.py - FastAPI application
src/backend/app/main.py - REST endpoints
src/backend/app/api/v1/api.py - Forecast endpoint
src/backend/app/api/v1/endpoints/forecast.py - Risk map endpoint
src/backend/app/api/v1/endpoints/risk.py - Analytics endpoint
src/backend/app/api/v1/endpoints/analytics.py - Prediction service
src/backend/app/services/prediction_service.py - Feature lookup
src/backend/app/services/feature_lookup.py - Production ML inference
src/backend/app/services/ml_engine.py - Risk classification
src/backend/app/services/risk_service.py
User experience
- Global risk map
src/frontend/src/pages/HomePage.tsx - Country detail
src/frontend/src/pages/DiseaseDetailPage.tsx - Query hooks
src/frontend/src/hooks/useForecast.ts - API client
src/frontend/src/api/forecast.ts - API data contracts
src/frontend/src/types/api.ts
Model evaluation
- Model analytics
src/frontend/src/pages/AnalyticsPage.tsx
Other components
- Health user
Connections 24
- Health user → Global risk map: selects disease and week
- Health user → Country detail: opens country
- WHO, OpenDengue, ERA5 → Data synchronization: provides surveillance and weather data
- Data synchronization → Lag and feature analysis: prepares aligned data
- Lag and feature analysis → Epidemiology and feature store: produces features
- FastAPI application → REST endpoints: mounts
src/backend/app/main.py - REST endpoints → Forecast endpoint: routes forecast
src/backend/app/api/v1/api.py - REST endpoints → Risk map endpoint: routes risk
src/backend/app/api/v1/api.py - REST endpoints → Analytics endpoint: routes analytics
src/backend/app/api/v1/api.py - Forecast endpoint → Prediction service: calls
src/backend/app/api/v1/endpoints/forecast.py - Prediction service → Feature lookup: loads snapshots
src/backend/app/services/prediction_service.py - Prediction service → Production ML inference: predicts horizons
src/backend/app/services/prediction_service.py - Feature lookup → Epidemiology and feature store: reads snapshots
src/backend/app/services/feature_lookup.py - Risk map endpoint → Risk classification: serves risk results
- Risk classification → Feature lookup: uses feature data
src/backend/app/services/risk_service.py - Risk classification → Epidemiology and feature store: reads prediction data
src/backend/app/services/risk_service.py - Analytics endpoint → Epidemiology and feature store: reports model evaluations
- Global risk map → Query hooks: requests map data
- Country detail → Query hooks: requests forecasts and history
src/frontend/src/pages/DiseaseDetailPage.tsx - Query hooks → API client: calls
src/frontend/src/hooks/useForecast.ts - API client → Forecast endpoint: requests forecast
- Forecast endpoint → API data contracts: returns forecast schema
src/backend/app/api/v1/endpoints/forecast.py - API data contracts → Country detail: shapes displayed data
src/frontend/src/pages/DiseaseDetailPage.tsx - Model analytics → Analytics endpoint: requests evaluation data