Skip to content

The project is designed to predict the Air Quality Index of a Mumbai region given climate conditions using a Machine Learning Algorithm. Implemented in an end-to-end manner using Flask framework and Heroku platform.

Notifications You must be signed in to change notification settings

khwajaavais/AirQualityIndex-Prediction

Repository files navigation

Air Quality Index (AQI) Prediction

Demo: https://air-quality-index-mumbai-predi.herokuapp.com/

Webapp to predict the Air Quality Index of Mumbai region given climate conditions.

Motivation for this project:
Krish Naik's Air Quality Index Prediction Project: https://www.youtube.com/watch?v=CTu0qnuMxgA.
Code: https://github.com/krishnaik06/AQI-Project

For this project, I have followed the whole lifecycle of a Data Science Project.

  1. Data Collection:
    For this step, I have written a web scrapper that scraps https://en.tutiempo.net/ for climate data from 2013 to 2018 and creates a HTML file for each month.

  2. Data Preprocessing:
    For this step, I have taken the data from Krish Naik's project as it was from a paid API.
    Reference: https://github.com/krishnaik06/AQI-Project/tree/master/Data/AQI.
    This data contained hourly measurements of AQI.
    This was converted into a dictionary format where the dictionary key is the year and values are the daily AQI values.
    Next, the data in step 1 was combined with data of this step to create a new CSV file.

  3. Data Cleaning:
    The CSV file created in step 2 was cleaned to remove null values and improper data. A new resultant CSV file was created.

  4. Feature Engineering and Model Creation:
    Tried various algorithms, like Linear Regression, Lasso and Ridge Regression, Decision Tree Regressor, Random Forest Regressor, XGBoost Regressor.
    Random Forest and XGBoost gave best performance. Finally, used Random Forest Regressor to perform predictions.
  5. (execute individual jupyter notebooks)

  6. Model Deployment: (execute flask-app in project root, run the app.py file and hit http://127.0.0.1:5000/)
    Used HTML-CSS frontend to make API calls to Flask REST API backend.
    Finally deployed on Heroku platform.

You can enter various climate details. Finally, click submit button and get your results for Air Quality Index.

**Demo: https://air-quality-index-mumbai-predi.herokuapp.com/**

Screenshot:

Screenshot

Screenshot

About

The project is designed to predict the Air Quality Index of a Mumbai region given climate conditions using a Machine Learning Algorithm. Implemented in an end-to-end manner using Flask framework and Heroku platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published