โ† Back to Home

๐ŸŽ† How Diwali Impacts Air Quality: Insights from My AQI Prediction Model

October 21, 2025

Every year, Diwali brings a burst of lights, celebration, and, unfortunately, a spike in air pollution. Fireworks, increased traffic, and energy usage cause the Air Quality Index (AQI) to soar. This year, I decided to quantify that effect using a Random Forest Regressor trained on historical AQI data.

๐Ÿ“Š My Approach

I collected hourly pollutant measurements from key air quality indicators like CO, NOโ‚‚, SOโ‚‚, Oโ‚ƒ, PM10, PM2.5, and NHโ‚ƒ. These were aggregated into daily averages, and I added temporal features such as month and weekday to capture seasonal patterns.

I then trained a Random Forest Regressor to predict the next dayโ€™s AQI. This model allowed me to see how โ€œnormalโ€ air quality would behave and then compare it to the unusual spikes during Diwali.

๐Ÿ’ก Key Findings

1. Pre-Diwali Predictions

2. Diwali Effect

3. Feature Importance

๐Ÿ” Observations

๐ŸŒฑ Implications

๐Ÿ“‚Source

The complete code and dataset used for this analysis are available on my GitHub repository.

๐Ÿ”—Go to AQI Project

๐Ÿ“ˆ Using AI for Cleaner Cities

My Random Forest model demonstrates how machine learning can capture normal AQI patterns, but it also highlights the limitations when sudden, human-driven events occur. By combining historical data, temporal features, and event-specific indicators, predictive models could help forecast pollution peaks more accurately and guide preventive action during festivals.

Diwali is beautiful, but its environmental cost is real. Using data and predictive models, we can better understand the consequences and take informed steps to mitigate pollution while still celebrating responsibly.

Note that my AQI predictions were done based on Pune's AQI Data set from 2017-24 with large number of values removed due to values being outliers and missing.