> ## Documentation Index
> Fetch the complete documentation index at: https://playbook.smedleygroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Weather Charts

> Air and track temperature, wind speed, wind direction and rainfall plotted over the whole session, as of the playhead.

## Overview

Weather Charts is a family of four widgets that plot the session's weather as a timeline rather than a single reading: **Weather: Temperature**, **Weather: Wind Speed**, **Weather: Wind Direction** and **Weather: Rainfall**. Reach for them when the question is "when did it change", for example whether the track cooled before a round of stops, or exactly when the rain arrived.

> [!NOTE]
>
> These four are the history view. The compact [Weather](/software/internal/watchparty/widgets/weather) strip is the same data as of-the-playhead stat tiles. All five read one retained history, so they always agree.

***

## What It Shows

Each chart shares a circuit-local time-of-day x axis, and each plots only the readings at or before the playhead.

**Zooming.** Right-drag across a plot to draw a box, and on release the chart zooms to it: both axes for Temperature and Wind Speed, the time axis only for Wind Direction and Rainfall, whose value axes are fixed. The drag carries on if the pointer leaves the plot or the chart, and the zoom lands at the last point inside the plot when you let go. A right-click without moving opens a small menu with **Reset zoom**. Left-drag is unchanged and there are no zoom sliders. The Humidity and Pressure charts in the palette behave the same way.

### Temperature

![Air and track temperature across the session (Madrid 2026)](https://mintcdn.com/smedley_group/Tjan_fF50tdTQI7z/images/watchparty/weather-temperature.png?fit=max\&auto=format\&n=Tjan_fF50tdTQI7z\&q=85\&s=39dbd63ff066bfbc9b2722b7b42737d4)

Two series on one chart, Air and Track, in degrees Celsius, from the `air_temp` and `track_temp` columns. A reading missing one of the two drops out of that series only; the other still plots.

### Wind Speed

![Wind speed across the session (Madrid 2026)](https://mintcdn.com/smedley_group/Tjan_fF50tdTQI7z/images/watchparty/weather-wind.png?fit=max\&auto=format\&n=Tjan_fF50tdTQI7z\&q=85\&s=7b19cc9b95db7fc32c933a247d0cffe3)

A single line in metres per second, with the axis floored at zero.

### Wind Direction

![Wind direction on a full 0 to 360 degree axis (Madrid 2026)](https://mintcdn.com/smedley_group/Tjan_fF50tdTQI7z/images/watchparty/weather-direction.png?fit=max\&auto=format\&n=Tjan_fF50tdTQI7z\&q=85\&s=f45d75770ee02cc797cc2867e552f71e)

A line on a compass axis pinned to the full 0 to 360 degrees, with ticks every 90, rather than an axis scaled to the data. A session where the wind barely moves therefore reads as barely moving, and the same height always means the same bearing.

> [!WARNING]
>
> Because the axis is a plain 0 to 360 line, a veer across the 0 and 360 wrap draws as a full-height sweep for what is physically a small change of bearing. That is a known consequence of the owner's line-plot ruling, not a data fault.

### Rainfall

![Rainfall as a dry / wet step trace; a dry race reads as a flat line on Dry (Madrid 2026)](https://mintcdn.com/smedley_group/Tjan_fF50tdTQI7z/images/watchparty/weather-rainfall.png?fit=max\&auto=format\&n=Tjan_fF50tdTQI7z\&q=85\&s=985900f227be6a6661658e4ba7ae0fa6)

The `rainfall` column is a 0 or 1 flag, so it is drawn as a step that **holds** between samples and labelled Dry and Wet. A straight line between the two would draw a gradual transition that never happened.

***

## Data Behind It

All four charts are client-derived, with no insight metric behind them. `screens/derive.ts`'s `buildWeatherCharts` builds all four options from one already as-of-filtered history array.

* **WS channel**: `weather`, on `vpw:v1:{session_key}:weather`, defined in `libs/vpw-contracts`.
* **REST hydration**: `GET /v1/sessions/{session_key}/weather`, an offset-paged row endpoint read on session enter and re-read on a reconnect or a `seek`.
* **Full history**: the store keeps every weather row for the session, and `weatherHistoryAsOf` gates them by the playhead at read time.
* **Field names**: the real weather columns are `air_temp`, `track_temp`, `wind_speed`, `wind_direction`, `humidity` and `rainfall`.
* **Honest gaps**: a reading missing a given field drops out of that field's series only. Nothing is ever interpolated to fill a gap.
* **Clocks**: the time axis and the tooltip header both render circuit-local time from the session's own `gmt_offset`, falling back to the browser's local time only when the session carries no usable offset.
* Live and replay envelopes are wire-identical; the widgets never branch on envelope `source`.

***

## States

| State | Behaviour |
| - | - |
| No reading for that field as of the playhead | That chart alone shows its empty state; the other three still plot |
| Field missing from every row | Same empty state, permanently, rather than an empty pair of axes |
| Playhead scrubbed backwards | The series shorten to the readings at or before the new cutoff |
| Session with no `gmt_offset` | Axis and tooltip fall back to browser-local time |
| Session-type gating | None: shown in every session type |
| Live vs replay | Identical rendering |

***

## FAQ

> **Why is air or track temperature empty on a backfilled weekend?**
>
> Some FastF1-backfilled sessions carry weather rows with no temperature values at all. The chart shows its empty state rather than inventing a line. The live-sourced copy of the same session usually has them.

> **Why does rainfall only ever read Dry or Wet?**
>
> Because the source column is a 0 or 1 flag, not a rate. There is no millimetre figure on the wire to plot.

> **Why did wind direction jump from 5 degrees to 355?**
>
> It did not jump physically. The axis is a straight 0 to 360 line, so a small veer across north draws as a full-height sweep.

***

## Next Steps

> **[Weather](/software/internal/watchparty/widgets/weather)**
>
> The same data as a compact as-of readout.

> **[Race Control](/software/internal/watchparty/widgets/race-control)**
>
> What race control said as conditions changed.

> **[Track Evolution](/software/internal/watchparty/widgets/track-evolution)**
>
> How the surface itself responded.

> **[Tyre Strategy](/software/internal/watchparty/widgets/tyre-strategy)**
>
> What the field fitted as the weather moved.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.