Research & Methodology

How This Study
Was Built

This page documents every step taken to produce the data shown in the dashboard — from raw government CSV files to cleaned datasets, joined tables, AQI calculations, and machine learning models. Nothing is hidden. Every number on the dashboard is traceable to a specific output file.

Dataset & Source Data Cleaning Analysis Pipeline Conclusions
About the Data
Dataset & Source
Where the data comes from, what it covers, and who collected it.
Air Quality Dataset
Air quality data for Indian cities from 2010 to 2023, collected from the Central Control Room for Air Quality Management.
453
Cities
31
States
97
Column Types
14yr
Coverage
Source: Central Pollution Control Board (CPCB) — official body of the Government of India for environmental monitoring.
Portal: cpcb.nic.in
Collection method: Selenium web automation used to extract and process data from the CPCB portal.
Disease Mortality Dataset
Air-pollution-attributed deaths across 21 disease categories, from the Global Burden of Disease (GBD) study, state-level and national-level.
21
Disease Causes
2010
From
2023
To
5
Source Files
Source: Global Burden of Disease (GBD) study, Institute for Health Metrics and Evaluation.
Metrics used: Number of deaths (metric_id = 1) and Death rate per 100,000 (metric_id = 3).
Risk factor: Air pollution as assigned causal risk.
Acknowledgement
The air quality data used in this project has been sourced from the Central Pollution Control Board (CPCB), the official portal of the Government of India, accessible at cpcb.nic.in. The CPCB has made this data publicly available. Selenium was used for data collection — a web automation library instrumental in extracting structured measurement data from CPCB's station reporting interface.
How the Data Was Cleaned
Analysis Pipeline
Six Jupyter notebooks processed the raw data into the outputs shown on the dashboard. Each phase is documented here in plain language.
Phase 0
Raw Data Exploration & Station Inventory
Notebook: Phase0.ipynb + Phase0.5.ipynb

What this notebook does: Before any cleaning, Phase 0 mapped out exactly what raw data existed. It loaded the station metadata file (stations_info.csv), counted all CSV files (one per city), and catalogued the 97 distinct column names used across 453 stations — since different stations reported different pollutants with different naming conventions.

Phase 0.5 explored the disease dataset separately — confirming that all five source files shared the same column structure (GBD standard format), that only metric_id 1 (Number) and 3 (Rate) were relevant, and that exactly 21 unique disease cause names appeared across the files. Row counts were verified: 6,720 + 6,720 + 9,408 + 4,032 + 1,344 = 28,224 total rows.

Inputs
453 city CSV files (raw CPCB data)
stations_info.csv
5 GBD disease CSV files
Output
Confirmed column map (97 types → 29 canonical)
Verified disease schema (21 causes, 2010–2023)
No files saved — exploration only
Phase 1
Pollution Data Cleaning & Monthly Aggregation
Notebook: Phase1.ipynb

What this notebook does: This is the most complex phase. It loads every city CSV, standardises column names, converts units where measurements were recorded in non-standard formats, drops unusable columns, and aggregates hourly readings into monthly means.

The unit conversion problem: Different stations labelled the same pollutant in different units. For example, a column named NOx (ppm) at one station should produce the same values as NOx (ppb) at another — but 1 ppm = 1,000 ppb. Without correction, those stations would appear to have 1,000× less pollution than reality. Ten conversion rules were applied based on the original column label, using atmospheric chemistry constants at 25°C, 1 atm.

Data quality tiering: Each city was assigned a quality tier (Tier 1 / 2 / 3) based on how many years of data it had and how complete the readings were. Tier 1 cities had the most complete long-term records and were prioritised for the ML model.

