~anika / projects / khulna-aqi
Khulna air, every hour
I'm Anika, a civil engineering student in Khulna. The nearest public air monitor publishes readings on a web page nobody checks. This project copies them every hour, keeps the history, and draws a chart people can actually read.
How it works
- cron runs a Python script at five past every hour on mukto.net.
- It fetches the station's page, pulls out PM2.5, PM10 and the timestamp, and appends a row to a CSV.
- A second script turns the last 30 days into a small SVG chart in my
public_html. - If the station is offline, the row says so instead of guessing.
5 * * * * cd ~/khulna-aqi && ./venv/bin/python fetch.py && ./venv/bin/python chart.pyWhy bother
Brick kilns around the city fire up in winter and the air gets bad fast. Having the history in one place makes it easy to show that to my department, or to anyone writing about it.
Use it
The script and the CSV format are in anika/khulna-aqi, MIT licensed. Adapting it to another city's station takes about 20 lines. If you do, tell me and I'll link yours here.