-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Add AQI (Air Quality Index) #105
Comments
I already wanted to do it, but one threshold is an 8 hour rolling average of CO (irrc). Currently it is not easy to get data from different time ranges. I have to do some refactoring first. Thanks for the suggestion and the CLI utility! |
A value for AQI would be a really nice addition! +1 |
First draft on localhost... Wdyt? Based on https://www.eea.europa.eu/themes/air/air-quality-index Thresholds are explained after clicking "About the European Air Quality Index". The only annoyance is that the index range from 0 to 100 is not well defined in the specification and I had to "invent" it. It is similar however to the old common air quality index |
Looks promising! I agree that the info doesn't make it completely clear. My understanding from a quick read is that the following is key:
(though a subset of the "five" pollutants is used in different scenarios) So the index is not some sort of amalgamation/combination of all five (or subset of five) values but rather it's just based on the value for the worst one. Just thinking aloud, let's say the poorest level for a particular location is a value of 125 for O3, based on a scale of 0 to 800 (because "Air quality measurements that exceed the maximum values in the ‘extremely poor’ category are not taken into account for the index calculation, since these values are typically found to be erroneous"). So the Index would be 100 * 125 / 800 = 15.6? |
PR merged! Final version now contains European and U.S. AQI The tables now only show thresholds in ug/m3 or ppm. Each threshold is evaluated as a piecewise linear function as explained on wikipedia. So 125 ugm3 ozone would be in the range of 100-130 (moderate) and result in an index value of ~56 (index 40-60 is moderate). Both EU and US indices use different scales |
@patrick-zippenfenig great work! It would be nice to add the MEP index for China too... if I have a moment to try and figure out how you've done it for the others, I could attempt a PR... wouldn't completely trust myself though! |
The official website uses a scale from 1.00 to 6.00+. See API calls: I believe the app uses the same API to be able to render a progressive circle: |
It would be awesome if you could provide AQI information too. (or at least help me calculate it myself with the current information provided by the API)
The text was updated successfully, but these errors were encountered: