hrbonz / python-aqi

A library to convert between AQI value and pollutant concentration (µg/m³ or ppm)
BSD 3-Clause "New" or "Revised" License
60 stars 28 forks source link

Help converting these values? #18

Open wrybread opened 3 years ago

wrybread commented 3 years ago

I'm using a Davis AirLink to measure air quality. It's app (WeatherLink) currently reports an EPA AQI of 109, and highlights the values:

PM 1 = 22 PM 2.5 = 33 PM 10 = 42

Does anyone know how to use python-aqi to arrive at that AQI from those values?

It gives these values in addition:

"pm_1_last": 26, "pm_2p5_last": 38, "pm_10_last": 50, "pm_1": 22.43, "pm_2p5": 32.66, "pm_2p5_last_1_hour": 41.09, "pm_2p5_last_3_hours": 40.78, "pm_2p5_last_24_hours": 23.92, "pm_2p5_nowcast": 39.32, "pm_10": 41.51, "pm_10_last_1_hour": 54.23, "pm_10_last_3_hours": 53.45, "pm_10_last_24_hours": 34.04, "pm_10_nowcast": 52.01, "last_report_time": 1601246426, "pct_pm_data_last_1_hour": 100, "pct_pm_data_last_3_hours": 100, "pct_pm_data_nowcast": 100, "pct_pm_data_last_24_hours": 100

hrbonz commented 3 years ago

PM1 doesn't come into the AQI calculation so you could calculate intermediate AQIs for PM2.5 and PM10 and figure out which one is biggest. That will give you a partial AQI. Is the app reporting a complete AQI (6 pollutants taken into account) or partial?