Air Pollution Detection System is an AI-powered desktop application designed to analyze and predict air quality levels using machine learning techniques.
The system utilizes global air pollution data and machine learning models to evaluate Air Quality Index (AQI) categories based on major pollutant indicators such as:
- CO AQI
- Ozone AQI
- NO₂ AQI
- PM2.5 AQI
Users can search by city and country through an interactive graphical interface and instantly obtain air quality information, pollutant statistics, and predicted AQI categories.
- Interactive Tkinter GUI
- Global Air Pollution Dataset
- City & Country Based Search
- AQI Category Prediction
- Decision Tree Classifier
- Random Forest Experimentation
- AQI Visualization
- Color-Coded Air Quality Indicators
- Smart Error Handling
- Automatic Country Suggestions
- Real-Time AQI Lookup
- Monitor air quality across cities and countries
- Predict AQI categories using machine learning
- Analyze pollutant concentrations
- Build an intelligent environmental monitoring tool
- Provide a user-friendly graphical interface
- Generate meaningful air quality insights
- Apply AI techniques to environmental datasets
Global Air Pollution Dataset
- Country
- City
- AQI Value
- AQI Category
- CO AQI Value
- Ozone AQI Value
- NO₂ AQI Value
- PM2.5 AQI Value
The dataset covers multiple countries and cities, making the system applicable to a wide range of environmental monitoring scenarios.
User Input (City/Country)
↓
Input Validation
↓
Dataset Retrieval
↓
Data Preprocessing
↓
Feature Extraction
↓
Machine Learning Model
↓
AQI Prediction
↓
Results Display
Based on the workflow presented in the project design documentation.
The model utilizes:
- CO AQI Value
- Ozone AQI Value
- NO₂ AQI Value
- PM2.5 AQI Value
- Maximum AQI Value
Used as the primary AQI category prediction model.
Implemented and evaluated as an alternative machine learning model.
AQI Category
Predicted categories include:
- Good
- Moderate
- Unhealthy for Sensitive Groups
- Unhealthy
- Very Unhealthy
- Hazardous
Users enter:
- Country
- City
through the graphical interface.
The system verifies:
- City existence
- Country validity
- Dataset availability
Relevant records are extracted from the global air pollution dataset.
Pollutant indicators are processed and the maximum AQI value is calculated.
The trained machine learning model predicts the AQI category.
The system displays:
- AQI Value
- AQI Category
- Predicted AQI Category
- CO AQI
- Ozone AQI
- NO₂ AQI
- PM2.5 AQI
with color-coded indicators for easier interpretation.
The application includes intelligent validation mechanisms:
Displays an error message when a city does not exist in the dataset.
If a city exists in another country, the system automatically suggests the correct country and offers to display the results.
Example:
City 'Gujranwala' is not in 'Niger'
but exists in 'Pakistan'
This improves user experience and system reliability.
- Python
- Pandas
- Scikit-learn
- Decision Tree Classifier
- Random Forest Classifier
- Joblib
- Tkinter
- Jupyter Notebook
- Git
- GitHub
Air_Pollution_Detection_System
│
├── app.py
├── trainModel.py
├── main.py
├── global_air_pollution_dataset.csv
├── air_pollution_model.pkl
├── Project Report
└── README.md
git clone https://github.com/ahadbuilds/Air_Pollution_Detection_System.gitcd Air_Pollution_Detection_Systempip install pandas scikit-learn joblibpython app.py- Environmental Data Analysis
- Machine Learning Classification
- AQI Prediction Systems
- GUI Development with Tkinter
- Data Preprocessing
- Feature Engineering
- Model Evaluation
- AI-Based Environmental Monitoring
- Real-Time AQI APIs
- Deep Learning Models
- Interactive Dashboard
- Geographical Heatmaps
- Cloud Deployment
- AQI Forecasting
- Mobile Application Integration
- Abdul Ahad
- Muhammad Wafa Abbas
- Muhammad Zaman
BS Computer Science
University of Engineering & Technology (UET), Lahore
This project is intended for educational, research, and portfolio purposes only.
The predictions generated by the system should not be considered official environmental or governmental air quality assessments.
This project is released for educational and portfolio use.