feat: Initial CBPOA commit — 武汉儿童呼吸疾病风险评估系统

Context: Build a spatial risk assessment system correlating air quality
data with children's respiratory disease incidence across Wuhan.

Approach: FastAPI backend serving PostGIS spatial queries, React
frontend with Deck.gl maps, and a PyTorch SpatialTemporalGCN pipeline
for multi-day (1d/3d/7d) risk prediction.

Changes:
- backend/ — FastAPI API with auth (JWT), alerts, risk analysis,
  geocoded case data, grid statistics, and report endpoints
- frontend/ — React dashboard with interactive risk maps, alert
  monitoring, district comparison charts, and timeline player
- models/ — SpatialTemporalGCN model with trained weights and ONNX
  export for inference
- scripts/ — ETL pipeline for weather + medical data, grid generation,
  feature engineering, training, and daily inference
- deploy/ — Docker Compose configs for backend, frontend, and MLflow
- docs/ — API docs, deployment guide, user guide, and code review

Impact: Enables spatial risk visualization, alert monitoring, and
ML-driven health risk forecasting for environmental health teams.
This commit is contained in:
2026-06-05 02:13:49 +08:00
commit fc468464b2
117 changed files with 18282 additions and 0 deletions

83
deploy/docker-compose.yml Normal file
View File

@@ -0,0 +1,83 @@
version: '3.8'
services:
postgres:
image: postgis/postgis:15-3.3
container_name: wuhan_postgres
environment:
POSTGRES_DB: wuhan_disease
POSTGRES_USER: wuhan_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-wuhan_password}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U wuhan_user -d wuhan_disease"]
interval: 5s
timeout: 5s
retries: 5
networks:
- wuhan_network
backend:
build:
context: ../backend
dockerfile: Dockerfile
container_name: wuhan_backend
environment:
DATABASE_URL: postgresql://wuhan_user:password@postgres:5432/wuhan_disease
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
depends_on:
postgres:
condition: service_healthy
ports:
- "8000:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/docs || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- wuhan_network
frontend:
build:
context: ../frontend
dockerfile: Dockerfile
container_name: wuhan_frontend
environment:
VITE_API_URL: http://localhost:8000
depends_on:
- backend
ports:
- "3000:80"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
networks:
- wuhan_network
# jupyter:
# image: jupyter/scipy-notebook:latest
# container_name: wuhan_jupyter
# ports:
# - "8888:8888"
# volumes:
# - ../processed:/home/jovyan/processed
# - ../Datas:/home/jovyan/Datas
# networks:
# - wuhan_network
volumes:
postgres_data:
driver: local
networks:
wuhan_network:
driver: bridge