Pythonic interface to access data from meteorological stations
Project description
Meteora
Pythonic interface to access data from meteorological stations. Key features:
- easily stream data from multiple providers (e.g., Automated Surface/Weather Observing Systems (ASOS/AWOS), MetOffice...) into pandas data frames.
- user-friendly arguments to filter data by region, variables or date ranges.
- request caching with requests-cache to avoid re-downloading data and help bypassing API limits.
Overview
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 ASOSOneMinIEMClient
region = "Oregon"
variables = ["temperature", "pressure", "precipitation", "surface_wind_speed"]
start = "2021-08-13"
end = "2021-08-16"
client = ASOSOneMinIEMClient(region=region)
ts_df = client.get_ts_df(variables, start=start, end=end)
ts_df.head()
temperature | pressure | precipitation | surface_wind_speed | ||
---|---|---|---|---|---|
station | valid(UTC) | ||||
AST | 2021-08-13 00:00:00 | 68.0 | 29.942 | 0.0 | 10.0 |
2021-08-13 00:01:00 | 67.0 | 29.942 | 0.0 | 10.0 | |
2021-08-13 00:02:00 | 67.0 | 29.942 | 0.0 | 10.0 | |
2021-08-13 00:03:00 | 67.0 | 29.942 | 0.0 | 9.0 | |
2021-08-13 00:04:00 | 68.0 | 29.942 | 0.0 | 8.0 |
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)
See the user guide for more details about the features of Meteora as well as the list of supported providers.
Installation
Although Meteora is not available in conda-forge yet (hopefully will be soon), it can be installed using conda/mamba and pip as follows:
# install GDAL-based requirements
conda install -c conda-forge contextily geopandas osmnx
# install Meteora
pip install meteora
See also
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.
Acknowledgements
- 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).
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 meteora-0.1.1.tar.gz
.
File metadata
- Download URL: meteora-0.1.1.tar.gz
- Upload date:
- Size: 38.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cb9554b3fb3682bc1859310fdc3f1af347ddb5fdcc12d85e525cd3ef5f3adc4 |
|
MD5 | 8e61dec53984807d0a4a0759ff0f4f6d |
|
BLAKE2b-256 | 9c1c3a65608a643d917891b1695def46a760d1234e87a89e80808dc53aaed03d |
File details
Details for the file meteora-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: meteora-0.1.1-py3-none-any.whl
- Upload date:
- Size: 41.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a09b0eca3d8a471eda302d4ec6e6ff8e9454522730c58506f727e5c94c77d2aa |
|
MD5 | 277b3fc603891822c227a74eb1d8013e |
|
BLAKE2b-256 | 54d0bb4e2b7b05d29eedb49cff388f505e0e3e1ca37555d698cb9a0fb6a6a5da |