Skip to content

mostlyright.weather.spine

Internal per-settlement-day weather spine constructor.

days(stations, from_date, to_date, *, tz_override=None) mints the settlement calendar for one or more weather stations and returns a BARE spine (entity = station, a per-LST-settlement-day decision_time, NO y columns). It is the single domain spine constructor that the weather.label.* factories build on — the structural fix for settlement-calendar skew re-entering between research and live (the skew guard). This module is INTERNAL: there is no public weather.days() verb; training_table() and the label factories are the public entry points.

  • Two positional dates, inclusive ends: days('KNYC', '2025-01-01', '2025-01-03') enumerates 3 settlement days.
  • “tz_override“ moves the settlement calendar, so the same day resolves a different decision_time instant (the market-close UTC time for that station’s LST calendar).
  • A LIST “stations=“ → a LONG-FORMAT panel: per-station calendars concatenated with the station column FIRST. Rows key by entity, so there is no cross-station bleed.

The constructor mints the calendar for the stations the caller names — it is the caller’s responsibility that the named stations existed across the window.

days(stations, from_date, to_date, *[, …])Return a bare per-LST-settlement-day spine for stations.

mostlyright.weather.spine.days(stations, from_date, to_date, , tz_override=None)

Section titled “mostlyright.weather.spine.days(stations, from_date, to_date, , tz_override=None)”

Return a bare per-LST-settlement-day spine for stations.

  • Parameters:
    • stations (str | list[str] | tuple[str, ...]) – A single station id ("KNYC") or a LIST of ids (["KNYC", "KLGA"] → a long-format panel).
    • from_date (str) – Inclusive ISO YYYY-MM-DD window (two positional dates, R-13).
    • to_date (str) – Inclusive ISO YYYY-MM-DD window (two positional dates, R-13).
    • tz_override (str | None) – IANA timezone override for the settlement calendar (the tz_override orphan-kwarg home) — moves the decision_time instant.
  • Return type: DataFrame
  • Returns: A DataFrame with station (the NORMALIZED registry code — "NYC" for a "KNYC" input; the v0.14.1 heritage key every source frame and research()/pairs() output carries, so align’s equality join matches — review-iter-2), local_standard_date (the ISO local standard day, the equality-join key sources attach on), and decision_time (the market-close UTC instant for that settlement day). NO y columns — this is a bare spine. An out-of-registry station (the tz_override path) keeps its id as typed.