Key decision: Monthly averages were used rather than daily peaks. CPCB AQI is technically defined for 24-hour averages, so monthly-derived AQI values will underestimate actual daily peak AQI. This was acknowledged as an inherent limitation — appropriate for trend analysis and state comparisons, but not for reporting equivalent to official daily AQI readings.
Inputs
453 city CSVs (hourly readings)
stations_info.csv (station metadata)
Output
air_pollution_master.csv
City × month rows, 29 pollutant columns
Quality tier flag per city-year
Phase 2
Disease Data Cleaning & Evidence Classification
Notebook: phase_2_disease_clean.ipynb

What this notebook does: Loads all five GBD disease files, combines them into a single DataFrame, and filters to keep only Number and Rate metrics (dropping Percent). The national aggregate rows (location = "India") are separated from state-level rows and saved independently.

Evidence strength labelling: Every disease was assigned one of three labels based on the scientific literature — direct (WHO/IARC confirmed causal link, e.g. lung cancer, asthma), strong (mechanism well understood, e.g. tuberculosis, upper respiratory infections), or indirect (pollution increases systemic vulnerability, e.g. neonatal birth outcomes, congenital defects). These labels drive the colour coding in the correlation chart.

Inputs
airpollutiondiseases1st.csv through 5th.csv
28,224 total rows before filtering
Outputs
disease_master.csv (state-level)
disease_national.csv (India aggregate)
evidence_strength column added to all rows
Phase 3
Joining Pollution and Disease Data
Notebook: phase_3_join.ipynb

The fundamental mismatch: Pollution data is at city × month level. Disease data is at state × year level. They cannot be joined directly.

Phase 3 solves this by collapsing pollution data from city-month rows up to state-year rows — computing the mean PM2.5 (and other pollutants) per state per year, weighted by data coverage. The result is then joined to the disease data on the keys state name + year.

State name standardisation was critical: CPCB uses different naming conventions from GBD (e.g. "Jammu and Kashmir" vs "Jammu & Kashmir and Ladakh"). A manual mapping was applied to ensure clean joins rather than silent NaN mismatches.

Key decision: Only rows with join_quality == 'full' were used in the machine learning analysis — meaning both pollution AND disease data were present for that state-year combination. Partial joins were excluded to avoid biased model training.
Inputs
air_pollution_master.csv (Phase 1)
disease_master.csv (Phase 2)
Output
combined_master.csv (state × year)
Main analysis table used throughout the project
Phase 4
CPCB AQI Calculation
Notebook: phase_4_aqi.ipynb

What this notebook does: Applies the official CPCB AQI breakpoint tables (from the Ministry of Earth Sciences Standard Operating Procedure, citing CPCB National Air Quality Index 2014) to compute a sub-index per pollutant for each city-month. The final AQI is the maximum sub-index across all available pollutants.

Pollutants used: PM2.5, PM10, NO₂, SO₂, CO, NH₃, and Ozone. Lead (Pb) is excluded — it is not measured in the CPCB station network dataset. The AQI formula uses linear interpolation between official breakpoint pairs.

Critical limitation: CPCB AQI is designed for 24-hour averages (PM2.5, PM10, NO₂, SO₂, NH₃) and 8-hour averages (CO, Ozone). This project uses monthly averages. Monthly means are lower than daily peaks — AQI derived from monthly data will systematically underestimate actual daily AQI. This is acceptable for trend analysis and relative state comparisons, but these figures should not be reported as equivalent to official CPCB daily AQI readings.
Inputs
air_pollution_master.csv (Phase 1)
CPCB breakpoint tables (hardcoded from SOP)
Outputs
air_pollution_with_aqi.csv (city × month + AQI)
combined_master.csv updated with state-year AQI
Phase 5
Machine Learning Models
Notebook: phase_5_ml.ipynb

Two separate predictive tasks were defined:

Task B (done first — simpler): Does state-level PM2.5 exposure predict disease death rates? Ordinary Least Squares (OLS) linear regression was applied for each of the 21 disease categories separately. Death rate (per 100,000 population) was used as the target — not raw death count — to control for the large population differences between states. The model was trained on 96 state-year observations.

