Catalog#
easysnowdata.catalog#
The product catalog: one declarative entry per product (§3.3).
import easysnowdata as esd
esd.catalog.list(theme="snow") # DataFrame of products
esd.catalog.describe("copernicus-dem") # sources, credentials, resolution, citation
esd.catalog.search("swe") # free-text search
esd.catalog.get("era5").sources # the Source dataclasses
The same registry drives esd.catalog.health (the weekly probes and the
README status table) and, in Phase 4, the generated docs pages.
One data variable of a product. |
|
A minimal live check of one access route (§8). |
|
One access route to a product. |
|
One dataset, with one or more sources (the first is the default). |
|
Add products to the registry (duplicate ids raise unless replace). |
|
Read-only view of every registered product, keyed by id. |
|
Return one product by id. |
|
Return a DataFrame of products, optionally filtered. |
|
Case-insensitive search over id, title, description, tags, variables and sources. |
|
Return a Markdown description of a product: sources, variables, citation. |
|
Return the list of problems with product (empty when valid). |
|
Validate every registered product; returns all problems found. |
easysnowdata.catalog.health#
Live health probes for every catalog source (§8).
Each Probe performs the minimal request that
confirms an access route is alive: a GET of the first byte for static file
hosts (GET first — GRDC answers HEAD with 400; only a final 200/206 counts,
figshare’s bot-challenge page answers 202), a STAC search, a Zarr metadata
read, an Earth Engine getInfo() or an earthaccess search. Credentials
come from easysnowdata.auth, so a probe whose source requires a
provider that is not configured is reported as skip rather than fail.
Alongside those, §8’s two measuring probes:
kind="latency"the newest datetime a time-series route serves, so a product that quietly stops being archived shows up as a date that stops moving rather than as nothing at all.
kind="virtualization"whether a NetCDF/HDF product has DMR++ sidecars, and the parser
earthaccess.virtualize()falls back to without them (§4.9). Both go through CMR’s metadata search, which needs no Earthdata Login, so they answer in a run with no credentials.
python -m easysnowdata.catalog.health (or the thin
scripts/check_data_sources.py wrapper) runs everything and appends the
results to data_status/history.json.
Raise unless a GET of the first byte of url returns 200 or 206. |
|
Raise unless a STAC search of collection returns at least one item. |
|
Raise unless the Zarr store at url opens with at least one variable. |
|
Raise unless an Earth Engine asset answers |
|
Raise unless |
|
The datetime of the newest item in collection. |
|
The start time of the newest granule of short_name, from CMR. |
|
The newest data the Zarr store at url actually serves. |
|
The acquisition time of the newest image in an Earth Engine collection. |
|
Walk back day by day until one answers, for archives with no index. |
|
Whether NASA publishes a DMR++ sidecar for short_name's granules. |
|
Run every probe (or those of product_ids / kinds) and return the results. |
|
Prepend results to the rolling history JSON (at most keep runs). |
|
CLI: run the probes, print a summary, append to the history file. |