Package to import AURN air quality data from DEFRA UK AIR site
Project description
PyAURN -
This is a reworked fork of the robintw/PyAURN
utilising pyreadr instead of rpy2. This negates having a local installation of R, and therefore can remain a python only configuration.
This is a simple Python package to import data from the UK Automatic Urban Rural Network - an air pollution network run by the UK government.
This is a Python port of a couple of functions of the openair R package. This R package relies on data provided as a set of .RData files on the Defra website, specifically designed for use by the openair project. This Python package relies on the same data.
Getting started
Install the via pip:
pip install pyaurn
Run the two functions in the package as below:
from pyaurn import importAURN, importMetadata
# Download metadata of site IDs, names, locations etc
metadata = importMetadata()
# Download 4 years of data for the Marylebone Road site
# (MY1 is the site ID for this site)
# Note: range(2016, 2022) will produce a list of six years: 2016, 2017, 2018, 2019, 2020, and 2021. Alternatively define a list of years to use eg. [2016,2017,2018,2019,2020,2021]
data = importAURN("MY1", range(2016, 2022))
Future developments
- integrate other openair functions
- open to suggestions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyaurn-0.0.7.tar.gz
.
File metadata
- Download URL: pyaurn-0.0.7.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a966c6b1506f6e1a5a435f45267aaeef3399f6e5fdf1181175a42fbd15e888b |
|
MD5 | 4e383e44cdb446a25b0b14e133ce2f80 |
|
BLAKE2b-256 | 3cb07df3ee6d4208aff90ca62b492f6860701ed0a777a2e794d7b9c8cd09e19d |
File details
Details for the file pyaurn-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: pyaurn-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3139c37723ce7e603fd0240a5f4b66014dab9e6d47627c9e591ac9a9f579391a |
|
MD5 | d18f0f5fa4b9a37decdc01adc8b9b720 |
|
BLAKE2b-256 | 71c2e27afed26b14cf50e48534886643cda2f5642421b83088b0ea0468a030d9 |