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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file aqipy-atmotech-0.1.5.tar.gz.

File metadata

  • Download URL: aqipy-atmotech-0.1.5.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for aqipy-atmotech-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2f81b05e127b5cd5a8fbb9e99bc69d322038f8b2403b5e5bcb9af6d274a3f55f
MD5 3bef069537e2275a679f47848d063c9d
BLAKE2b-256 6be7178342669eea5f68d01c637afbce53a52fc1b6535683788ecc3d492194c1

See more details on using hashes here.

File details

Details for the file aqipy_atmotech-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: aqipy_atmotech-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for aqipy_atmotech-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 89e9b9f1fc3d843268579ee6f7c34ebd9e414c445345e630b70cc5399c60a69f
MD5 d58b8ad30379a0853ec7e99c75e95bf6
BLAKE2b-256 e895d737207e9cb18ae15370a891b2e5832967ed02568133d5403e441bfc0de7

See more details on using hashes here.

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