AQI calculation library (python)
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 |
Release files for aqipy-atmotech 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aqipy-atmotech-0.1.5.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aqipy_atmotech-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.0 kB
Release files / aqipy-atmotech-0.1.5.tar.gz
| Download URL | aqipy-atmotech-0.1.5.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f81b05e127b5cd5a8fbb9e99bc69d322038f8b2403b5e5bcb9af6d274a3f55f
|
|
BLAKE2b-256 checksum How to use checksums |
6be7178342669eea5f68d01c637afbce53a52fc1b6535683788ecc3d492194c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / aqipy_atmotech-0.1.5-py3-none-any.whl
| Download URL | aqipy_atmotech-0.1.5-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89e9b9f1fc3d843268579ee6f7c34ebd9e414c445345e630b70cc5399c60a69f
|
|
BLAKE2b-256 checksum How to use checksums |
e895d737207e9cb18ae15370a891b2e5832967ed02568133d5403e441bfc0de7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|