# Calendar quilt

> Use a calendar quilt to show one value per day laid out like a calendar, so weeks, months and unusual days stand out.

- Data type: Values over time (`time`)
- Free (MIT): install with `npx chartreuse add calendar-quilt`, or registry item `/r/calendar-quilt.json`
- Example: **The Hualien earthquake made 3 April 2024 the year's busiest day for strong quakes** (Earthquakes of magnitude 4.5 or more worldwide, per day (UTC), 2024)
- How to read it: Each square is one day; the darker it is, the more strong earthquakes struck worldwide.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: none passed; closest 9:16

## Use it when
- one value per day for months or a year
- weekdays, months or single days may stand out
- readers think in calendar dates

## Avoid it when
- you need the trend more than the days (use a line)
- fewer than a few weeks of data
- more than three years of days (only the latest 36 months show)
- exact values matter (shade is approximate)

## Fields (data.json)
- `date` (date): the day (YYYY-MM-DD, UTC); any range of days, laid out month by month under each year (up to 36 months; longer data shows the latest 36). Missing days stay blank
- `count` (number, unit "earthquakes", format count): the day's value, which sets its shade (earthquakes of magnitude 4.5 or more in the example)
- `maxMag` (number, unit "magnitude", format decimal): optional: the day's top value, shown in its tooltip after hints.maxWord (the strongest magnitude that day in the example)
- `place` (place): optional: what or where the top value was, shown in the tooltip and under the busiest day (where the strongest quake struck in the example)

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 day to read its count and strongest quake
- Motion: Days fill in one after another through the year, like stitching, then the three busiest days are ringed.
- Sound: A pop pitched by count on hover. Quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "calendar-quilt",
  "title": "The Hualien earthquake made 3 April 2024 the year's busiest day for strong quakes",
  "subtitle": "Earthquakes of magnitude 4.5 or more worldwide, per day (UTC), 2024",
  "data": "/charts/calendar-quilt.data.json"
}
```

## Source
Earthquake Catalog (ComCat), events M4.5+ in 2024, US Geological Survey Earthquake Hazards Program (Public domain (US government data)), retrieved 2026-12-01: https://earthquake.usgs.gov/fdsnws/event/1/

Note: Counts include aftershocks, which is why one big quake can fill a day.

Live: /charts/calendar-quilt · Manifest: /charts/calendar-quilt.json · Tags: calendar, heatmap, daily, quilt, earthquakes, science
