sojeri / howsTheWeatherSeattle

Seattle, how's the weather right now?
https://sojeri.github.io/howsTheWeatherSeattle
2 stars 0 forks source link

AQI calculation #49

Open sojeri opened 3 months ago

sojeri commented 3 months ago

instead of trusting AQI category value 1-5 from the API, calculate the US AQI standard and display that.

the first hard part is going to be understanding the formula, because there is no I or C in the data. what you mean??? 😆😅

https://openweathermap.org/api/air-pollution https://openweathermap.org/air-pollution-index-levels

For pollutants concentration recalculation into AQI equation and table below is used:

computingaqi

where: I = the Air Quality index, C = the pollutant concentration, Clow= the concentration breakpoint that is ≤C, Chigh= the concentration breakpoint that is ≥C, Ilow= the index breakpoint corresponding to Clow, Ihigh= the index breakpoint corresponding to Chigh.