Documentation

Timeseries table

@infoplaza/platform/timeseries-table

A portable point-forecast matrix — grouped hourly rows with sticky labels, threshold cell color, and a day navigator — without the map stack or app chrome. Sibling to the original timeseries table (@infoplaza/platform/timeseries), which is unchanged. The models catalog is the same (GET /api/platform/timeseries-models, or marine-timeseries-models when domain="marine"). Series load from GET /api/platform/timeseries-point-forecast (or marine-timeseries-point-forecast) unless the host passes tables / getTables. See the timeseries table demo. See API request counts and token credits in the charts platform example.

Packaged vs composed

Import only from @infoplaza/platform/timeseries-table. Do not extend the original table package, and do not add LINE to TimeseriesCellView.

<TimeseriesTableForecast
  lat={52.3676}
  lon={4.9041}
  model="gfs"
  showToolbar={false}
/>
<TimeseriesModelsProvider lat={52.3676} lon={4.9041}>
  <TimeseriesTableProvider>
    <TimeseriesTableToolbar />
    <TimeseriesTableBuilder>
      <TimeseriesTable />
    </TimeseriesTableBuilder>
  </TimeseriesTableProvider>
</TimeseriesModelsProvider>

Default groups follow domain: land uses DEFAULT_LAND_TIMESERIES_TABLE_GROUPS (Temperature, Precipitation, Wind); marine uses DEFAULT_MARINE_TIMESERIES_TABLE_GROUPS (Wind, Overall, Sea, Swell). All groups share one time axis. Optional showPosition prepends Lat / Long from the forecast point. Group-visibility footer pills are off for now. Below Tailwind sm (640px) the table shows one day at a time, with a sticky day pager. At sm and up it keeps the full forecast domain and a bottom day navigator.

Pass elementGroups to replace those defaults (it does not merge). Optional thresholds paint VALUE cells yellow / orange / red from conditions + ignored_hours.

API

@infoplaza/platform/timeseries-table

Compound API. TimeseriesModelsProvider is the only writer of the catalog. TimeseriesTableProvider loads all groups once and exposes one unified matrix.
import {
  TimeseriesTableForecast,
  TimeseriesModelsProvider,
  TimeseriesTableProvider,
} from '@infoplaza/platform/timeseries-table'

Also exported: DEFAULT_LAND_TIMESERIES_TABLE_GROUPS, DEFAULT_MARINE_TIMESERIES_TABLE_GROUPS, hooks useTimeseriesTable / useTimeseriesTableContext, and types such as TimeseriesTableSnapshot, TimeseriesTableElementGroup, TimeseriesTableView, TimeseriesTableThresholds.

TimeseriesTableForecast

Packaged hourly matrix with toolbar.

Wraps TimeseriesModelsProvider and TimeseriesTableProvider, then optional Toolbar, Builder + Table. lat and lon are required. Rows load from GET /api/platform/timeseries-point-forecast (or marine-timeseries-point-forecast when domain is marine) unless you pass tables or getTables. All config groups share one time axis. Applies ip-platform for you.

import { TimeseriesTableForecast } from '@infoplaza/platform/timeseries-table'
  • Do not pass a models array. The catalog is loaded from GET /api/platform/timeseries-models (or marine-timeseries-models when domain is marine).
  • domain defaults to land. Set domain="marine" on Forecast or TimeseriesModelsProvider.
  • Builder renders one unified table, not one table per group.
  • showToolbar defaults to true. showFooter is off for now (group-visibility pills are disabled).
  • This package is a sibling of @infoplaza/platform/timeseries. The original table is unchanged.

Required props

PropTypeDefaultDescription
latnumber—Latitude of the forecast point.
lonnumber—Longitude of the forecast point.

Optional props

PropTypeDefaultDescription
basePathstring'/api/platform'Auth handler mount path.
domain'land' | 'marine''land'Which PlatformAuth proxy to use. land hits timeseries-models and timeseries-point-forecast; marine hits the marine-timeseries-* routes.
model / defaultModel / onModelChangestring—Preferred catalog slug. model without onModelChange (or defaultModel) is the initial selection; model + onModelChange is controlled. If the slug is not in the fetched catalog, the first model is used.
showToolbarbooleantrueRender the model / run pill toolbar.
showFooterbooleanfalseGroup-visibility pills. Off for now; leave false.
elementGroupsTimeseriesTableElementGroup[]DEFAULT_LAND_TIMESERIES_TABLE_GROUPS when domain is land, DEFAULT_MARINE_TIMESERIES_TABLE_GROUPS when marineTable config. Item view is VALUE, DIRECTION, or PRECIPITATION_TYPE. A defined array replaces domain defaults (it does not merge).
visibleGroups / defaultVisibleGroups / onVisibleGroupsChangestring[]—Which group keys are shown. Defaults to every group.
tablesTimeseriesTableSnapshot[]—Host-owned snapshots. When defined, skips the point-forecast fetch.
getTables(options) => TimeseriesTableSnapshot[]—Sync override when tables is omitted. Receives model, run, models, elementGroups, visibleGroups, locale, timezone.
localestring'en'Date headers: 'en' | 'nl' | 'de' | 'it' | 'es' | 'fr'.
thresholdsTimeseriesTableThresholds | null—Optional. conditions + ignored_hours. VALUE cells paint yellow / orange / red when matching groups fire at that hour.
showPositionbooleantruePrepend Lat / Long rows from the forecast point. Not an API element.
classNamestring—Extra class on the root wrapper.

