openaq / community-wishlist

A repository to collect ideas for useful projects built with the OpenAQ API.
1 stars 2 forks source link

Open-source wrapper converting raw physical PM2.5 data into 'hourly' AQI using US EPA-like method #6

Open RocketD0g opened 6 years ago

RocketD0g commented 6 years ago

This issue provide specifications for building a US EPA-like* AQI Wrapper on top of the OpenAQ Platform for a single pollutant, such as PM2.5. This is also a community wish list item, which can be found here.

  1. Access hourly PM2.5 data (or create hourly data from sub-hourly measurements).

  2. Use the following equation for a given hourly value:

screen shot 2017-11-17 at 5 40 15 pm

Above is from Page 11 here.

  1. The breakpoints for the equation are: screen shot 2017-11-17 at 5 42 09 pm

Above is from Page 13 here.

  1. An example (with ozone): screen shot 2017-11-17 at 5 43 19 pm

  2. You can double check your work by using this simple calculator that converts back and forth from physical PM2.5 (in ug/m^3) to AQI.

*Important notes and caveats:

dolugen commented 6 years ago

Here's a python library I found that does AQI conversion: https://github.com/hrbonz/python-aqi The EPA document version is from 2013 though, not sure how outdated it is.

thegrxp commented 6 years ago

Here is a Kotlin (100% interoperable with Java) library and CLI I work on, still WIP > https://github.com/thegrxp/Aqi-Kotlin

amaury1093 commented 4 years ago

And here's a TypeScript library that does the conversion: https://github.com/shootismoke/common/tree/master/packages/convert 🚀

RocketD0g commented 4 years ago

Thanks for sharing this, @amaurymartiny!