Coder Social home page Coder Social logo

Comments (7)

patrick-zippenfenig avatar patrick-zippenfenig commented on May 18, 2024 2

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!

from open-meteo.

drmrbrewer avatar drmrbrewer commented on May 18, 2024

A value for AQI would be a really nice addition! +1

from open-meteo.

patrick-zippenfenig avatar patrick-zippenfenig commented on May 18, 2024

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

Screenshot 2022-12-06 at 10 26 46

Screenshot 2022-12-06 at 10 26 57

from open-meteo.

drmrbrewer avatar drmrbrewer commented on May 18, 2024

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:

The index corresponds to the poorest level for any of five pollutants, according to the table shown below.

(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?

from open-meteo.

patrick-zippenfenig avatar patrick-zippenfenig commented on May 18, 2024

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

Screenshot 2022-12-09 at 15 33 04

Screenshot 2022-12-09 at 15 33 18

from open-meteo.

drmrbrewer avatar drmrbrewer commented on May 18, 2024

@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!

from open-meteo.

papjul avatar papjul commented on May 18, 2024

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

The official website uses a scale from 1.00 to 6.00+. See API calls:
image

I believe the app uses the same API to be able to render a progressive circle:
image

from open-meteo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.