Here's the complete, well-structured Project Story with all the requested sections:

About the Project SmogNet is an intelligent end-to-end air quality monitoring and public alert system designed to detect pollution spikes, identify their sources, and deliver timely, actionable health alerts to the public.

Inspiration Pakistan’s severe air pollution crisis, particularly the recurring smog in Lahore, Islamabad, Faisalabad, and other major cities, deeply inspired us. Every winter, millions of people suffer from hazardous air quality due to vehicular emissions, crop burning, industrial pollution, and dust storms. Despite the availability of pollutant data, there was a clear gap in converting this data into real-time intelligence and public action. The SmogNet Datathon at UET Mardan gave us the perfect platform to build a complete environmental intelligence pipeline that bridges data, science, and public communication.

What it does SmogNet processes raw air quality data and performs three critical tasks in sequence:

Spike Detection — Detects abnormal pollution spikes using city-specific and season-aware anomaly detection. Source Classification — Identifies the most likely cause of the spike (Crop Burning, Vehicular Emissions, Industrial, Dust Storms, or Mixed). Public Alert Generation — Automatically creates clear, concise, non-technical public health alerts.

The system takes raw hourly pollutant readings and outputs ready-to-disseminate alerts suitable for public use.

How we built it We developed a fully modular Python pipeline consisting of three interconnected stages:

Stage 1 (Anomaly Detection): Used rolling window statistics (mean & standard deviation) with Z-score method, grouped by city and season to create adaptive baselines. Stage 2 (Source Classification): Built a hybrid rule-based classification engine using known chemical fingerprints of different pollution sources (e.g., high NH₃ + CO for crop burning, high NOₓ for vehicles, PM10/PM2.5 ratio for dust). Stage 3 (Alert Generation): Created template-based natural language generation for producing human-readable 3–4 sentence alerts.

All components were integrated into a single end-to-end pipeline that can process both historical and simulated real-time data. Built With:

Language: Python Libraries: Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn Environment: Google Colab & Jupyter Notebook Dataset: Pakistan Air Quality & Pollutant Concentrations (Kaggle)

Challenges we ran into

Significant seasonal and geographical variation in pollution patterns made fixed-threshold approaches useless. Lack of labeled source data forced us to rely on domain knowledge and chemical signatures. Time pressure of a one-day datathon while trying to build a complete working system. Ensuring alerts remained simple, accurate, and non-alarming yet responsible for public consumption.

Accomplishments that we're proud of

Successfully built a fully functional end-to-end pipeline (Raw Data → Detection → Classification → Alert) within one day. Created a context-aware anomaly detection system that respects city and seasonal differences. Produced clear, professional public health alerts that are ready for real-world use. Delivered strong visualizations showing pollution trends and detected anomalies.

What we learned

The importance of context-aware modeling in real-world environmental data. How to translate complex technical outputs into simple, actionable public communication. Systems thinking — how different components (detection, classification, NLP) must work together seamlessly. Practical time-series analysis and the power of rule-based systems when interpretability matters.

What's next for SMOGNET

Deploy the system as a real-time dashboard using live data feeds. Improve source classification using machine learning models trained on expanded labeled data. Partner with environmental agencies and local governments for actual public deployment. Extend the system to include forecasting and early warning capabilities. Refine top solutions into research papers or capstone projects at UET Mardan.

Built With

Share this project:

Updates