# Scatter with a trend

> Use a scatter with a fitted line when you want to state how strongly two measures move together, and show who sits far from the trend.

- Data type: Several measures per item (`relationships`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`relationships`)
- Example: **Meat eating rises with income, but South Asia eats far below the line and Mongolia far above** (Meat supplied for eating per person (kg a year) and GDP per person (international $, PPP), 2022, 180 countries)
- How to read it: Each dot is a country; the line is the least-squares fit of meat on log income, and r says how tightly the dots follow it.
- Phone: Not recommended for mobile (On a phone labels are hard to read or overlap (checked by eye)) · Video formats: 16:9 (best 16:9)

## Use it when
- you want to state the strength of a relationship with a number
- the gaps to the trend (residuals) are interesting
- 30 to a few thousand items

## Avoid it when
- the relationship is clearly curved or in clusters (a straight line misleads)
- a few extreme points drive the fit
- readers may read the line as cause and effect

## Fields (data.json)
- `country` (category): the item
- `continent` (category): a group (kept with the data; not drawn)
- `gdp` (number, unit "USD", format currency): GDP per person, international $ at 2021 prices (PPP)
- `meat` (number, unit "kg", format decimal): meat available for eating per person, kg a year

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 dot to read its gap to the trend
- Show gaps to the trend draws every residual
- Motion: Dots fade in, then the trend line draws from left to right and the r value appears.
- Sound: Pops on hover, higher above the trend and lower below it. 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": "trend-scatter",
  "title": "Meat eating rises with income, but South Asia eats far below the line and Mongolia far above",
  "subtitle": "Meat supplied for eating per person (kg a year) and GDP per person (international $, PPP), 2022, 180 countries",
  "data": "/charts/trend-scatter.data.json"
}
```

## Source
Meat supply per person; GDP per capita, PPP, Our World in Data (FAO Food Balances; World Bank) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/meat-supply-per-person

Note: Supply is meat available for eating, not what is actually eaten; it includes waste at home. The fit uses log10 of GDP; r is Pearson's.

Live: /charts/trend-scatter · Manifest: /charts/trend-scatter.json · Tags: trend line, regression, correlation, r value, residuals, food, meat, income
