Skip to main content

riweather

Tests Codecov Release

Grab publicly available weather data with riweather. See the full documentation.

Installation

Install with pip:

pip install riweather

To create interactive maps of weather station locations, install the package along with its optional dependencies:

pip install riweather[plots]

Usage

Given a latitude and longitude, get a list of weather stations sorted from nearest to farthest from that location.

>>> import riweather
>>> station_rank = riweather.rank_stations(39.98, -105.13, max_distance_m=20000)

Select the top station (or a different station):

>>> station = riweather.select_station(station_rank, rank=0)

View information about that station:

>>> station.name, station.usaf_id
('ERIE MUNICIPAL AIRPORT', '720534')

And pull weather data from that station for a certain year.

>>> station.fetch_data(2024, "air_temperature", period="h", temp_scale="F", tz="US/Mountain")
                           air_temperature.temperature_f
2023-12-31 18:00:00-07:00                      33.176848
2023-12-31 19:00:00-07:00                      29.726000
2023-12-31 20:00:00-07:00                      25.415750
2023-12-31 21:00:00-07:00                      22.736750
2023-12-31 22:00:00-07:00                      20.876750
...                                                  ...
2024-12-31 13:00:00-07:00                      34.328000
2024-12-31 14:00:00-07:00                      35.445500
2024-12-31 15:00:00-07:00                      35.640500
2024-12-31 16:00:00-07:00                      34.249250
2024-12-31 17:00:00-07:00                      31.057455
[8784 rows x 1 columns]

Release files for riweather 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for riweather 1.0.2
File Size Uploaded
riweather-1.0.2.tar.gz 3.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for riweather 1.0.2
File Interpreter ABI Platform
riweather-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 MB

Release files / riweather-1.0.2.tar.gz

Download URL riweather-1.0.2.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
dff3dfaa2dda660d644e44324e04eab97cc320e9f67dc46620bf4adfabdc730d
BLAKE2b-256 checksum
How to use checksums
13bf2212f41c062e5ae3084c1c867e40fbf3898962797ed7349312978b1d00ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2025.

Transparency log

Release files / riweather-1.0.2-py3-none-any.whl

Download URL riweather-1.0.2-py3-none-any.whl
Size 2.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
83454bd23742c0e73383f51b6feed52ed8a4b9251a15db53254b6465bb310b0f
BLAKE2b-256 checksum
How to use checksums
92538786ce6bc2b5cb0b464bedf05312c039a0b834f41ee5d4a67d3f9f56f4c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page