usdata 0.22.0__tar.gz → 0.23.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {usdata-0.22.0 → usdata-0.23.0}/PKG-INFO +21 -2
- {usdata-0.22.0 → usdata-0.23.0}/README.md +20 -1
- {usdata-0.22.0 → usdata-0.23.0}/pyproject.toml +1 -1
- {usdata-0.22.0 → usdata-0.23.0}/pyproject.toml.orig +1 -1
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/data/registry.yaml +11 -7
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/normals.py +7 -4
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/__main__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_fetch.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_files.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_grib.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_hurdat2.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_netcdf.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_progress.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/_radar.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cache.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cache_ops.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cite.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/app.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/cache.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/cite.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/doctor.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/inspect.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/cli/progress.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/data/nexrad_sites.csv +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/data/places.csv +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/data/places.sources.json +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/doctor.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/inspect.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/manifest.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/mirror.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/models.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/protocols/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/protocols/erddap.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/protocols/http.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/protocols/listing.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/protocols/s3.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/provenance.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/base.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/fema/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/fema/declarations.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/http.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/coastwatch.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/coops.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/gfs.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/ghcnd.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/glm.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/goes.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/grib_index.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/gsom.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/gsoy.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/hrrr.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/hurdat2.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/ibtracs.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/lcd.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/mrms.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/nbm.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/nexrad.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/nexrad_level3.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/nws_vtec.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/rap.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/sites.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/spc.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/noaa/storm_events.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/params.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/usgs/__init__.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/usgs/daily.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/providers/usgs/earthquakes.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/pull.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/py.typed +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/query.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/readers.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/registry.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/selection.py +0 -0
- {usdata-0.22.0 → usdata-0.23.0}/src/usdata/testing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: usdata
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: Unified Python SDK and CLI for discovering, fetching, and tracking provenance of U.S. public scientific data
|
|
5
5
|
Keywords: noaa,usgs,open-data,scientific-data,provenance,reproducible-research,weather,climate,meteorology
|
|
6
6
|
Author: Jake Van Slyke
|
|
@@ -66,10 +66,29 @@ for pinning inputs across sources and proving later that they have not changed.
|
|
|
66
66
|
pip install "usdata[pandas]"
|
|
67
67
|
usdata search precipitation --location Oklahoma
|
|
68
68
|
usdata fetch noaa:ghcn-daily -p stations=USW00013967 --start 2024-05-06 --end 2024-05-07
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Save the same station query as `dataset.yaml` in your working directory:
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
name: first-station
|
|
75
|
+
sources:
|
|
76
|
+
- dataset: noaa:ghcn-daily
|
|
77
|
+
start: 2024-05-06
|
|
78
|
+
end: 2024-05-07
|
|
79
|
+
params:
|
|
80
|
+
stations: USW00013967
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then fetch and pin its inputs, and print their citation:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
69
86
|
usdata pull dataset.yaml && usdata cite dataset.yaml
|
|
70
87
|
```
|
|
71
88
|
|
|
72
|
-
The
|
|
89
|
+
The first pull writes `dataset.lock.json`; later pulls restore its pinned assets.
|
|
90
|
+
|
|
91
|
+
From Python, using the same `dataset.yaml`:
|
|
73
92
|
|
|
74
93
|
```python
|
|
75
94
|
from usdata import build_query, fetch, get, pull
|
|
@@ -21,10 +21,29 @@ for pinning inputs across sources and proving later that they have not changed.
|
|
|
21
21
|
pip install "usdata[pandas]"
|
|
22
22
|
usdata search precipitation --location Oklahoma
|
|
23
23
|
usdata fetch noaa:ghcn-daily -p stations=USW00013967 --start 2024-05-06 --end 2024-05-07
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Save the same station query as `dataset.yaml` in your working directory:
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
name: first-station
|
|
30
|
+
sources:
|
|
31
|
+
- dataset: noaa:ghcn-daily
|
|
32
|
+
start: 2024-05-06
|
|
33
|
+
end: 2024-05-07
|
|
34
|
+
params:
|
|
35
|
+
stations: USW00013967
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then fetch and pin its inputs, and print their citation:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
24
41
|
usdata pull dataset.yaml && usdata cite dataset.yaml
|
|
25
42
|
```
|
|
26
43
|
|
|
27
|
-
The
|
|
44
|
+
The first pull writes `dataset.lock.json`; later pulls restore its pinned assets.
|
|
45
|
+
|
|
46
|
+
From Python, using the same `dataset.yaml`:
|
|
28
47
|
|
|
29
48
|
```python
|
|
30
49
|
from usdata import build_query, fetch, get, pull
|
|
@@ -731,14 +731,15 @@ datasets:
|
|
|
731
731
|
since: "0.11"
|
|
732
732
|
title: U.S. Climate Normals 1991-2020
|
|
733
733
|
description: >-
|
|
734
|
-
|
|
735
|
-
Service datasets normals-daily-1991-2020, normals-monthly-1991-2020,
|
|
736
|
-
normals-annualseasonal-1991-2020, chosen with a period parameter. Dates are optional;
|
|
737
|
-
daily and monthly normals accept a month-day window inside a placeholder year.
|
|
734
|
+
Hourly, daily, monthly, and annual/seasonal 30-year station normals via the NCEI Access Data
|
|
735
|
+
Service datasets normals-hourly-1991-2020, normals-daily-1991-2020, normals-monthly-1991-2020,
|
|
736
|
+
and normals-annualseasonal-1991-2020, chosen with a period parameter. Dates are optional;
|
|
737
|
+
hourly, daily, and monthly normals accept a month-day window inside a placeholder year.
|
|
738
|
+
Hourly labels use local standard time, with no February 29 values. Explicit
|
|
738
739
|
stations or station discovery through the companion search service. Variables are NCEI
|
|
739
740
|
data-type codes and the catalog lists the probed ones; the delivered set is the open NCEI
|
|
740
741
|
normals list.
|
|
741
|
-
keywords: [climate, normals, averages, stations, temperature, precipitation, ncei]
|
|
742
|
+
keywords: [climate, normals, averages, stations, temperature, precipitation, hourly, ncei]
|
|
742
743
|
protocol: http
|
|
743
744
|
homepage: https://www.ncei.noaa.gov/products/land-based-station/us-climate-normals
|
|
744
745
|
license: US Government Work (public domain)
|
|
@@ -747,17 +748,18 @@ datasets:
|
|
|
747
748
|
capabilities: { spatial_subset: false, temporal_subset: true, variable_subset: true }
|
|
748
749
|
summary: 30-year station climate normals
|
|
749
750
|
formats: [CSV]
|
|
750
|
-
selection:
|
|
751
|
+
selection: Hourly, daily, monthly, or annual/seasonal normals per station; optional month-day window except annual/seasonal; hourly returns whole days
|
|
751
752
|
inputs: Station IDs or a geographic query; dates optional
|
|
752
753
|
reader: pandas
|
|
753
754
|
guide: docs/providers/noaa-normals.md
|
|
754
755
|
examples:
|
|
755
756
|
- examples/climate-normals/README.md
|
|
756
757
|
- examples/climate-anomalies/example.ipynb
|
|
758
|
+
- examples/hourly-anomalies/example.ipynb
|
|
757
759
|
resolution:
|
|
758
760
|
spatial: "U.S. land surface stations with 1991-2020 normals coverage"
|
|
759
761
|
temporal: >-
|
|
760
|
-
|
|
762
|
+
Hourly, daily, monthly, or annual and seasonal normals, chosen with the period parameter
|
|
761
763
|
update_frequency: "As needed; the normals are republished about once a decade"
|
|
762
764
|
citation: >-
|
|
763
765
|
Palecki, Michael; Durre, Imke; Applequist, Scott; Arguez, Anthony; Lawrimore, Jay (2021).
|
|
@@ -765,6 +767,7 @@ datasets:
|
|
|
765
767
|
Information; cite the record for the period used
|
|
766
768
|
terms: https://www.ncei.noaa.gov/products/land-based-station/us-climate-normals
|
|
767
769
|
variables:
|
|
770
|
+
- { name: "HLY-TEMP-NORMAL", units: "degrees Celsius", description: "Hourly normal mean temperature (metric units); local standard time" }
|
|
768
771
|
- { name: "MLY-TMAX-NORMAL", units: "degrees Celsius", description: "Monthly normal maximum temperature" }
|
|
769
772
|
- { name: "MLY-TMIN-NORMAL", units: "degrees Celsius", description: "Monthly normal minimum temperature" }
|
|
770
773
|
- { name: "MLY-PRCP-NORMAL", units: "mm", description: "Monthly normal precipitation total" }
|
|
@@ -1144,6 +1147,7 @@ datasets:
|
|
|
1144
1147
|
guide: docs/providers/noaa-lcd.md
|
|
1145
1148
|
examples:
|
|
1146
1149
|
- examples/hourly-observations/README.md
|
|
1150
|
+
- examples/hourly-anomalies/example.ipynb
|
|
1147
1151
|
resolution:
|
|
1148
1152
|
spatial: "Airport and first-order stations, addressed by eleven-digit station id"
|
|
1149
1153
|
temporal: "Hourly, special, and synoptic reports, plus daily and monthly summaries"
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"""U.S. Climate Normals 1991-2020 through the NCEI Access Data Service.
|
|
2
2
|
|
|
3
|
-
Params: ``period`` (``monthly`` by default, ``daily``, or ``
|
|
3
|
+
Params: ``period`` (``monthly`` by default, ``daily``, ``annualseasonal``, or ``hourly``),
|
|
4
4
|
``stations`` (list or comma string), and ``units`` (metric or standard).
|
|
5
5
|
|
|
6
|
-
Normals are 30-year averages, not observations, so dates are optional. For
|
|
7
|
-
and monthly normals an optional ``start``/``end`` pair selects a calendar window
|
|
6
|
+
Normals are 30-year averages, not observations, so dates are optional. For hourly,
|
|
7
|
+
daily, and monthly normals an optional ``start``/``end`` pair selects a calendar window
|
|
8
8
|
by month and day; the year is ignored and sent as the placeholder 2020, a leap
|
|
9
9
|
year so February 29 is valid. Windows cannot cross the new year. Without dates
|
|
10
10
|
the whole year is requested. Annual/seasonal normals accept no dates. Assets
|
|
11
11
|
carry the 1991-2020 normals period as their time bounds.
|
|
12
|
+
Hourly normals return all hours of each selected day, labeled in local standard
|
|
13
|
+
time as ``MM-DDTHH:MM:SS``. They have no February 29 values.
|
|
12
14
|
"""
|
|
13
15
|
|
|
14
16
|
from __future__ import annotations
|
|
@@ -29,6 +31,7 @@ PERIODS = {
|
|
|
29
31
|
"monthly": "normals-monthly-1991-2020",
|
|
30
32
|
"daily": "normals-daily-1991-2020",
|
|
31
33
|
"annualseasonal": "normals-annualseasonal-1991-2020",
|
|
34
|
+
"hourly": "normals-hourly-1991-2020",
|
|
32
35
|
}
|
|
33
36
|
PLACEHOLDER_YEAR = 2020
|
|
34
37
|
NORMALS_PERIOD = TimeRange(
|
|
@@ -41,7 +44,7 @@ class ClimateNormalsParams(GhcnDailyParams):
|
|
|
41
44
|
"""A normals query also names which averaging period it wants."""
|
|
42
45
|
|
|
43
46
|
period: Annotated[str, choice(*PERIODS)] = Field(
|
|
44
|
-
default="monthly", description="monthly (default), daily, or
|
|
47
|
+
default="monthly", description="monthly (default), daily, annualseasonal, or hourly."
|
|
45
48
|
)
|
|
46
49
|
|
|
47
50
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|