AirGuard

Method

How AirGuard decides

Every number in the app comes from deterministic code: a forecast model, an interpolation step and an exposure calculation. The assistant only chooses which of these tools to call and explains what they return. This page lists every assumption, read live from the code that uses it.

1. Forecast at each station

AirGuard uses about 75 PM2.5 monitors across Delhi NCR: CPCB, DPCC, IMD and state board stations, the US Embassy monitor and a few low-cost sensors, all via OpenAQ. Every hour it forecasts each one for now and +1, +3, +6, +12 and +24 hours using gradient-boosted trees (XGBoost). Inputs are the station's recent readings, neighbouring stations, the CAMS global PM2.5 forecast, wind, humidity, temperature, boundary-layer height and crop fires detected upwind by NASA FIRMS in the two days before.

Each forecast carries an 80% range, set from how wrong the model was on a recent calibration week. When a station's feed is delayed, its own readings are left out and the model estimates it from everything else; such values are marked as estimated.

2. Along the route

Routes come from OpenStreetMap via OSRM, up to three per trip. Each is cut into 200-metre pieces, and each piece is given the time you would reach it. PM2.5 there is interpolated in time between forecast hours, then in space from the six nearest stations with inverse-distance weighting.

Confidence for each piece combines how far the nearest station is and how wide the forecast range is. A route's confidence is the time-weighted average of its pieces.

3. The exposure index

For each route and departure time:

exposure index = Σ  PM2.5(piece) × hours on piece × mode factor

The result is in µg·h/m³. It is a model estimate, not a measured dose. Mode factors scale for how hard you breathe and how enclosed you are, so AirGuard only compares options within one mode.

4. Trip air level

The trip's average PM2.5 is labelled using CPCB's PM2.5 bands. CPCB defines them for 24-hour averages; using them for a trip average is our simplification, so the app calls this an air level, not an AQI.

5. Choosing what to recommend

Departures are checked every 15 minutes across the window you allow. The baseline is the fastest route leaving now. Another option is recommended only if the exposure it saves is worth the time it costs you, and only within your limits:

cost  = extra minutes on the road + 0.5 × minutes waited
worth = minutes per 10% (your sensitivity) × reduction % / 10
recommend the lowest-exposure option where cost ≤ worth

Waiting counts half because you can wait indoors. Reductions under 5% are treated as noise. Your sensitivity changes only this trade-off. The pollution estimate is the same for everyone.

6. The assistant

The assistant is built with the Strands Agents SDK, an open-source agent framework from AWS. It has six tools: the current time, place search, the saved trip analysis, a point forecast, route scoring and the departure search. Before an answer is shown, every number in it is checked against the numbers the tools returned. If any number can't be traced, the answer is replaced by a fixed explanation of the saved analysis, and the app says so.

7. Known limits

  • Monitors are sparse; most of a route is interpolated, and roadside levels can be higher than any nearby station.
  • Travel times come from OpenStreetMap routing without live traffic.
  • Forecasts run to 24 hours ahead, and departures are planned up to 6 hours ahead from now.
  • Mode factors are assumptions from published breathing rates, not measurements of you.
  • This is general guidance, not medical advice.

Data and credits