This post runs as a complimentary blog to the guest post found on the Flerlage Twins website. This will look to extend on learnings from the current tournament bracket, and how we can create a radial version.
The template will look to cover a 64 knock-out teams scenario. The way it works is all players/teams are a starting point on the outer-most edge of the circle. The closer the team gets to the centre, the further they have progressed in the tournament. The winner is the centre point of the circle.
If you haven’t already, please check out my recent guest spot on the Flerlage Twins site, here! It’s a real honour to be featured on their site. Kevin and Ken are such a driving force for the community, making Tableau accessible to individuals of all levels. The guest post builds on the foundations of Kevin’s original bump chart, to allow users to input their own results and build a tournament bracket. There are currently three variations to choose from.
Today I’m going to be introducing a fourth, radial, variation. I’m pleased to say this tutorial will only require 4 calculations!
A small disclaimer before we start, like most my blog posts so far….this doesn’t necessarily show best practice, and probably lacks many user cases. Personally, I like how it condenses the points to all all in one view, as well as creating a nice looking geometric effect.
It seems only right to plug the #SportsVizSunday initiative here. Kate, Simon, Chris, Spencer and James are great ambassadors, role models and inspirations both in the community, and for the initiative. I am so pleased to see how they showcase talent of different authors through the weekly blogs found here.
The team produce new datasets each month to pull insights from. You can find some of the previous sports datasets here. What a great driving force for sports and data! Thanks guys.
Onto the tournament bracket! If you’d like to follow along, download a copy of the original files, here.
The file contains two tabs.
The first tab is the bracket to be populated. All you need to do is use the drop downs to fill in your team or player names until the final. Be sure to fill in the full bracket, including the winner slots. The drop down is there for convenience so that you don’t get any issues with miss spelling the same persons name between rounds!
The second tab named ‘data’ will be what we connect to in Tableau, it auto populates the dataset from bracket. Feel free to take a look at it to understand how it works, but i don’t think it’ll need much in terms of amendments. You will see that each sequential round takes the mid-points of the previous games ranks.
Here is an example of the data once in Tableau.
The first is the radius of each round being plotted.
- Distance From Centre
IF [Time] = 1 THEN 6.3
ELSEIF [Time] = 2 THEN 5.3
ELSEIF [Time] = 3 THEN 4.3
ELSEIF [Time] = 4 THEN 3.3
ELSEIF [Time] = 5 THEN 2.3
ELSEIF [Time] = 6 THEN .21
ELSEIF [Time] = 7 THEN -1
Explanation: Where time is equal to 1 this is the first round, these marks need to be shifted the furthest out. As time increases it moves through the 2nd, 3rd, Quarter final, Semi Final and Final. You can play around with these values at the end to make different styles. Just make sure as Time increases, your values decrease. Check out the below variations, but for now use the above calculation as default.
2. Modified Calc
Explanation: We need this calculation as within the original dataset the ranks go up to 128. (This is 64 teams with a space of 1 in between)
// Making the X points radial
([1. Distance From Centre]+1) * COS([2. Modified Calc] * 2 * pi())
//Making the Y points radial
([1. Distance From Centre]+1) * sin([2. Modified Calc] * 2 * pi())
Explanation: The X & Y use sin and cos functions to make the visualisation radially.
Drag Y onto Columns – Make sure it is a dimension.
Drag X onto Rows – Make sure it is a dimension.
Drag the X pill again onto Rows. Make the axis dual axis, and synchronise the axis.
On the Marks card, go to the first X shown.
Change the mark to a Line.
Drag Dimension onto detail.
Drag Time onto Path. Make sure it is a dimension.
Go to the Second X Mark Card.
Make this a Circle.
Perfect! This is now our finished shape.
We now need to sort the colouring and tooltips.
Go to the Marks (All) Card.
Drag Dimension onto Colour.
You may now see that some of the circle colours show on top for some of the losing players/teams.
We can correct this by sorting by field. You will want to sort: Field name Time, aggregation Maximum Sort Order descending. This will allow for the winning team in each scenario to be circle colour shown on top.
You may wonder why there is one null value? Within the original data I include a row where Time = 8 that we do not use in 1.distance calculation. This is solely because i want the final dot to be the winner colour (maximum Time calculation). We do not use Time = 8 in any of our calculations. Do not filter it out, just hide the indicator.
Tooltips: We can tidy these up to have just the dimension (Team/Player) , and Actual Time (What stage of the tournament was reached). Drag both these fields onto Tooltip on marks All. Feel free to add in any other tournament details!
If you want, you can go back into the original data set (data tab) to amend the bracket to say Runner-Up and Winner where Time = 7. This will allow the user to know which player or team won the final match!
& That’s a wrap! We have finished the Radial Tournament Chart.