I live in Ulaanbaatar, Mongolia, land of the eternal blue sky where Chinggis Khan used to roam. Except during winter, the blue sky turns to dense pollution over the city that is some of the worst in the world (regularly hits top ten most polluted cities). This pollution is caused by the burning of coal for heat and cooking in the areas surrounding the center of the city that don’t have the same infrastructure services.
The government in May this year decided to ban the burning of raw coal in the city in lieu of “enhanced” coal fuel. They claim this will significantly reduce air pollution. There are many air quality apps out there, but I wanted to make something that could answer one of the most important questions facing the city this year. Is this coal ban working? So I built https://agaar.mongol.ai to compare AQI for various stations around the city to help people discover and answer this question for themselves.
Features (all views have a station and pollutant selector):
- Yearly view to get an overview. It also highlights AQI after the coal ban.
- Monthly view that shows AQI ranges and also temperature ranges for two months.
- Daily view that shows a selected day compared to days that are identified as having similar weather (using a cosine similarity function)
Anvil was used as a front end for this data. Data collection, processing, and cleaning happens on a separate server using a combination of Apache Airflow and Jupyter Notebooks run via Papermill. The data is loaded into a database and pulled by the Anvil app.
The biggest challenge for this project was related to the ETL pipeline for the data. Anvil made the front end development very easy. Even making it available in two languages wasn’t as hard as I expected. A big thank you to the community who are always helpful!