# Share or count

> Use a share-or-count switch when the same parts tell two stories: raw counts show the scale, % of total shows who dominates.

- Data type: Shares of a total (`parts`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`parts`)
- Example: **The US launched 82% of everything sent into space in 2025, up from 47% in 2015** (Objects launched into space by country, 2015 and 2025; count, or % of that year's total)
- How to read it: Each pair of bars is one country in 2015 and 2025; Count shows how many objects, % shows its share of that year's launches.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- totals differ a lot between groups or years, so counts hide the mix
- readers ask both 'how many' and 'what share'
- 2 to 10 parts

## Avoid it when
- only one of the two questions matters (show just that)
- the parts don't add to a total
- many parts or years (use small multiples)

## Fields (data.json)
- `year` (year): the launch year
- `parts[].country` (category): the launching country, or everyone else
- `parts[].objects` (number, unit "objects", format count): objects launched into space (satellites, probes, crewed spacecraft)

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 bar to read the count and the share
- the Count and % buttons rescale the same bars
- Motion: Bars grow on entry; switching views slides every bar and counts its label to the new value, so the eye tracks one bar across both views.
- Sound: A whoosh on each switch; 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": "share-or-count",
  "title": "The US launched 82% of everything sent into space in 2025, up from 47% in 2015",
  "subtitle": "Objects launched into space by country, 2015 and 2025; count, or % of that year's total",
  "data": "/charts/share-or-count.data.json"
}
```

## Source
Yearly number of objects launched into outer space, Our World in Data (United Nations Office for Outer Space Affairs) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/yearly-number-of-objects-launched-into-outer-space

Note: The top five countries are those of 2025.

Live: /charts/share-or-count · Manifest: /charts/share-or-count.json · Tags: share, count, percent of total, toggle, bars, space, satellites, technology
