Code Monkey home page Code Monkey logo

air-quality-index's Introduction

Air Quality Prediction of Delhi

Python 3.6

Link : https://air-quality-predictor.herokuapp.com/

Table of Content

Demo

Motivation

Many website available on the internet does not predict the future air quality index given current date AQI the aim of the app is to predict AQI of locality based on certain factors. Air pollution can cause both short term and long term effects on health and many people are concerned about pollution in the air that they breathe.

Data Collection

I couldn't find any relevant dataset for this purpose so I decided to scrape the climate data from this website using Selenium and Beautiful Soup which were really helpful. You can find the code for scraping here and to combine all data here.

EDA and Feature Engg

png

  • From the pie chart it is clear that all most 50% of air pollutant is from PM2.5(Particulate Matter) more info can be found out here. So the dependent feature was consider as PM2.5 .
  • Valuable insights such as air quality deterioration during Winter seasons and how much effective was odd even formula by Delhi Government can be found out with the help of charts in this folder.

png

  • With the help of correlation matrix & ExtraTreesRegressor algorithm important and correlated features were able to identify.
  • As in the pie chart SLP(Atmospheric pressure at sea level) is the most important feature for air quality index.

Model Building

Sr no. Algorithm RMSE
1 Linear Regression 56.79
2 Decision Tree 56.31
3 Random Forest 41.53
4 XGBoost 36.70

The Jupyter Notebooks of Algorithms can be found out here

Deployment

  • The app was deployed in heroku which is Platform as a Service(PaaS).

  • Set the environment variable on Heroku as mentioned in STEP 1 in the Run section. [Reference]

  • Our next step would be to follow the instruction given on Heroku Documentation to deploy a web app.

Directory Tree

├── models 
│   ├── DecisisionTreeRegressor.ipynb
│   ├── LinearRegression.ipynb
│   ├── RandomForestRegressor.ipynb
│   └── Xg_Boost.ipynb
├── readme_resources
├── static
│   ├── style.css
│   ├── logos    
├── templates
│   ├── index.html
│   ├── result.html   
├── weights 
│   ├── DecisisionTreeRegressor.pkl
│   ├── LinearRegression.pkl
│   ├── RandomForestRegressor.pkl
│   └── Xg_Boost.pkl
├── LICENSE
├── Procfile
├── README.md
├── app.py
├── requirements.txt

Technologies Used

To Do

  • Add more cities like Mumbai,Pune and Bengaluru where Air Pollution is a taboo.
  • Add a vizualization chart to display the predictions.
  • Convert the app to run without any internet connection, i.e. PWA.

License

Apache license

Copyright 2020 Nakul Amate

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

air-quality-index's People

Contributors

nakul1010 avatar

Watchers

 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.