go get github.com/ringsaturn/go-aqi
For usage see examples.
NOTE: Currently the algo impl is based on the different standard files and different AQI Standard use different units. Please ensure the input value has been converted to the algo expect unit.
CO | PM 2.5 | PM 10 | SO2 | NO2 | Ozone/O3 | |
---|---|---|---|---|---|---|
MEP(China)1 | μg/m3 | μg/m3 | μg/m3 | μg/m3 | μg/m3 | μg/m3 |
EPA(USA)2 | ppm | μg/m3 | μg/m3 | ppb | ppb | ppm |