Name | riweather JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | Grab publicly available weather data |
upload_time | 2025-02-12 18:58:36 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
noaa
weather
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# riweather
[](https://github.com/ensley-nexant/riweather/actions?workflow=Tests)
[](https://codecov.io/gh/ensley-nexant/riweather)
[](https://github.com/ensley-nexant/riweather/actions/workflows/release.yml)
Grab publicly available weather data with `riweather`. [See the full documentation](https://ensley-nexant.github.io/riweather).
## 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.
```pycon
>>> import riweather
>>> station_rank = riweather.rank_stations(39.98, -105.13, max_distance_m=20000)
```
Select the top station (or a different station):
```pycon
>>> station = riweather.select_station(station_rank, rank=0)
```
View information about that station:
```pycon
>>> station.name, station.usaf_id
('ERIE MUNICIPAL AIRPORT', '720534')
```
And pull weather data from that station for a certain year.
```pycon
>>> 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]
```
Raw data
{
"_id": null,
"home_page": null,
"name": "riweather",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "noaa, weather",
"author": null,
"author_email": "John Ensley <jensley@resource-innovations.com>",
"download_url": "https://files.pythonhosted.org/packages/3f/78/ffe8e4b1a7ecb5a21d20d18289914dd057bb947f146004ea4cd9fd221346/riweather-1.0.0.tar.gz",
"platform": null,
"description": "# riweather\n\n[](https://github.com/ensley-nexant/riweather/actions?workflow=Tests)\n[](https://codecov.io/gh/ensley-nexant/riweather)\n[](https://github.com/ensley-nexant/riweather/actions/workflows/release.yml)\n\nGrab publicly available weather data with `riweather`. [See the full documentation](https://ensley-nexant.github.io/riweather).\n\n## Installation\n\nInstall with pip:\n\n```\npip install riweather\n```\n\nTo create interactive maps of weather station locations, install the package along with its optional dependencies:\n\n```\npip install riweather[plots]\n```\n\n## Usage\n\nGiven a latitude and longitude, get a list of weather stations sorted from nearest to farthest from that location.\n\n```pycon\n>>> import riweather\n>>> station_rank = riweather.rank_stations(39.98, -105.13, max_distance_m=20000)\n```\n\nSelect the top station (or a different station):\n\n```pycon\n>>> station = riweather.select_station(station_rank, rank=0)\n```\n\nView information about that station:\n\n```pycon\n>>> station.name, station.usaf_id\n('ERIE MUNICIPAL AIRPORT', '720534')\n```\n\nAnd pull weather data from that station for a certain year.\n\n```pycon\n>>> station.fetch_data(2024, \"air_temperature\", period=\"h\", temp_scale=\"F\", tz=\"US/Mountain\")\n air_temperature.temperature_f\n2023-12-31 18:00:00-07:00 33.176848\n2023-12-31 19:00:00-07:00 29.726000\n2023-12-31 20:00:00-07:00 25.415750\n2023-12-31 21:00:00-07:00 22.736750\n2023-12-31 22:00:00-07:00 20.876750\n... ...\n2024-12-31 13:00:00-07:00 34.328000\n2024-12-31 14:00:00-07:00 35.445500\n2024-12-31 15:00:00-07:00 35.640500\n2024-12-31 16:00:00-07:00 34.249250\n2024-12-31 17:00:00-07:00 31.057455\n[8784 rows x 1 columns]\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Grab publicly available weather data",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [
"noaa",
" weather"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2662e8a9c841041dcaf23aadbb16c084944e513236f4ab89505377adfbf5a15f",
"md5": "2f0ca36b8ac4009cd088536affff87eb",
"sha256": "1e0ef1c5e0fe94812a92829ff31d14ffbac4fb3da653c66b721851406a28982d"
},
"downloads": -1,
"filename": "riweather-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2f0ca36b8ac4009cd088536affff87eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 2371224,
"upload_time": "2025-02-12T18:58:34",
"upload_time_iso_8601": "2025-02-12T18:58:34.103716Z",
"url": "https://files.pythonhosted.org/packages/26/62/e8a9c841041dcaf23aadbb16c084944e513236f4ab89505377adfbf5a15f/riweather-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3f78ffe8e4b1a7ecb5a21d20d18289914dd057bb947f146004ea4cd9fd221346",
"md5": "fe4419433d249db9d2419eb4be8d5daa",
"sha256": "21efebaaf9bc65f4dc68dc3c4284663730c2326365a7af7c1bf2d2e35c9d7778"
},
"downloads": -1,
"filename": "riweather-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "fe4419433d249db9d2419eb4be8d5daa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 3842664,
"upload_time": "2025-02-12T18:58:36",
"upload_time_iso_8601": "2025-02-12T18:58:36.519337Z",
"url": "https://files.pythonhosted.org/packages/3f/78/ffe8e4b1a7ecb5a21d20d18289914dd057bb947f146004ea4cd9fd221346/riweather-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-12 18:58:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "riweather"
}