Case study · Statistical modelling + dashboard

Greenery & Air Quality

Do greener cities have cleaner air once you account for wealth, size and traffic? I merged WHO, World Bank and UN open-space data for 222 cities, fit a regression, and turned the result into a per-city planning report and an interactive Streamlit planner.

−1.0%PM2.5 per extra point of public green space
222cities after merging three datasets
0.46R² of the model
p=0.011green-space effect is statistically significant
01Question

City planners are often told that trees and parks clean the air. But greener cities also tend to be richer, which brings cleaner industry and stricter rules. Does green space still matter once wealth, population and traffic are controlled for? And if it does, what should a specific city do about it?

02Approach
Collect3 sourcesWHO pollutants, World Bank GDP, city open-space share
CleanName matchingLower-case, strip accents, split "A Coruna/ESP"; latest year per city
RecoverFuzzy joinSubstring matching rescues names like "Chicago Naperville…"
ModelLog-linear OLSPM2.5 vs green space + controls
CheckVIF + residualsMulticollinearity and outliers
ActReport + appPer-city plan and Streamlit planner
# Vegetation_analysisi.py
ols("Log_PM2_5 ~ Greenness_Public_Share + Log_NO2 + Log_GDP + Log_Population", data=df).fit()
03Findings

Green space matters, wealth matters more

Figures from re-running the model on the repo's 222-city master table.

Projected PM2.5 reduction from adding green space

Model-based projection: 1 − eβ·Δ, with β = −0.0101.

+5 pts4.9%
+10 pts9.6%
+15 pts14.1%
+25 pts22.3%

Bars scaled to 25%. A correlational model, not proof that planting causes the drop.

Most polluted cities in the report

Annual mean PM2.5 (µg/m³). The WHO guideline is 5.

Delhi114.5
Khulna61.2
Bhopal61.0
Chandigarh60.0
Sylhet59.8

With +5 points of green space, Delhi's projected drop is 5.7 µg/m³.

Green space survives the controls

β = −0.0101 (p = 0.011): each extra percentage point of public open space comes with about 1% lower PM2.5, even holding GDP, population and NO₂ constant.

Wealth is the strongest predictor

Log GDP per capita has the largest effect (β = −0.51, p < 0.001). Bigger cities are slightly more polluted (β = +0.07, p < 0.001).

NO₂ didn't add anything

Once wealth and size were in the model, the traffic proxy wasn't significant (p = 0.97) for fine particles.

A clean model

Every VIF is about 1.0, so the predictors aren't stepping on each other, and only one city is an extreme outlier (|studentized residual| > 3).

04Use it

Planning report: how each city compares with the model

Studentized residuals flag cities that don't fit the pattern.

As expected213
Cleaner5
Critical4

"Critical" means much more polluted than predicted, so check for local causes like crop burning, fireworks or valley geography.

Rule-based recommendations

Each city gets tree types matched to its pollution (PM-trapping broadleaf species, traffic-tolerant species) and policy priorities. 32 cities are flagged for Low Emission Zones and 5 need urgent micro-parks.

Streamlit what-if planner

Pick a city, slide green space from +0 to +25%, and see projected PM2.5 alongside separate action plans for residents, planners and policymakers.