Skip to main content

Pythonic interface to access data from meteorological stations

Project description

PyPI version fury.io Conda Version Documentation Status tests pre-commit.ci status codecov GitHub license Binder

Meteora

Pythonic interface to access observations from meteorological stations. Key features:

Overview

Meteora provides a set of provider-specific clients to get observations from meteorological stations. For instance, it can be used to stream data from the Global Historical Climatology Network hourly (GHCNh) into a pandas data frame:

from meteora.clients import GHCNHourlyClient

region = "Canton de Vaud, Switzerland"
variables = ["temperature", "precipitation", "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 | 925.68 ms
station_id time temperature precipitation wind_speed
SZI0000LSMP 2021-12-11 00:20:00 2.0 NaN 4.6
2021-12-11 00:50:00 2.0 NaN 5.1
2021-12-11 01:20:00 2.0 NaN 4.6
2021-12-11 01:50:00 2.0 NaN 3.6
2021-12-11 02:20:00 2.0 NaN 4.6

We can also get the station locations using the stations_gdf property:

import contextily as cx

ax = client.stations_gdf.assign(
    T_mean=ts_df.groupby("station_id")["temperature"].mean()
).plot(
    "T_mean",
    cmap="winter",
    legend=True,
    legend_kwds={"label": "$\overline{T} \; [\circ C]$", "shrink": 0.5},
)
cx.add_basemap(ax, crs=client.stations_gdf.crs, attribution=False)

vaud-stations-t-mean

(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.

Installation

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meteora-0.14.0.tar.gz (60.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meteora-0.14.0-py3-none-any.whl (74.4 kB view details)

Uploaded Python 3

File details

Details for the file meteora-0.14.0.tar.gz.

File metadata

  • Download URL: meteora-0.14.0.tar.gz
  • Upload date:
  • Size: 60.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for meteora-0.14.0.tar.gz
Algorithm Hash digest
SHA256 e694eff483c44b703e36e1e050878cfa01372679fe691c85376b8a1be36c69a2
MD5 0850aab3f8056e590037d5310f6537b3
BLAKE2b-256 6db5a43bd79b8028393b4ff1fd3ed2cc45aab0509769fbd0d8e97dc41b1de654

See more details on using hashes here.

File details

Details for the file meteora-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: meteora-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 74.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for meteora-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7949853eb2054f8fe114461e6da4b57baebca2cb59dd74db8ce93c22c7a9d815
MD5 32c9310cb160d2fa76fd35ca42a2a100
BLAKE2b-256 fdb1d440f691d20edbfde2a25bb056ab3cfa89ae0375a18150fc55fa0bb88b83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page