Commit Graph

11 Commits

Author SHA1 Message Date
8ddd8e87bb feat: add reports center, admin drill-down, disease filter + bug fixes + perf optimization
Frontend features:
- 报表中心 (ReportsCenter): list/detail views, diagnosis breakdown chart, CSV export
- 多级行政下钻 (AdminBreadcrumb): 湖北省→武汉市→区→街道 hierarchical drill-down
- 按病种筛选 (DiseaseFilter): multi-select diagnosis filter on monitoring + reports pages

Backend:
- Add /forecast/{days} endpoint, diagnosis filter params on cases endpoints
- Add /streets aggregation endpoint, enrich reports with real case data
- Extract shared case_loader module

Bug fixes (14):
- Fix missing /risk/forecast route (404), historyApi pointing to non-existent router
- Fix min_risk filter silently ignored in insights/hotspots
- Fix type mismatches: CaseTrendResponse, CaseStatsResponse shapes
- Fix silent .catch(() => {}) swallowing errors, fetchAlerts not clearing stale state
- Fix lru_cache caching exceptions, generateReport used cachedGet for write op
- Fix missing useEffect deps in Insights, DistrictComparison, ReportsCenter

Performance (9):
- Zustand selectors across 9 components (eliminate re-render cascades)
- Fix districtCases.sort() mutating store state, inline IIFE → memo'd component
- CaseLocationMap: React.memo, race protection, correct deps
- AlertCard: stable callbacks, TimelinePlayer: useMemo, TopNav: clock isolation
- SideNav: modules array to module scope, DiseaseFilter: memoized filter
2026-06-08 18:40:08 +08:00
47f4bb4ab2 chore: add meeting audio and transcription
- Add 6月5日 meeting recording (28MB M4A)
- Add funasr SenseVoiceSmall transcription with speaker diarization
- Update .gitignore to exclude transcription intermediates
2026-06-08 04:04:02 +08:00
05fcc0d627 上传文件至「/」 2026-06-06 23:49:52 -05:00
5ffa14864d fix: migrate Outputs files to LFS
These files were committed before LFS was configured and remained
as regular git objects. Re-add them through LFS clean filter to
ensure proper pointer storage for cross-machine portability.
2026-06-07 06:44:15 +08:00
bc73351234 chore: configure git-lfs and migrate data to LFS
- Add .gitattributes with LFS tracking for binary/data files
- Migrate processed parquet/npy/npz files from regular git to LFS
- Add Datas/ raw data via LFS (DEM, weather, air quality, maps)
- Add outputs/ GIS analysis and street matching results
- Enable cross-machine development with full data portability
2026-06-07 06:28:30 +08:00
5ae30ea4a8 chore: add processed data, outputs, and proposal
- Add processed/ ML features and GCN model inputs
- Add Outputs/ GIS analysis, deploy configs, lit review
- Add proposal document for 湖北省卫生健康科技项目
- Enable full data portability for cross-machine development
2026-06-07 05:31:02 +08:00
fad2034a53 chore: update .gitignore for data and binary files 2026-06-07 05:16:23 +08:00
cb0f6cf7f6 feat: enrich insights cards, add AI chatbot
Add 3 new data-driven insight cards (daily cases, district risk
comparison, weather impact) with real parquet data. Fix season
card to use current date instead of data date. Expand to 11 cards.

Add POST /api/chat endpoint proxying to ai.2890.ltd with JWT auth.
Create ChatBot frontend component with collapsible chat panel,
message bubbles, and auto-scroll. Chat API key stored in .env only.

Clean up duplicate typing imports in insights.py, export cachedPost.
2026-06-05 03:10:28 +08:00
58a6df0e06 fix: insights crash, dup grids, .map() guards
Add /api/insights/cards endpoint with proper card format matching
frontend expectations. Fixes "Cannot read properties of undefined
(reading 'map')" crash. Switch frontend to use new endpoint.

Replace alert marker rectangles with circleMarkers so they don't
look like a second grid. Default showAlertMarkers to false.

Add || [] guards on data.features.map() and alerts.map().
Reduce RiskMap grid count 3000→1500, debounce 150ms→300ms.
2026-06-05 02:37:03 +08:00
e64ca3b4f5 fix: analysis 500s, caching, alert page perf
P0: Fix KeyError in 3 analysis endpoints. geojson.py stores 1d risk
as "risk_value" but analysis.py accessed "risk_1d" — always crashed.

Backend: Add lru_cache to GeoJSON/CSV/Parquet loaders, date helpers,
and district loader. Add try/except and FileNotFoundError guards.

Frontend: Debounce riskRange, merge counts into useMemo, stabilize
handleGridClick with ref, memoize nearest-grid scan, wrap AlertMap
in React.memo, switch useLodGrid from fetch to cachedGet.
2026-06-05 02:27:10 +08:00
fc468464b2 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.
2026-06-05 02:13:49 +08:00