Example

<TimeseriesTableForecast
  lat={52.3676}
  lon={4.9041}
  model="gfs"
  locale="en"
/>

TimeseriesModelsProvider

Location-filtered timeseries catalog (re-exported).

Same provider as @infoplaza/platform/timeseries. Required lat and lon. Fetches GET {basePath}/timeseries-models?lat=&lon= (or marine-timeseries-models when domain is marine). Re-exported so composed tables can import from one package.

import { TimeseriesModelsProvider, useTimeseriesModels } from '@infoplaza/platform/timeseries-table'

Required props

PropTypeDefaultDescription
latnumber—Latitude of the forecast point.
lonnumber—Longitude of the forecast point.

Optional props

PropTypeDefaultDescription
basePathstring'/api/platform'Auth handler mount path.
domain'land' | 'marine''land'land uses timeseries-models; marine uses marine-timeseries-models.

TimeseriesTableProvider

Selection, snapshots, and group visibility.

Must sit under TimeseriesModelsProvider. Holds model / run / visibleGroups, loads table snapshots, and exposes them to Toolbar, Builder, and Footer. No models prop. Fetches point forecast unless tables / getTables is passed.

import { TimeseriesTableProvider, useTimeseriesTable } from '@infoplaza/platform/timeseries-table'
  • useTimeseriesTable() throws outside the provider. useTimeseriesTableContext() is nullable.

Required props

None.

Optional props

PropTypeDefaultDescription
model / defaultModel / onModelChangestring—Preferred catalog slug. model without onModelChange (or defaultModel) is the initial selection; model + onModelChange is controlled.
run / defaultRun / onRunChangenumber | 'all'—Runtime selection. all fetches one payload per catalog runtime.
elementGroupsTimeseriesTableElementGroup[]—Replaces domain defaults when defined (does not merge).
visibleGroups / defaultVisibleGroups / onVisibleGroupsChangestring[]—Group keys currently shown.
tablesTimeseriesTableSnapshot[]—Host-owned snapshots. Skips the fetch.
getTables(options) => TimeseriesTableSnapshot[]—Sync override when tables is omitted.
localestring'en'Date header locale.
thresholdsTimeseriesTableThresholds | null—Optional. conditions + ignored_hours. Paints VALUE cells.
showPositionbooleantruePrepend Lat / Long rows from the forecast point.

TimeseriesTableToolbar

Model and run pills.

Resolves props ?? context and returns null if neither exists — it does not throw. Reuses timeseries pills internally, not map controls.

import { TimeseriesTableToolbar } from '@infoplaza/platform/timeseries-table'

Required props

None.

Optional props

PropTypeDefaultDescription
modelstring—Falls back to context.
onModelChange(slug: string) => void—Falls back to context.
runnumber | 'all'—Falls back to context.
onRunChange(run: number | 'all') => void—Falls back to context.

TimeseriesTableBuilder

Loading skeleton and compact day pager. Does not fetch.

Requires TimeseriesTableProvider. Loading skeleton, then a single child — typically TimeseriesTable. Below Tailwind sm (640px) it shows a sticky day pager so the matrix windows to one calendar day.

import { TimeseriesTableBuilder, TimeseriesTable } from '@infoplaza/platform/timeseries-table'

Required props

None.

Optional props

PropTypeDefaultDescription
childrenReactNode—Typically <TimeseriesTable />.

Example

<TimeseriesTableBuilder>
  <TimeseriesTable />
</TimeseriesTableBuilder>

TimeseriesTable

Unified hourly matrix.

Reads snapshots from TimeseriesTableProvider (or explicit tables). Sticky group / label / unit columns, day and hour headers, VALUE / DIRECTION / PRECIPITATION_TYPE cells, night-hour header shading, past-hour mute, optional threshold fills, and a bottom day navigator. Below Tailwind sm it windows to one day.

import { TimeseriesTable } from '@infoplaza/platform/timeseries-table'

Required props

None.

Optional props

PropTypeDefaultDescription
tablesTimeseriesTableSnapshot[]—Explicit snapshots. Otherwise reads provider context.
localestring—Date formatting locale.
timezonestring | null—Header timezone.
thresholdsTimeseriesTableThresholds | null—Falls back to TimeseriesTableProvider.