FM21: How to create a Beeswarm in Tableau

Steinkelsson
4 min readFeb 19, 2021

--

1.The raw data

Similar to my piece on how to create a squad profile visualisation you will need to import the data from FM in order to import it as a data source in Tableau.

If you aren’t familiar with doing this then please click on the above link and follow the initial steps.

2. Dimensions and Measures

After you connected your data source to Tableau worksheet it is important to firstly ensure that it is showing under the correct labels, all the metrics (numerical data) will need to be displaying as measures and the player club, name etc (character data) as dimensions.

If Tableau hasn’t converted them correctly this can easily be changed.

How to change data labels

When you link Tableau to a data source it enables you to change the data type, to do this simply right click on the Abc or # symbol and change to either string for all dimensions or number decimal for the measures.

3. Making the bins

Ok so from the statistic which you’d like to create a bee swarm you will need to make bin dimension.

Here I have selected minutes played for my example, leave the size of bins as suggested, but later you can change it if needed.

You will then need to place the Mins(bin) on detail and Name on detail and in rows(or columns based on what type you want horizontal or vertical) you need to put Mins.

It should look like this which is basic scatterplot, note I have also changed the Marks tab to circle.

4. Time to jitter the dots

To do this simply right click under Measures or Dimensions and select Create calculated field.

This calculation will then need to be named, you can call this anything you’d like…I have gone for Axis. There you need to put this formula:

IF INDEX()%2=0 THEN INDEX()-1 ELSE INDEX()*-1+1 END

The newly created Axis measure can then be moved to the columns tab then put Axis measure in Columns and you get this.

5. Sorting the data

You will be pleased to know that we are nearly there, like any Visualisation you will want to make the data look nice and shiny, to make you look like a pro!

To do that we right click on Axis in Columns and then click on Edit table calculation.. .which will present you with the following window.

Here you will need to click on Specific Dimensions then only tick Name and choose Custom in sort order.

After that in drop down menu choose Mins and Average and at last choose Ascending. You get this.

This is your final bee swarm, however again the aesthetics can be improved,

In order to create my final visualisation I opted to do the following;

Size — amend the size of the circles

Label — labelled the name mark

Colour — changed the colour and borders

Format the bee swarm by removing the grid lines.

--

--