Real-Time Air Quality Intelligence

Hanoi Air Guardian

Live District-Level AQI Forecast & Personalized Risk Advisor

🚦 Rush hour detected — roadside PM2.5 can be 2–3× higher than sensor readings. Avoid main roads.
--:--
Current Air Quality Index
Fetching AQI data…
Safest 2-Hour Outdoor Window
--:-- – --:--
Scanning hourly data…
24-Hour AQI Timeline — Today
Personalized Exposure Risk
Safe Time Outside for You
-- min
Based on your profile, activity & current AQI
🫁 Estimated Lung Load
-- µg PM2.5
--
--
Your Personalized Kit & Tips
When You Return Inside
How It Works
📡

Live AQI Data

Fetches European AQI from Open-Meteo's atmospheric model (CAMS) per district lat/lng. No API key, CORS-enabled. Fallback to Hanoi diurnal simulation.

📈

AQI Trend Detection

Compares the 2-hour rolling average to 2 hours prior. A delta > 8 AQI = Rising ↑. A delta < −8 = Falling ↓. Otherwise Stable. Shown live on the AQI card.

🎯

Safe Window Algorithm

Sliding 2-hour window scans the 24h forecast. Avoids 7–9 AM and 5–7 PM rush hour windows when AQI is equal. Returns the cleanest window with time context.

🧮

Safe Minutes Formula

Base safe time per AQI tier (WHO/EPA-derived) × profile sensitivity multiplier ÷ activity breathing rate multiplier. Running intakes 5–10× more air than sitting.

🫁

Lung Load Index

PM2.5 (µg/m³) × ventilation rate (L/min) × time (min) × 0.001 × 0.4 deposition fraction. Estimates actual PM2.5 deposited in your lungs for your session.

🚦

Rush Hour Micro-Alert

Auto-detects 7–9 AM and 5–7 PM. Hanoi roadside measurements average 2–3× higher than station readings during peak traffic. Banner fires automatically.