top of page

Air Quality Prediction Using Machine Learning

Apr 24, 2025
2 min read

Updated: May 11, 2025


Air Quality Prediction
Air Quality Prediction

As environmental concerns continue to grow, air pollution has become one of the biggest threats to public health. The need for intelligent, fast, and user-friendly solutions to monitor and predict air quality has never been greater. In our final year project, we developed a web-based system to predict air quality using Machine Learning, specifically the Random Forest algorithm, and deployed the model using Streamlit, a popular Python framework for creating interactive web apps.


Why Air Quality Prediction Matters


Air quality directly impacts our health, especially for individuals with asthma, allergies, or respiratory conditions. Traditional systems for monitoring air quality are often expensive and limited in accessibility. Our goal was to build a simple, affordable, and effective solution for Air Quality Prediction that helps users understand future air quality trends using historical data, without the need for complex sensors or hardware.


How We Built It


We started with a publicly available CSV dataset containing air pollution indicators like PM2.5, PM10, NO2, CO, O3, and SO2 levels. The dataset also included temperature and humidity values, which play a significant role in air quality fluctuation.

Our approach involved:


  • Cleaning and preprocessing the CSV data using Pandas.

  • Training a Random Forest Regression model using Scikit-learn to predict the Air Quality Index (AQI).

  • Testing the model’s accuracy and fine-tuning the parameters to improve results.


The Random Forest algorithm was chosen for its robustness and ability to handle non-linear relationships in data. It also performs well with missing or noisy data, making it ideal for environmental datasets.


Interactive Web App with Streamlit


To make our model accessible and easy to use, we built a Streamlit-based interface where users can:


  • Upload a CSV file with pollution readings.

  • View real-time predictions of AQI based on the uploaded data.

  • See dynamic visualizations and graphs to understand trends and patterns.


Streamlit allowed us to create an engaging, professional-looking web application with very minimal code. The UI is lightweight, fast, and responsive.


What’s Next


In the future, we plan to:

  • Add a real-time alert system that notifies users if AQI crosses safe levels.

  • Provide health recommendations based on predicted AQI levels.


Project Includes:


PPT

Synopsis

Report

Project Source Code

Base Research Paper

Video Tutorials


Contact us for the Project files, Development, IT Services & Consultancy

1 Comment


RioPrice
Sep 14

It's great to see a final-year project that turns a raw pollution CSV into an interactive AQI dashboard with Streamlit. The way you explained Random Forest's strengths for noisy environmental data makes the model choice convincing. For more on how similar projects handle feature engineering, I found some interesting notes at https://casinobankidfritt.com.

Like
Post: Blog2 Post
bottom of page