Unveiling the Viz: Brexit Decision Tree

Step 1:

My colleague introduced me to the visualisation below from Information is Beautiful about the different Brexit options:

I had always wanted to break down the Brexit situation and understand the different possibilities. So I was inspired to create something similar in Tableau.

Step 2

I wanted to see if this could be spatially represented and so I created “buffer zones” in Alteryx after I collected all the latitude and longitude of each country.

I ended up with something like this:

European Trade Groups created by buffer zones

However, I am was not convinced that this was the best way to visualise what I wanted. I began to re-think what I wanted to show. The thing that interested me the most in the visualisation published by David McCandless was to see what the different types of groups were in Europe and the different Brexit options for the UK.

So, I began to draw out different visualisations:

Different ideas for the visualisation

The idea of sigmoid decision tree surfaced and that was the one that stuck the most:

Step 3

Creating a sigmoid tree map:

Why do it?

A sigmoid tree map is a really good way of showing flow of movement or the different options from A to B.

I wanted to explore this idea by looking at the different options for Brexit and turn a complex topic into a simple and easy to understand chart.

When visualising your data, an important thing to always take into account is your audience. I wanted to create a visualisation that could communicate our Brexit journey.

How to do it?

  1. Structuring your data

To create the sigmoid curves, we need to create a path for each point using the sigmoid function.

Alteryx Workflow

This lays out what each part of the branch will be and where they need to be.

Category – This will be effectively used a unique key to identify each “branch” of your tree.

Label P1 and Label P2 – This will you too put this on your labels so that you know what each dot represents.

Position 1 label and Position 2 label – This will be important references for the calculations that we will use later.

Pos 1 and Pos2 – This will be where each part/dot will be plotted on the y axis. We need both pos 1 and pos 2 to create a start and end point for each sigmoid curve.

T and T2 will be used to create the points for each curve.

  1. Padding your data

We need to prepare our data before it gets put into Tableau. You can pad your data in Tableau as well, but I prefer to do most of my calculations in Alteryx so that I can experiment and change things around if need be.

This is my workflow in Alteryx, outlining some comments :

1)Generate Rows Tool

Sigmoid curves are essentially a bunch of points joined up together. Lots of people have experimented with the number of dots needed to create a smooth enough curve, and 49 was the optimal number. Therefore, for each branch, we are going to plot 49 points.

2) First Multi-Row Formula

This will create the gaps for each point on the curve on the x axis.

3) Regex formula x2

This will allow us to identify the level of each branch.

This is needed for the next few calculations.

4) Formula Tool

Currently our T value goes from -6 to 6. This will plot the points we need for each sigmoid curve.

However, every curve we are currently creating starts and ends at the same point.

But in order to go from L1 to L2, we need to have a different starting position.

For the 1st Level, we need to go from -6 to 6.

For the 2nd Level, we need to go from 6-18.

The gap between each level needs to be 12. It can be longer/shorter, but your curves might look a little weird.

This formula essentially gets me ready for the next formula that will enable me to update each level to have different starting and ending points.

5) Second Multi-Row Formula

The expression used in this formula box will allow us to create the different starting points needed for each level:

I’ve also stated that if pos 1 is before pos 2 then carry out the calculation, otherwise, just stay in the current starting position. This is because in my second tree map there is a part that goes back on itself, creating a more circular flow.

6) Third Multi-Row Formula

This will update the T2 value to go up every 0.25, but this time starting from the updated starting position. T2 differentiates from T1 because T1 will always go from -6 to 6, whereas T2 will have a different starting position depending on the level of each branch.

We then use the output tool to create a csv file we can use in Tableau.

Visualising your data

First we need to create some calculations in Tableau.

Calculation 1: Sigmoid Function
Calculation 2: Curve
Calculation 3: Points
Level Calculation for each level in your tree

Building the View

You need to re-create this view and make sure that your T2 field is counted as a “dimension” and not a “measure”. But it needs to be “continuous” so that we can draw a line across them.

Your marks shelf:

And there you go! You have your sigmoid curve tree branch!

Stages of the design process


This was me trying to experiment with creating leaves as part of the tree. However, even though it looked cool, I decided against it as it would be difficult to show each branch and the labels clearly.

First Draft

I got the main skeleton of the design done, but I was advised to use different trees to symbolise a more hopeful future to begin with in comparison to the current situation, where there is a high level of uncertainty and anxiety.

Also, notice that the whole tree looks different. You have different options to the final version.

This was because I needed to validate that the things I had written and understood of the Brexit problem was correct. It turns out that I missed some key points and there was a better version of visualising it. Hence, my final viz.

Final Draft

This is what I decided to go for in the end! After much deliberation and discussion with others, we finally settled on this view.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s