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.12.0.tar.gz (59.0 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.12.0-py3-none-any.whl (74.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meteora-0.12.0.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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.12.0.tar.gz
Algorithm Hash digest
SHA256 52868ed686ebba4493cf20b7c8babb70c954401895a48da5dd6fd83fdcf97679
MD5 5b21d243c470f7881bfe2942b7c18658
BLAKE2b-256 0dd8cd63446e2e459cba88a5913c42599a623f98d30227556a64fb1c445f7a92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meteora-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 74.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2bc0ba172846f214827bbcec684752e4801f32bdba214cdf782783b3f8efbbe
MD5 a948a5f26e0a03770ca20c7d00ab75da
BLAKE2b-256 3f253aa05c266137b748f21b0b9bf2bd5da7e271c098097db079c2b05a8b234f

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