从英国和欧洲站点导入空气质量数据的包。与R包'openair'的功能相似。
项目描述
PyAURN - 
这是openair R包功能的Python版本。openair R包依赖于Defra网站上提供的一组.RData文件数据,专门为openair项目设计。这个Python包依赖于相同的数据,但是使用pyreadr包将其导入到Python友好的pandas dataframe中,而无需使用R。
入门
通过pip安装
pip安装pyaurn
以下为包中的示例快速入门函数
from pyaurn import importAURN, importMeta, timeAverage
# Download metadata of site IDs, names, locations etc
metadata = importMeta()
# 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))
# Group the DataFrame by a frequency of monthly, and the statistic mean().
data_monthly = timeAverage(data,avg_time="month",statistic="mean")
当前功能
包中目前提供以下功能
- importMeta - 下载指定数据源不同数据集的元信息。
- importAURN - 导入指定站点和年份的AURN数据。
- importUKAQ - 导入指定站点、年份和数据源在英国空气质量数据。
- importEurope - 导入指定站点和年份的欧洲空气质量数据 - WIP(最终数据帧格式需要扩展以清理污染物)
- 时间平均值 - 将数据按指定频率和统计方法进行时间平均。
- 风向玫瑰图 - 为指定地点和年份绘制风向玫瑰图。
未来开发
- 集成其他开放空气功能
- 欢迎提出建议(请在问题中留下改进标签)
项目详情
下载文件
下载适用于您平台的文件。如果您不确定该选择哪个,请了解更多关于安装包的信息。
源代码分发
pyaurn-0.1.21.tar.gz (6.1 kB 查看哈希值)
构建分发
pyaurn-0.1.21-py3-none-any.whl (6.5 kB 查看哈希值)