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


A label: "daily_extremes" supervised row — the Polymarket WU/NOAA-WRH settlement columns (daily_extremes_*, both °C and °F) beside the feature block. Mirrors Python RECIPE_LABEL_COLUMNS["daily_extremes"]; it carries no daily_summary_* columns, because the daily_extremes recipe has none.

readonly daily_extremes_high_c: null | number

readonly daily_extremes_high_f: null | number

readonly daily_extremes_low_c: null | number

readonly daily_extremes_low_f: null | number

readonly daily_extremes_mean_c: null | number

readonly daily_extremes_mean_f: null | number

readonly daily_extremes_observation_count: null | number

readonly daily_extremes_source_high: null | string

readonly daily_extremes_source_low: null | string

readonly decision_time_utc: string

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

TrainingTableRowBase.decision_time_utc

readonly knowable_at_utc: string

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

TrainingTableRowBase.knowable_at_utc

readonly label_available_time_utc: string

When the settlement label was published/available.

TrainingTableRowBase.label_available_time_utc

readonly local_standard_date: string

TrainingTableRowBase.local_standard_date

readonly observation_count: number

TrainingTableRowBase.observation_count

readonly observed_dewpoint_mean_f: null | number

TrainingTableRowBase.observed_dewpoint_mean_f

readonly observed_precipitation_total_in: null | number

TrainingTableRowBase.observed_precipitation_total_in

readonly observed_temp_high_f: null | number

TrainingTableRowBase.observed_temp_high_f

readonly observed_temp_low_f: null | number

TrainingTableRowBase.observed_temp_low_f

readonly observed_temp_mean_f: null | number

TrainingTableRowBase.observed_temp_mean_f

readonly observed_wind_gust_max_kt: null | number

TrainingTableRowBase.observed_wind_gust_max_kt

readonly observed_wind_max_kt: null | number

TrainingTableRowBase.observed_wind_max_kt

readonly station: string

TrainingTableRowBase.station


A label: "daily_summary" supervised row — the Kalshi NHIGH/NLOW settlement columns (daily_summary_*) beside the feature block. Mirrors Python RECIPE_LABEL_COLUMNS["cli"]; it carries no daily_extremes_* columns.

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).

TrainingTableRowBase.decision_time_utc

readonly knowable_at_utc: string

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

TrainingTableRowBase.knowable_at_utc

readonly label_available_time_utc: string

When the settlement label was published/available.

TrainingTableRowBase.label_available_time_utc

readonly local_standard_date: string

TrainingTableRowBase.local_standard_date

readonly observation_count: number

TrainingTableRowBase.observation_count

readonly observed_dewpoint_mean_f: null | number

TrainingTableRowBase.observed_dewpoint_mean_f

readonly observed_precipitation_total_in: null | number

TrainingTableRowBase.observed_precipitation_total_in

readonly observed_temp_high_f: null | number

TrainingTableRowBase.observed_temp_high_f

readonly observed_temp_low_f: null | number

TrainingTableRowBase.observed_temp_low_f

readonly observed_temp_mean_f: null | number

TrainingTableRowBase.observed_temp_mean_f

readonly observed_wind_gust_max_kt: null | number

TrainingTableRowBase.observed_wind_gust_max_kt

readonly observed_wind_max_kt: null | number

TrainingTableRowBase.observed_wind_max_kt

readonly station: string

TrainingTableRowBase.station


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 options trainingTable accepts. Only label — no transport, cache, or clock options.

readonly optional label: Label

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


The label-independent columns of a supervised row: the observation feature aggregates, the (station, local_standard_date) key, and the three temporal columns. snake_case keys serialize identically to the Python schema.core.training_table.v1 frame.

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: "daily_summary" | "daily_extremes"

The settlement-label recipe selector.


ManifestAvailability: string | ReadonlyArray<string>

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


TrainingTableRow: DailySummaryTrainingTableRow | DailyExtremesTrainingTableRow

One supervised row. The label-specific column set is mutually exclusive (matching Python RECIPE_LABEL_COLUMNS): label: "daily_summary" yields a DailySummaryTrainingTableRow (the daily_summary_* Kalshi columns), label: "daily_extremes" a DailyExtremesTrainingTableRow (the daily_extremes_* Polymarket columns). Narrow with an in check, e.g. "daily_extremes_high_f" in row.

const version: "4.1.0" = "4.1.0"

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.

An omitted label returns the "daily_summary" settlement target (Kalshi NHIGH/NLOW ground truth) beside the observation feature aggregates. 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 accepted options — only label.

Promise<DataResult<TrainingTableRow>>

a DataResult of TrainingTableRow plus its provenance envelope.

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