Skip to main content

AQI calculation library

Project description

AQI calculation library (python)

PyPI version pypi supported versions

The library calculates the following indexes:

  • AQI (US)
  • AQHI (Canada)
  • CAQI (Europe)
  • DAQI (UK)
  • AQI (Australia)
  • CAI (South Korea)
  • PSI (Singapore)
  • AQHI (Hong Kong)
  • AQI (Mainland China)
  • AQI (India)

Installation

From source:

git clone --recursive https://github.com/atmotube/aqipy.git
cd python
python setup.py install

From PyPI directly:

pip3 install aqipy-atmotech

Examples

calculate US AQI:

from aqipy import aqi_us

aqi, aqi_data = aqi_us.get_aqi(o3_8h=0.07853333, co_8h=5)
print('AQI:', aqi)
print('AQI O3:', aqi_data['o3_8h'][0])
print('Effects O3:', aqi_data['o3_8h'][1])
print('Cautions O3:', aqi_data['o3_8h'][2])
print('AQI CO:', aqi_data['co_8h'][0])
print('Effects CO:', aqi_data['co_8h'][1])
print('Cautions CO:', aqi_data['co_8h'][2])

output will be:

AQI: 126
AQI O3: 126
Effects O3: Increasing likelihood of respiratory symptoms and breathing discomfort in people with lung disease (such as asthma), children, older adults, people who are active outdoors (including outdoor workers), people with certain genetic variants, and people with diets limited in certain nutrients.
Cautions O3: People with lung disease (such as asthma), children, older adults, people who are active outdoors (including outdoor workers), people with certain genetic variants, and people with diets limited in certain nutrients should reduce prolonged or heavy outdoor exertion.
AQI CO: 56
Effects CO:
Cautions CO:

Units

Pollutant Units
CO ppm
O3 ppm
NO2 ppm
SO2 ppm
NH3 ppm
Pb ppm
PM2.5 μg/m3
PM10 μg/m3

Summary (averages)

Index PM2.5 PM10 O3 NO2 CO SO2 NH3 Pb
AQI (US) 24h 24h 8h/1h 1h 8h 1h - -
AQHI (Canada) 3h 3h 3h 3h - - - -
CAQI (Europe) 1h/24h 1h/24h max in 1h max in 1h 8h max in 1h - -
DAQI (UK) 24h 24h 8h 1h - 15m - -
AQI (Australia) 24h 24h 1h/4h 1h 8h 1h - -
CAI (South Korea) 24h 24h 1h 1h 1h 1h - -
PSI (Singapore) 24h 24h 8h 1h 8h 24h - -
AQHI (Hong Kong) 3h 3h 3h 3h 3h 3h - -
AQI (Mainland China) 24h 24h 1h/8h 24h 24h 24h - -
AQI (India) 24h 24h 8h 24h 8h 24h 24h 24h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aqipy-atmotech-0.1.5.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

aqipy_atmotech-0.1.5-py3-none-any.whl (25.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page