GithubHelp home page GithubHelp logo

singhsukhendra / air-quality-index-prediction-using-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vneogi199/air-quality-index-prediction-using-python

0.0 1.0 0.0 6.88 MB

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

Home Page: https://aqi-prediction.herokuapp.com/aqi-frontend

JavaScript 0.10% Python 0.07% CSS 0.01% HTML 69.68% Jupyter Notebook 30.14%

air-quality-index-prediction-using-python's Introduction

Air-Quality-Index-Prediction

Webapp to predict the Air Quality Index of a 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

Environment setup:

requirements.txt: needed only for deployment to Heroku (not needed for local) as there were issues with anaconda installation on it.
requirements-conda.txt: needed for local development as I used conda locally. Run: conda create --name <env_name> --file requirements-conda.txt

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

  1. Data Collection: (execute main-aqi.py)
    For this step, I have written a web scrapper that scraps en.tutiempo.net for climate data from 2013 to 2015 and creates a HTML file for each month.
  2. Data Preprocessing: (execute main-aqi.py)
    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: (execute main-aqi.py)
    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: (execute individual jupyter notebooks)
    Tried various algorithms, like Linear Regression, Lasso and Ridge Regression, Decision Tree Regressor, KNN Regressor, Random Forest Regressor, XGBoost Regressor.
    Random Forest and XGBoost gave best performance. Finally, used XGBoost to perform predictions.
  5. Model Deployment: (execute flask-app in project root, npm build in aqi-frontend folder and hit http://localhost:5000/aqi-frontend)
    Used React.js frontend to make API calls to Flask REST API backend.
    Finally deployed on Heroku platform.

You can enter various climate details or select one of the popular cities. Finally, click submit button and get your results for Air Quality Index.

Demo: https://aqi-prediction.herokuapp.com/aqi-frontend

Screenshot:

Screenshot

air-quality-index-prediction-using-python's People

Contributors

vneogi199 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.