# Lollipop

> Use a lollipop to rank items like a bar chart with less ink, so the values (the dots) stand out.

- Data type: Values per item (`compare`)
- Free (MIT): install with `npx chartreuse add lollipop`, or registry item `/r/lollipop.json`
- Example: **People born in the US have won more Nobel prizes than those born in the UK, Germany and France combined** (Nobel prizes won by people, by country of birth (today's borders), 1901–2026, top 12)
- How to read it: Each stem is one country; the dot's height is the number of prizes won by people born there, and the dashed line is the UK, Germany and France added together.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- ranking 6 to 20 items by one count or amount
- many bars would look heavy, or values are close
- you want the exact value to be the focus

## Avoid it when
- small differences between similar values must be judged exactly (use bars with a common baseline)
- values can be negative (use diverging bars)
- only two or three items (use a face-off or a big number)

## Fields (data.json)
- `people` (number, unit "laureates", format count): laureates in the source with a known birth (people, not organisations)
- `rows` (id): list of { country, prizes }
- `country` (place): country of birth, by today's borders
- `prizes` (number, unit "prizes", format count): Nobel prizes won by people born there (a laureate with two prizes counts twice)

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 lollipop to read its count
- Motion: Stems grow and each dot drops in from above, bouncing once as it lands, left to right.
- Sound: A pop 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": "lollipop",
  "title": "People born in the US have won more Nobel prizes than those born in the UK, Germany and France combined",
  "subtitle": "Nobel prizes won by people, by country of birth (today's borders), 1901–2026, top 12",
  "data": "/charts/lollipop.data.json"
}
```

## Source
Nobel Prize laureates (API v2.1, birth place: countryNow), Nobel Prize Outreach (CC0 1.0), retrieved 2026-12-01: https://api.nobelprize.org/2.1/laureates

Note: Country of birth uses today's borders, so a laureate born in a city that has since changed country counts for its country today; organisations are left out.

Live: /charts/lollipop · Manifest: /charts/lollipop.json · Tags: lollipop, ranking, Nobel prize, science, history, count
