Skip to content

@mostlyrightmd/weather/dailySummaries

optional politenessMs: number

Polite delay (ms) between IEM CLI yearly requests. Forwarded to downloadCliRange. Default 1000 (IEM_CLI_POLITE_DELAY_MS).

optional signal: AbortSignal

Forward to the underlying fetcher; aborts the range download.

optional source: DailySummarySourceFilter

Provenance filter. null/undefined (default) == "iem". Accepts {"iem", "cli", "cli.archive"}; "acis" throws (no ACIS leg here).


Single daily-summary (NWS CLI settlement) row. Projects the raw parser keys onto the public join vocabulary. date/station/daily_summary_temp_high_f/ daily_summary_temp_low_f/daily_summary_report_type are the settlement contract; source + issued_at carry provenance.

daily_summary_report_type: string

Inferred CLI report type (final/preliminary/…).

daily_summary_temp_high_f: null | number

Daily high °F (int) or null. Join vocabulary — same as PairsRow.daily_summary_temp_high_f.

daily_summary_temp_low_f: null | number

Daily low °F (int) or null. Join vocabulary — same as PairsRow.daily_summary_temp_low_f.

issued_at_utc: null | string

ISO 8601 UTC issuance time when present, else null.

local_standard_date: string

Local climate day, YYYY-MM-DD (from the parser’s observation_date).

source: "iem"

Per-row endpoint tag — always "iem" for CLI.

station: string

Station code (as resolved from the caller’s input).

DailySummaryFrameSource: "cli.archive"

Frame-level source identity carried on the array dailySummaries() returns. Always the settlement product tag "cli.archive" — distinct from the per-row endpoint tag "iem". Mirrors Python df.attrs["source"].


DailySummarySourceFilter: "iem" | "cli" | "cli.archive" | null

Source filter for dailySummaries(). Mirrors the Python accept-set {None, "iem", "cli", "cli.archive"}. null/undefined (default) == "iem". "acis" is rejected (no ACIS leg in this code path), matching Python’s ValueError.

dailySummaries(station, fromDate, toDate, opts): Promise<DataResult<DailySummaryRow>>

Fetch the NWS CLI daily settlement labels for a station’s window.

Mirrors Python mostlyright.weather.daily_summaries(station, from_date, to_date, *, source=None, ...). Composes the local CLI fetch path (year-granular download → parse → frozen mergeClimate dedup), window-trims to [fromDate, toDate], and projects onto the public join vocabulary.

string

ICAO code (e.g. “KNYC”) OR 3-letter NWS code (e.g. “NYC”). Resolved through the station registry: fetched by ICAO, projected as the NWS code into each row’s station (matches Python daily_summaries()).

string

Inclusive start date, ISO YYYY-MM-DD.

string

Inclusive end date, ISO YYYY-MM-DD.

DailySummaryOptions = {}

See DailySummaryOptions.

Promise<DataResult<DailySummaryRow>>

DataResult<DailySummaryRow>: projected rows, with provenance.source set to "cli.archive".

ValidationError on a malformed/unknown station (before any fetch).

Error on malformed dates, fromDate > toDate, or source="acis" (no ACIS leg in this code path).