Rishikesh Pillay
18 July 2021
In this Application I try to Plot the trend of AQI in Pune. And plot using Plotly and Base plotting system.
AQI transforms complex air quality data of various pollutants into a single index value which makes it easy to understand. Extent of air pollution and its severity can be mapped by calculating AQI for the respective air pollutants. Increase in AQI indicates increased air pollution and increased chances of threats associated with pollutants to human health.
Date SO2.µg.m3 Nox.µg.m3 RSPM.µg.m3 SPM CO2.µg.m3 AQI
1 2009-01-01 00:00:00 15 53 179 NA NA 153
2 2009-02-01 00:00:00 15 48 156 NA NA 137
3 2009-03-01 00:00:00 13 51 164 NA NA 143
4 2009-04-01 00:00:00 8 37 135 NA NA 123
5 2009-07-01 00:00:00 13 36 140 NA NA 127
6 2009-08-01 00:00:00 10 30 135 NA NA 123
Location
1 MPCB-KR
2 MPCB-KR
3 MPCB-KR
4 MPCB-KR
5 MPCB-KR
6 MPCB-KR
There are 8 Columns and 7844 observations from 11 different locations. This data is recorded between year 2009 to 2019 Problems in this data is there are two formats of date and it need to be cleaned . I cleaned that format also selected only AQI, Date, and Location columns for ploting as we don’t need other columns we drop it. You can whole cleaning code in github repo. While ploting I also changed Location variable in usable format using make.names function
X Date AQI Location
1 1 2009-01-01 153 MPCB-KR
2 2 2009-01-02 137 MPCB-KR
3 3 2009-01-03 143 MPCB-KR
4 4 2009-01-04 123 MPCB-KR
5 5 2009-01-07 127 MPCB-KR
6 6 2009-01-08 123 MPCB-KR
You can see there is sinusoidal trend in th data. Server in the app take input of radiobutton and fillter data for that sensor from whole data table. And then plot appropriately. Next we can look at decompose of this time series.
Use App for looking Data from different location in Pune. Above Plot’s code could be found in github repo