https://github.com/urbanmorph/oaq
Unofficial mirror of oaq.notf.in — India air quality leaderboard
https://github.com/urbanmorph/oaq
Last synced: 14 days ago
JSON representation
Unofficial mirror of oaq.notf.in — India air quality leaderboard
- Host: GitHub
- URL: https://github.com/urbanmorph/oaq
- Owner: urbanmorph
- License: mit
- Created: 2026-04-08T02:52:33.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-08T04:46:20.000Z (3 months ago)
- Last Synced: 2026-04-08T05:21:59.775Z (3 months ago)
- Language: TypeScript
- Size: 105 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# oaq
**Unofficial mirror of [oaq.notf.in](https://oaq.notf.in)** — a zero-JS, single-page leaderboard of live air quality across India. 3,000+ stations ranked worst-to-best, updated hourly, fully indexable by search engines and AI agents.
> This project is not affiliated with OAQ or any data provider. It exists to make the same open data faster to load, easier to search, and legible to LLMs.
## What this is
- One HTML page. Worst 50, Best 50, every city's stations as collapsible sections.
- ~50 KB brotli total, including CSS and JS. Works fully without JavaScript beyond a tiny filter.
- Every station has HTML, JSON, and Markdown variants for humans, APIs, and LLM agents.
- **Estimated health impact** on every station — years of life expectancy lost if the current
PM2.5 level persisted annually, via the
[Air Quality Life Index](https://aqli.epic.uchicago.edu/about/the-index/) formula
(Greenstone et al., U Chicago EPIC; Ebenstein et al. 2017 PNAS).
- Hosted on Cloudflare Pages + Workers + R2. Free tier. Live at
**[oaq.pages.dev](https://oaq.pages.dev)**.
## What this isn't
- A map. No tiles, no markers.
- A data source. Data comes from [oaq.notf.in](https://oaq.notf.in), which in turn aggregates from CPCB, Airnet (CSTEP), and Aurassure.
- A framework showcase. The site is plain HTML generated by a 200-line TypeScript build script.
## Architecture
```
Cloudflare Worker (cron, hourly)
├─ handshake OAQ broker → signature (cached in KV)
├─ fetch 3 provider bulk endpoints
├─ merge + sort + compute AQI
└─ write latest.json to R2
build.ts (triggered by worker deploy hook)
├─ read latest.json from R2
├─ render home.html, station pages, docs
└─ publish to Cloudflare Pages
Cloudflare Pages (static)
└─ serves everything, brotli, global edge
```
## Acknowledgements
- **Data** — [oaq.notf.in](https://oaq.notf.in), the Open Air Quality data broker.
- **Upstream sources** — CPCB (State & Central Pollution Control Board, Government of India), Airnet ([CSTEP](https://cstep.in)), Aurassure (University Clean Air Network).
- **UI** — [Oat](https://oat.ink) ([github.com/knadh/oat](https://github.com/knadh/oat)) by Kailash Nadh — semantic HTML, ~8 KB CSS + JS, zero dependencies.
- **Health impact methodology** — [Air Quality Life Index](https://aqli.epic.uchicago.edu/) (AQLI), University of Chicago Energy Policy Institute. Based on:
- Ebenstein A., Fan M., Greenstone M., He G., Zhou M. (2017). *New evidence on the impact of sustained exposure to air pollution on life expectancy from China's Huai River Policy*. **PNAS** 114(39): 10384–10389. [doi:10.1073/pnas.1616784114](https://doi.org/10.1073/pnas.1616784114)
- Chen Y., Ebenstein A., Greenstone M., Li H. (2013). **PNAS** 110(32): 12936–12941. [doi:10.1073/pnas.1300018110](https://doi.org/10.1073/pnas.1300018110)
- WHO 2021 Global Air Quality Guidelines (5 µg/m³ annual PM2.5 baseline).
## License
MIT. See [LICENSE](./LICENSE).
Data is not relicensed by this project; attribution and license terms of the upstream sources apply.