mostlyright
Interfaces
Section titled “Interfaces”CatalogEntry
Section titled “CatalogEntry”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.
Properties
Section titled “Properties”availability
Section titled “availability”
readonlyavailability:ManifestAvailability
columns?
Section titled “columns?”
readonlyoptionalcolumns: readonlystring[]
domain
Section titled “domain”
readonlydomain:string
entity?
Section titled “entity?”
readonlyoptionalentity:string
readonlyid:string
readonlykind:string
license?
Section titled “license?”
readonlyoptionallicense:string
readonlyoptionalnote:string
pit_fidelity?
Section titled “pit_fidelity?”
readonlyoptionalpit_fidelity:string
point_in_time_fidelity?
Section titled “point_in_time_fidelity?”
readonlyoptionalpoint_in_time_fidelity:string
units?
Section titled “units?”
readonlyoptionalunits:Readonly<Record<string,string>>
usage?
Section titled “usage?”
readonlyoptionalusage:CatalogUsage
CatalogUsage
Section titled “CatalogUsage”Language-tagged usage snippet carried by a catalog entry.
Properties
Section titled “Properties”
readonlyoptionalpy:string
readonlyoptionalts:string
DiscoverFilters
Section titled “DiscoverFilters”Structured filters — none of them change the return type.
Properties
Section titled “Properties”availability?
Section titled “availability?”
readonlyoptionalavailability:"python"|"typescript"
catalog?
Section titled “catalog?”
readonlyoptionalcatalog: readonlyCatalogEntry[]
The catalog manifest entries for the source rows (inject or loadWeatherCatalog()).
domain?
Section titled “domain?”
readonlyoptionaldomain:string
readonlyoptionalkind:"source"|"station"
DiscoverSourceRow
Section titled “DiscoverSourceRow”A registered data-source hit.
Properties
Section titled “Properties”availability
Section titled “availability”
readonlyavailability: readonlystring[]
domain
Section titled “domain”
readonlydomain:string
readonlyid:string
readonlykind:"source"
readonlyname:string
readonlynote:string
point_in_time_fidelity
Section titled “point_in_time_fidelity”
readonlypoint_in_time_fidelity:null|string
usage_ts
Section titled “usage_ts”
readonlyusage_ts:string
The TS-facing usage snippet (never a bare Python snippet).
DiscoverStationRow
Section titled “DiscoverStationRow”A bundled-catalog station hit.
Properties
Section titled “Properties”country
Section titled “country”
readonlycountry:null|string
domain
Section titled “domain”
readonlydomain:string
readonlyid:string
readonlykind:"station"
latitude
Section titled “latitude”
readonlylatitude:null|number
longitude
Section titled “longitude”
readonlylongitude:null|number
readonlyname:string
readonlynote:string
timezone
Section titled “timezone”
readonlytimezone:null|string
TrainingTableOptions
Section titled “TrainingTableOptions”The capped option surface for trainingTable. Only label — no transport/cache/clock seams.
Properties
Section titled “Properties”label?
Section titled “label?”
readonlyoptionallabel:Label
The settlement label recipe — "cli" (default, Kalshi NHIGH/NLOW) or "daily_extremes" (Polymarket WU/NOAA-WRH).
TrainingTableRow
Section titled “TrainingTableRow”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.
Properties
Section titled “Properties”daily_summary_report_type
Section titled “daily_summary_report_type”
readonlydaily_summary_report_type:null|string
daily_summary_temp_high_f
Section titled “daily_summary_temp_high_f”
readonlydaily_summary_temp_high_f:null|number
daily_summary_temp_low_f
Section titled “daily_summary_temp_low_f”
readonlydaily_summary_temp_low_f:null|number
decision_time_utc
Section titled “decision_time_utc”
readonlydecision_time_utc:string
The settlement decision cutoff (a model would have acted “as of” this instant).
knowable_at_utc
Section titled “knowable_at_utc”
readonlyknowable_at_utc:string
max(decision_time_utc, label_available_time_utc) — when the row first became computable.
label_available_time_utc
Section titled “label_available_time_utc”
readonlylabel_available_time_utc:string
When the settlement label was published/available.
local_standard_date
Section titled “local_standard_date”
readonlylocal_standard_date:string
observation_count
Section titled “observation_count”
readonlyobservation_count:number
observed_dewpoint_mean_f
Section titled “observed_dewpoint_mean_f”
readonlyobserved_dewpoint_mean_f:null|number
observed_precipitation_total_in
Section titled “observed_precipitation_total_in”
readonlyobserved_precipitation_total_in:null|number
observed_temp_high_f
Section titled “observed_temp_high_f”
readonlyobserved_temp_high_f:null|number
observed_temp_low_f
Section titled “observed_temp_low_f”
readonlyobserved_temp_low_f:null|number
observed_temp_mean_f
Section titled “observed_temp_mean_f”
readonlyobserved_temp_mean_f:null|number
observed_wind_gust_max_kt
Section titled “observed_wind_gust_max_kt”
readonlyobserved_wind_gust_max_kt:null|number
observed_wind_max_kt
Section titled “observed_wind_max_kt”
readonlyobserved_wind_max_kt:null|number
station
Section titled “station”
readonlystation:string
Type Aliases
Section titled “Type Aliases”DiscoverRow
Section titled “DiscoverRow”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
Section titled “ManifestAvailability”ManifestAvailability:
string|ReadonlyArray<string>
A manifest availability value: the language-name list or a legacy comma-string.
Variables
Section titled “Variables”version
Section titled “version”
constversion:"1.9.9"="1.9.9"
Public package version; kept in lockstep with package.json.
Functions
Section titled “Functions”discover()
Section titled “discover()”discover(
query,filters):DataResult<DiscoverRow>
Discover stations and data sources in ONE discriminated envelope.
Parameters
Section titled “Parameters”string
filters
Section titled “filters”DiscoverFilters = {}
Returns
Section titled “Returns”DataResult<DiscoverRow>
Example
Section titled “Example”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()
Section titled “loadWeatherCatalog()”loadWeatherCatalog(
url):Promise<readonlyCatalogEntry[]>
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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<readonly CatalogEntry[]>
trainingTable()
Section titled “trainingTable()”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.
Parameters
Section titled “Parameters”station
Section titled “station”string
the station id (e.g. "KNYC").
fromDate
Section titled “fromDate”string
YYYY-MM-DD inclusive start.
toDate
Section titled “toDate”string
YYYY-MM-DD inclusive end.
TrainingTableOptions = {}
the capped option surface — only label.
Returns
Section titled “Returns”Promise<DataResult<TrainingTableRow>>
a DataResult of TrainingTableRow plus its provenance envelope.
Example
Section titled “Example”const { rows, provenance } = await trainingTable("KNYC", fromDate, toDate);