The Sankey diagram in Looker Studio

The Sankey diagram shows how a dimension is distributed and flows, tracing multiple paths indicating where the data is moving. The thickness of these links represents the weight of the relationship, based on the selected metric.

In this post, we’ll look at an example using the Sankey diagram and explore its configuration options.

Remember, visit the post on how to add charts to your report in Looker Studio, if you need a refresher.

1. Example

We’ll use the same data from the posts about maps, which is the H&M store dataset.

In this example, I want to show how to visualise the relationship between continents and cities with the highest number of H&M stores. Choose Continent and Country as the dimensions, and Record count as the metric.

Here is the resulting Sankey diagram with Continent and Country as dimensions, and the number of stores (Record count) as the weight metric.

2. Chart-Specific Customisation Options

The Sankey diagram has a default row limit of 500. Lower it to 20 to make the relationships clearer. This will display the top 20 countries with the most stores, meaning the destination dimension values with the greatest weight in the selected metric.

Here is our Sankey diagram with 20 rows, using Continent and Country as dimensions, and Record count as the weight metric.

The thickness of the link between the name of the continent and the country indicates the value of the metric (Record count). You’ll notice that Europe has more stores than North America, but if you look at it by city, the thickest link is from North America to the USA. The USA has the most H&M stores (532 in our dataset).

You can change the dimensions to see the relationship between Country and City.

In this example, all countries except China have a one-to-one relationship, where their capital or one of their major cities is in the top 20 with the most stores. China, aside from having Beijing in the top 20, also includes Shanghai, Guangzhou, and Shenzhen.

What other example would you use for the Sankey diagram? Do you have one you could share?

Leave a Comment