# Data weave

> Use a data weave to turn a grid of values into cloth: one thread per row and per column, with each crossing going over or under by a rule on the data.

- Data type: Values over time (`time`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`time`)
- Example: **No month since 1992 has been cooler than the 1951 to 1980 average** (Global surface temperature by month, 1950 to 2025, compared with the 1951 to 1980 average for that month, °C)
- How to read it: Each upright thread is a year, coloured by how warm it was; it passes over a month's thread when that month was warmer than average, and under it when cooler.
- Phone: Not recommended for mobile (11 labels are cut off at the drawing's edge) · Video formats: none passed; closest 16:9

## Use it when
- a year-by-month (or row-by-column) grid with a yes/no rule worth seeing
- the texture changing over time is the story
- a striking, printable image for a cover or a post

## Avoid it when
- readers need to read exact values (use a heatmap with labels)
- the rule for over and under would be arbitrary
- more than about 120 threads either way

## Fields (data.json)
- `year` (year): the year (one upright thread)
- `months` (number, unit "°C", format decimal): one value per period, in order, one weft thread each (the 12 monthly anomalies, January to December, °C against 1951 to 1980, in the example; any count works, named by hints.periods, else month names for twelve, else 1 to N)

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- hover or tap a crossing to read that month
- Play walks through the decades
- Motion: The upright threads are laid on the loom one after another from 1950, as if being woven.
- Sound: A pop on hover pitched by temperature; a paper unrolling when Play reaches the last decade. Quiet while it weaves and between steps; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "data-weave",
  "title": "No month since 1992 has been cooler than the 1951 to 1980 average",
  "subtitle": "Global surface temperature by month, 1950 to 2025, compared with the 1951 to 1980 average for that month, °C",
  "data": "/charts/data-weave.data.json"
}
```

## Source
GISS Surface Temperature Analysis (GISTEMP v4), global land-ocean monthly means, NASA Goddard Institute for Space Studies (Public domain (US government work)), retrieved 2026-12-01: https://data.giss.nasa.gov/gistemp/

Inspired by: [Warming stripes](https://showyourstripes.info/), Ed Hawkins (linked, not copied).

Live: /charts/data-weave · Manifest: /charts/data-weave.json · Tags: weave, textile, data art, warming stripes, climate, temperature, generative
