Friday, March 29, 2024
No menu items!
HomeData Analytics and VisualizationPollution in India : Real-time AQI Data

Pollution in India : Real-time AQI Data

Air pollution has become a serious problem in recent years across the world. Effects of Air Pollution is devastating and its harmful effects are not just limited to Humans but also animals and plants as well. It also leads to global warming which is esentially increasing air and ocean temperatures around the world.

Indian cities have been topping the list of polluted cities. In order to solve the problem of air pollution the most important thing is to track air pollution on real-time basis first which alerts people to avoid outdoor activities during high air Pollution. This post explains how you can fetch real-time Air Quality Index (AQI) of Indian cities using Python and R code. It allows both Python and R programmers to pull pollution data.

You can download the dataset which contains static information about Indian states, cities and AQI stations. Variables stored in this dataset will be used further to fetch real-time data.

id stationID longitude
1 site_5331 Kariavattom, Thiruvananthapuram – Kerala PCB 76.88650
2 site_252 Plammoodu, Thiruvananthapuram – Kerala PCB 76.94359
3 site_5272 Kacheripady, Ernakulam – Kerala PCB 76.28134
4 site_5276 Thavakkara, Kannur – Kerala PCB 75.37320
5 site_5334 Polayathode, Kollam – Kerala PCB 76.60730
6 site_5271 Palayam, Kozhikode – Kerala PCB 75.78437
latitude live avg cityID stateID
1 8.563700 FALSE NA Thiruvananthapuram Kerala
2 8.514909 TRUE 20 Thiruvananthapuram Kerala
3 9.985653 TRUE 27 Ernakulam Kerala
4 11.875000 TRUE 56 Kannur Kerala
5 8.878700 TRUE 54 Kollam Kerala
6 11.249077 TRUE 70 Kozhikode Kerala

Step 1: Get API Key

First step is to log in to https://data.gov.in/ with Google/FB/Twitter/LinkedIn/Github profile. Once logged in, go to Dashboard > MyAccount. You will find API key there.

Incase you face any issue registering yourself and getting API key, you can use Sample API Key for experimentation purpose.See the Sample API key below. Sample API key has a limitation of 10 records it can fetch at a single run.

579b464db66ec23bdd000001cdd3946e44ce4aad7209ff7b23ac571b READ MORE »Read MoreListenData

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments