Methodology

How Aira AI computes AQI and forecasts it

A transparent breakdown of the data sources, math, and assumptions. v1 model. Last reviewed 14 Jan 2026.

Section 1

Data source: Central Pollution Control Board

Every reading on Aira AI is a National AQI value for a CPCB monitoring station. The network has 28 active stations across Maharashtra. Live numbers are pulled through the OpenAQ aggregator, which mirrors Indian government stations including the CPCB CCR feed, and fall back to a deterministic mock fetcher if that feed is unreachable. Aira AI does not modify raw measurements. The worker re-fetches every 15 minutes. A reading older than 2 hours is flagged stale.

Section 2

AQI: the Indian National AQI formula

We use the official NAQI computation, not the US EPA formula. Each pollutant gets a sub-index by piecewise-linear interpolation across six concentration buckets. The reported AQI is the maximum of the available sub-indices. The dominant pollutant is whichever sub-index equals that maximum.

Sub-index
I = ((I_hi - I_lo) / (BP_hi - BP_lo)) * (C - BP_lo) + I_lo
AQI computation
AQI = max(I_PM2.5, I_PM10, I_NO2, I_SO2, I_CO, I_O3)
BucketAQI rangeHealth implication
Good0 – 50Minimal impact
Satisfactory51 – 100Minor breathing discomfort for very sensitive people
Moderate101 – 200Breathing discomfort for people with lung or heart disease
Poor201 – 300Breathing discomfort for most people on prolonged exposure
Very Poor301 – 400Respiratory illness on prolonged exposure
Severe401 – 500Affects healthy people, serious impact on those with existing diseases

PM2.5 breakpoints (µg/m³ → AQI) are 0–30 → 0–50, 31–60 → 51–100, 61–90 → 101–200, 91–120 → 201–300, 121–250 → 301–400, 251–380 → 401–500. Breakpoints for PM10, NO2, SO2, CO, and O3 differ.

Section 3

Forecast: linear regression on 30-day history

For each station we fit ordinary least squares of daily AQI against day index over the trailing 30 days. The prediction for day d is y(d) = a + b·d. The 7-day forecast is y at today+1 through today+7. The confidence band is ± one standard error of the residuals. Model version: v1-linreg-30d. R² is shown on the forecast chart so a weak fit stays visible.

Pseudocode
# for each station s:
history = last_30_days_of_daily_mean_aqi(s)
X = [0, 1, 2, ..., 29]
a, b = linear_regression(X, history)
for d in range(1, 8):
    predicted[d] = a + b * (29 + d)
    stderr = residual_std_error(X, history, a, b)
    ci[d] = (predicted[d] - stderr, predicted[d] + stderr)
Section 4

Why linear regression

OLS is interpretable, fast, and matches a 30-day daily series for a single station. ARIMA and LSTM are reserved for a later version if the test set shows the linear fit is consistently wrong. A low R² on the forecast page means the prediction should not be treated as precise.

Section 5

AI-generated advisories

The Plain-English forecast summary and personalised advisories are generated by a language model on Groq (qwen/qwen3-32b, with openai/gpt-oss-120b as fallback). The model receives the current AQI, the 7-day forecast, and the selected profile: healthy adult, child, elderly, or asthmatic. Every chat reply is meant to cite its source. Aira refuses questions outside air quality and points to Help. Advisories are a starting point, not a substitute for medical care.

Section 6

Limitations

v1 does not model indoor air, pollutant-specific clinical risk, street-level differences, or places without a nearby CPCB station. Forecasts stop at 7 days. Station outages are marked stale rather than filled in. Other Indian states are out of scope until a later release.

References
  • CPCB National AQI Computation Method (2014)
  • WHO Global Air Quality Guidelines (2021)
  • CPCB Continuous Ambient Air Quality Monitoring data, via OpenAQ
  • Indian Medical Association — Air Pollution and Public Health (2023)
  • Forecast model v1-linreg-30d · database and auth on Supabase