Task A (time-series ML): Predict next month's city-level PM2.5 from current pollution and weather. The model progression rule was: start with Linear Regression. If R² ≥ 0.6, stop. Since Linear Regression achieved R² = 0.47 on the test set, a Random Forest was trained next. Random Forest achieved R² = 0.594 on the test set.

Key decision — no data leakage: For Task A, the train/test split was done strictly by time. Training data = 2015–2020. Test data = 2021–2023. sklearn's train_test_split() was explicitly not used — it shuffles rows randomly, which would allow the model to train on 2022 data while testing on 2019 data. That would produce artificially inflated accuracy. Time-based splitting is the only valid approach for time-series forecasting.
Inputs
combined_master.csv (Task B)
air_pollution_with_aqi.csv (Task A)
Outputs
rf_model.pkl (Random Forest, saved model)
scaler.pkl (feature scaler)
Task B R² scores: 0.19 – 0.71 across diseases
What the Outputs Tell Us
Conclusions
What the data actually shows about India's air quality crisis and its measurable impact on human health.
01
India's air is dangerously far from safe — and remains so
The national average PM2.5 was 65.1 μg/m³ in 2023 — over 13 times the WHO guideline of 5 μg/m³ per year. Even India's own national standard of 40 μg/m³ is regularly exceeded across most major states. The data shows a general improvement from a peak of 142.9 μg/m³ in 2013, but pollution rose again sharply in 2023, suggesting the improvement is not stable. Bihar, Uttar Pradesh, and Delhi consistently record the highest concentrations — all above 94 μg/m³ on average over the study period.
02
Over 10 million people die annually from air-pollution-linked diseases
Across all 21 GBD disease categories attributed to air pollution, 10.83 million deaths were recorded for 2023 — roughly one death every 3 seconds. Cardiovascular diseases account for the largest share (~3.1 million), followed by chronic respiratory diseases (~1.25 million) and stroke (~1.03 million). The 2021 spike to 12.09 million reflects COVID-19's compounding effect on pollution-vulnerable populations, particularly those with pre-existing respiratory conditions.
03
Pollution has statistically measurable effects on birth outcomes
The strongest Pearson correlation found was between PM2.5 and upper respiratory infections (r = +0.684, p < 0.001). Critically, neonatal outcomes showed large positive correlations — neonatal encephalopathy (r = +0.664) and neonatal preterm birth (r = +0.498) both rise significantly with pollution levels. The Task B linear regression confirmed this: neonatal encephalopathy had the highest R² of any disease (0.71) — meaning PM2.5 alone explains 71% of the variation in neonatal brain injury deaths across states. This is a public health finding with direct policy implications.
04
The ML model can predict next-month PM2.5 with moderate accuracy
The Random Forest model trained on monthly lag features and weather variables achieved a test-set R² of 0.594 and a mean absolute error of ±16.04 μg/m³ — predicting entirely on held-out 2021–2023 data it had never seen. This is a meaningful result: the model explains 59.4% of monthly PM2.5 variation using only lagged pollution and weather inputs. Its largest failure mode is during sudden weather events (monsoon onset, dust storms) that are difficult to capture with smooth monthly inputs. Improvements are possible with daily data and geospatial features.
05
What India's pollution crisis means going forward
This study demonstrates that the relationship between PM2.5 exposure and disease deaths in India is statistically real, measurable, and consistent across multiple analytical approaches — correlation analysis, regression modelling, and time-series forecasting all point to the same conclusion. The states with the highest pollution levels are home to hundreds of millions of people. Uttar Pradesh, with an average PM2.5 of 84.3 μg/m³, has the highest cumulative death toll in this dataset — 24,165,000 deaths attributed to air pollution across all available years. Without significant intervention — industrial regulation, cleaner transport, and agricultural fire controls — the pollution levels and associated death tolls shown in this dataset will continue or worsen. The model's ability to forecast future PM2.5 levels creates an opportunity for early warning systems that can help healthcare systems prepare for high-pollution periods.