Skip to main content

Free · runs in your browser · no sign-up

Bubble chart race

Every item moves through time in two dimensions at once, its bubble sized by a third value: the classic wealth-and-health story, made from your own table.

Make a bubble chart race

It opens with sample data playing. Swap in yours whenever you like.

CSV, Excel or JSON · or drop a file here · nothing is uploaded

A bubble chart race is an animated scatter plot: each item is a bubble placed by two measures, sized by a third, and moving as the years pass. Open the Wealth and health template below to see thirty countries’ income and life expectancy from 1990 to 2022, sized by population and coloured by region.

To use your own data, you need one value per row: a period column, a name column, and number columns for X, Y and (optionally) size, plus a category for colour if you like. The Data step reads that layout automatically; under Columns you choose which number is X, which is Y and which is the size.

How to make an animated scatter plot

  1. Open the template

    Select Open the Wealth and health template, or choose Bubbles under Pick a chart to start.

  2. Bring a long table

    In Data, use Open a file or Paste data with columns like Year, Country, Region, Income, Life expectancy, Population.

  3. Assign the columns

    Under Columns, set Period, Name, Value (Y), X (bubbles), Size (bubbles) and Category (colours).

  4. Choose the scale

    In Chart, turn on Log scale for X for values that span several powers of ten, and Trails to draw each big bubble’s path.

  5. Export

    In Export, choose the format and press Export video.

Reading the chart

Bubble area, not radius, is proportional to the size value, so a country with twice the population has a bubble with twice the area. The biggest bubbles are drawn first and smaller ones on top, each with a thin edge so overlapping bubbles stay distinct.

Names are shown on the largest bubbles that have room; others go unlabelled rather than piling up. The year sits large and faint behind the bubbles.

When to use a log scale

Income, population and company size often range from hundreds to hundreds of thousands. On a linear axis, most bubbles crowd into a corner; Log scale for X gives each tenfold step the same width, which is why the Wealth and health template uses it.

Bubble chart race questions

Is this the same as a Gapminder chart?

It’s the same idea: items moving in X and Y over time, sized by a third measure. The data and the look are your own.

Do I need a size column?

No. Without one, every bubble is the same size and the chart becomes an animated scatter plot.

My data has a column per year. Will it work?

A bubble race needs X and Y for every item in every period, so it has to be one value per row. Reshape it in your spreadsheet (or use a race or line chart for a single measure).

Can I colour bubbles by group?

Yes. Set Category (colours) in the Columns section and choose Category under Colour by; a legend appears.

Where does the sample data come from?

The World Bank’s World Development Indicators (CC BY 4.0): GDP per person (PPP), life expectancy at birth and total population.