Skip to content

mostlyright

One entry in the per-domain catalog manifest (generated from the Python registry; committed at @mostlyrightmd/weather/catalog). The injected source of truth for the kind: "source" discover rows.

readonly availability: ManifestAvailability

readonly optional columns: readonly string[]

readonly domain: string

readonly optional entity: string

readonly id: string

readonly kind: string

readonly optional license: string

readonly optional note: string

readonly optional pit_fidelity: string

readonly optional point_in_time_fidelity: string

readonly optional units: Readonly<Record<string, string>>

readonly optional usage: CatalogUsage


Language-tagged usage snippet carried by a catalog entry.

readonly optional py: string

readonly optional ts: string


Structured filters — none of them change the return type.

readonly optional availability: "python" | "typescript"

readonly optional catalog: readonly CatalogEntry[]

The catalog manifest entries for the source rows (inject or loadWeatherCatalog()).

readonly optional domain: string

readonly optional kind: "source" | "station"


A registered data-source hit.

readonly availability: readonly string[]

readonly domain: string

readonly id: string

readonly kind: "source"

readonly name: string

readonly note: string

readonly point_in_time_fidelity: null | string

readonly usage_ts: string

The TS-facing usage snippet (never a bare Python snippet).


A bundled-catalog station hit.

readonly country: null | string

readonly domain: string

readonly id: string

readonly kind: "station"

readonly latitude: null | number

readonly longitude: null | number

readonly name: string

readonly note: string

readonly timezone: null | string


The capped option surface for trainingTable. Only label — no transport/cache/clock seams.

readonly optional label: Label

The settlement label recipe — "cli" (default, Kalshi NHIGH/NLOW) or "daily_extremes" (Polymarket WU/NOAA-WRH).


One supervised row: the settlement label columns beside the observation feature aggregates, keyed by (station, local_standard_date), with the three MACH-05 temporal columns. snake_case keys serialize identically to the Python schema.core.training_table.v1 frame.

readonly daily_summary_report_type: null | string

readonly daily_summary_temp_high_f: null | number

readonly daily_summary_temp_low_f: null | number

readonly decision_time_utc: string

The settlement decision cutoff (a model would have acted “as of” this instant).

readonly knowable_at_utc: string

max(decision_time_utc, label_available_time_utc) — when the row first became computable.

readonly label_available_time_utc: string

When the settlement label was published/available.

readonly local_standard_date: string

readonly observation_count: number

readonly observed_dewpoint_mean_f: null | number

readonly observed_precipitation_total_in: null | number

readonly observed_temp_high_f: null | number

readonly observed_temp_low_f: null | number

readonly observed_temp_mean_f: null | number

readonly observed_wind_gust_max_kt: null | number

readonly observed_wind_max_kt: null | number

readonly station: string

DiscoverRow: DiscoverStationRow | DiscoverSourceRow

One discover row — a discriminated union on kind.


Label: "cli" | "daily_extremes"

The settlement-label recipe selector — mirrors Python weather.training_table’s Label.


ManifestAvailability: string | ReadonlyArray<string>

A manifest availability value: the language-name list or a legacy comma-string.

const version: "1.9.9" = "1.9.9"

Public package version; kept in lockstep with package.json.

discover(query, filters): DataResult<DiscoverRow>

Discover stations and data sources in ONE discriminated envelope.

string

DiscoverFilters = {}

DataResult<DiscoverRow>

const { rows } = discover("nyc"); // station hits
const { rows } = discover("temp", { catalog, kind: "source" }); // source hits
for (const row of rows) {
if (row.kind === "station") { row.timezone; } // narrows to station geo
else { row.availability; } // narrows to source meta
}

loadWeatherCatalog(url): Promise<readonly CatalogEntry[]>

Lazily fetch a per-domain catalog manifest (browser-safe: fetch + JSON). Point url at the committed @mostlyrightmd/weather/catalog asset. Kept out of the barrel’s top level so the manifest never enters the size-budgeted meta bundle.

string

Promise<readonly CatalogEntry[]>


trainingTable(station, fromDate, toDate, opts): Promise<DataResult<TrainingTableRow>>

A built-in supervised-table example: features -> label rows for a station + date window, one per station local standard day. It preserves the recipe’s temporal columns and applies the timing metadata available from its sources.

trainingTable() is a built-in supervised-table example (the twin of Python weather.training_table()). An OMITTED label returns the "cli" settlement target (Kalshi NHIGH/NLOW ground truth) beside the observation feature aggregates — the EXPLICIT, contractually-stable default (no deprecation path). Pass label: "daily_extremes" to swap in the Polymarket WU/NOAA-WRH target.

string

the station id (e.g. "KNYC").

string

YYYY-MM-DD inclusive start.

string

YYYY-MM-DD inclusive end.

TrainingTableOptions = {}

the capped option surface — only label.

Promise<DataResult<TrainingTableRow>>

a DataResult of TrainingTableRow plus its provenance envelope.

const { rows, provenance } = await trainingTable("KNYC", fromDate, toDate);