Pythonic interface to access observations from meteorological stations. Key features:
- easily stream meteorological observations from multiple providers, from global (e.g., Global Historical Climatology Network hourly (GHCNh)) and regional (e.g., MetOffice) networks to citizen weather stations (e.g., Netatmo) into pandas data frames.
- user-friendly arguments to filter data by region, variables or date ranges.
- request and download caching with requests-cache and pooch to avoid re-downloading data and help bypassing API limits.
Meteora provides a set of provider-specific clients to get observations from meteorological stations. For instance, it can be used to stream the one-minute ASOS data from the Iowa Environmental Mesonet into a pandas data frame:
from meteora.clients import GHCNHourlyClient
region = "Davos, Switzerland"
variables = ["temperature", "precipitation", "surface_wind_speed"]
start = "12-11-2021"
end = "12-12-2021"
client = GHCNHourlyClient(region)
ts_df = client.get_ts_df(variables, start, end)
ts_df.head()
[########################################] | 100% Completed | 16.94 s
temperature | precipitation | surface_wind_speed | ||
---|---|---|---|---|
Station_ID | time | |||
SZM00006784 | 2021-12-11 00:00:00 | -4.7 | 0.0 | 5.1 |
2021-12-11 01:00:00 | -4.8 | 0.0 | 5.1 | |
2021-12-11 02:00:00 | -4.8 | 0.0 | 3.6 | |
2021-12-11 03:00:00 | -4.8 | 0.0 | 3.6 | |
2021-12-11 04:00:00 | -4.7 | 0.0 | 3.1 |
We can also get the station locations using the stations_gdf
property:
import contextily as cx
ax = client.stations_gdf.plot()
cx.add_basemap(ax, crs=client.stations_gdf.crs, attribution=False)
(C) OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France
See the user guide for more details about the features of Meteora as well as the list of supported providers.
The easiest way to install Meteora is with conda/mamba:
conda install -c conda-forge meteora
Alternatively, if geopandas dependencies are installed correctly, you can install Meteora using pip:
pip install meteora
Meteora intends to provide a unified way to access data from meteorological stations from multiple providers. The following libraries provide access to data from a specific provider:
Eventually these packages will be fully integrated into Meteora.
- The logging system is based on code from gboeing/osmnx.
- This package was created with the martibosch/cookiecutter-geopy-package project template.
- With the support of the École Polytechnique Fédérale de Lausanne (EPFL).