3

Workout Wednesday 2019 Week 3 – Rugby League

 3 years ago
source link: https://datavis.blog/2019/01/17/wow2019w03-rugby-league/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Workout Wednesday 2019 Week 3 – Rugby League

wow2019w03-header-1.png?w=1020

This week’s #WorkoutWednesday from Lorna Eden looked at the 2018 Rugby season, showing:

  • Home wins, draws and loses
  • Away wins, draws and loses
  • A running total of all wins, draws and loses

When I first looked at the challenge, I thought all the elements might be in one dual-axis chart and I was fairly sure at least that the upper and lower lollipop charts would be on the same axis, but, as ever in these #WorkoutWednesday challenges, things are not always as they appear and there’s always something new to learn.

The image below shows how I quickly discovered that a single dual-axis chart was not going to get me to the finish line as I need another Marks card for the running sum line chart that will go between the lollipop charts:

01-dual-axis.png

I thought about making a separate transparent sheet for the running sum line charts and floating that to appear in the middle of the above lollipops, but realised that, with the legend sheet, that would make 3 charts and the requirements specified 2 sheets only.

The only other way was to split the charts up – i.e. separate charts for the upper and lower lollipops, one for the line charts and possibly one more for the headers (if these didn’t easily go onto the upper lollipop).

Stepping back for a second, below are the calcs I created to obtain a score for each type of result (win, lose, draw) and then modifying that score for home or away (so the Home score would point up and Away score point down):

02-early-calcs.png

Just filtering to one team for now and not focusing on colours or formatting, below is the first iteration:

02-3-charts-1.png

Next I needed calcs for the headers: % Wins, % Losses, % Home Wins etc. A few examples are below. The others follow a similar format and can be explored in the downloadable workbook

03-total-games.png
Total Games calculation
04-total-wins.png
% of Total Wins calculation
05-home-wins.png
% of Home Wins calculation

Next I created a dummy axis on the Rows shelf using MIN(1) and added all the calcs I needed for the header to the Labels shelf:

06-header-labels-card.png

Then rearranged and formatted these as required:

07-formatted-header.png
Formatted Label on dummy axis

Next up was to fix the colour scheme, after which things started to take shape:

08-fix-colours.png

Then some more formatting – removing headers and so on – and adding tooltips. One note on the tooltips for the line charts: because I used a Running Total calculation for these, when I added them to the tooltip Marks card they display with the full calculation, as below:

09-tootltip.png

To fix this, I renamed the aliases for Measure Names by right clicking on the Measure Names pill on the Marks card and selecting “Edit Aliases…”:

10-edit-aliases.png

The cropped image below shows the 3 measures that I changed the alias for. The * in the second column indicates that the alias has been changed:

11-edit-aliases.pngEditing the aliases for Measure Names

The tooltips then display as required:

12-after-edit-alias.png

The final step was was to remove the Team Name filter so data for all 12 teams would be included and create a trellis to show all 12 teams in a grid. This is done by creating Row and Column calculations along with some mysterious magic in regards to how the table calculations are configured for the Row and Column calculations, which I admit can be a case of trial and error at times (for me at least) to get the desired effect.

The whole trellis process in Tableau really deserves its own blog post… and fortunately there are a number of blog posts on the subject, such as these two very fine examples:

Tableau Modulo operator and its use in dividing your sheet into multiple grids

Understanding the calculation fields for constructing a trellis chart in Tableau

For the legend, I simply copied the main sheet and filtered to one team. Annotations for the legend were added in the dashboard as tiled text objects.

Click the image below to open the workbook on Tableau Public:

wow2019w03-rugby-league.png
Final visualisation – click the image to view and interact

Thanks for reading. If you have any feedback, please let me know!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK