India AQI(Air Quality Index)¶
Dhuan¶
Dhuan is smoke in Hindi language. I started collecting the AQI data form Indian Government data site which provides the air quality data from variuos collection points from cities in India. The data is supposed to be hourly but I see that the updated data is only available once in every 3 hours. The data is collected via a python script that runs every 3 hours and stores the data into a pgsql database. I then use Grafana to filter the data based on the user input of state/city/collection point.
The URL is dhuan
You can check the data of pollutants like NO2, SO2, CO, CO2, PM2.5 and PM10. Select the State followed by the City and then the Station to see the stats of the pollutants.
To adjust the time range, please select the time window from the top right corner of the page and select the required time window.
Limitations¶
The current setup is running on a Digital ocean droplet that is very small (1cpu core and 1gb of ram). I have hosted Grafana, a pgsql database and the scripts that are pulling the data from the APIs on the same node. In order to protect the instance, I am running it behind cloudflare with settings like firewall that resticts the number of concurrent requests from an IP, captcha challenges etc enabled. To overcome this I would want to deploy the setup on an dedicated frondend framework and update the graphs to include the moving averages and comparisions to the AQI levels set in place by the WHO
Future scope¶
The couple of changes I am working on:
Move away from grafana to a frontend framework managed application.
Deploy the app on Cloudflare pages.