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.
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?
# Vegetation_analysisi.py
ols("Log_PM2_5 ~ Greenness_Public_Share + Log_NO2 + Log_GDP + Log_Population", data=df).fit()
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.
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.
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).
Planning report: how each city compares with the model
Studentized residuals flag cities that don't fit the pattern.
"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.