Skip to main content

Symon.AI help center

Sankey

A Sankey chart is great to use when visualizing the flow between sets of values. A more complex Sankey will have multiple levels. To build a Sankey chart in Symon.AI, we require 3 pieces of information:

  • From - First column of the Sankey chart

  • To - Final column of the Sankey chart

  • Value - Numerical

Sankey.svg

To create a Sankey diagram, you need to have data segmented into categories.

Caution

You cannot create a Sankey diagram with cyclical values. The From and To fields cannot contain the same values if they would flow into each other. Put another way, if a value would flow from one category into the same category, this will cause an error.

When to use this tool

Use a Sankey diagram when you want to show how values map between two categories.

Example

You could use a Sankey chart to show how budget categories flow into different departments. This is a simple example with only a few categories, but you can use Sankey diagrams to show complex value flows. Our example data set looks like this:

Department

Budget (in thousands)

Category

Sales

80

Personnel

Sales

40

IT

Sales

20

Misc.

Development

120

Personnel

Development

67

IT

Development

30

Misc.

Support

75

Personnel

Support

45

IT

Support

12

Misc.

HR

72

Personnel

HR

20

IT

HR

10

Misc.

When we create a Sankey diagram using this data, we can show how each department's budget flows into the different categories. We can easily see which departments are spending the most in each category and how much of our total budget each category represents.

Sankey_from-to.png

Creating a Sankey diagram with more than 2 columns

Tip

When creating a Sankey diagram with more than 2 columns, it is helpful to do some planning in advance, and consider how to organize your data set.

For example, below is a sample data set. Investigate and think about how A flows to B, and then B to C. Map and write that down before listing the ribbons below A.

Table 36. Sample sankey dataset

From

To

Value

A1

B1

4

A1

B2

2

A2

B1

1

A2

B2

3

A3

B1

2

A3

B2

1

B1

C1

2

B1

C2

2

B1

C3

3

B2

C1

2

B2

C2

4



This dataset will illustrate this Sankey diagram:

Screen_Shot_2021-02-05_at_7_46_02_AM.png

Troubleshooting Sankey diagrams

If you're having trouble creating a Sankey diagram, it could be because you have cyclical values in your data set.

The easiest way to create a Sankey diagram without errors is to ensure you have distinct values for each category. The categories you define are used in the From and To fields when you configure the visualization.

Let's look at this example data set:

Department

Budget (in thousands)

Type

Sales

80

HR

Sales

40

IT

Sales

20

Misc.

Development

120

HR

Development

67

IT

Development

30

Misc.

Support

75

HR

Support

45

IT

Support

12

Misc.

HR

72

HR

HR

20

IT

HR

10

Misc.

 

In this sample data set, we do not currently have distinct categories. We are using HR as a category in both the Department column and the Type column. If we try to create a Sankey diagram with these values, we'll get an error.

Trying to configure a Sankey diagram with cyclical values results in this error: Data cannot have cycle between From and To values.

We can fix this by using the Replace tool to change the HR value to a different value in one of the columns.

Use the Replace tool to change the HR value to Personnel in the Type column.

With this change, we can now successfully create a Sankey diagram.

With distinct values, we can successfully configure a Sankey diagram. The configuration is: the From field is Department, the To field is Type, and the Value field is Budget.