Creating Shot Maps - Tableau
Tableau is becoming an increasingly popular tool for analysing football. The first graphic football analysts learn is usually a shot map, the simplicity makes it easy to see why.
The Dataset
Prior to working on any vizualisations it is essential to understand your data. What does each header mean? What data do you need? What data don’t you need?
I’m using the dataset of WSL Shots from 2018/19-2020-21. In the dataset we see our shot coordinates in the form of X, and Y values. We also have shot information, the shot outcome, and details about the shot taker with the Player Name and Team Name.
Working within Tableau
Drag X - > Columns & Drag Y -> Rows
Once you have connected to your dataset in Tableau the first thing to do is drag ‘X’ -> ‘Columns’ and then ‘Y’ -> ‘Rows’. This produces this view. This view shows the point that you would get if you added together all ‘X’ values and all the ‘Y’ values. We haven’t told Tableau what to focus on at the moment so it defaults to adding together the values, This is easily fixed though.
In Analysis - > Turn off Aggregate Measures
This new view shows every shot in the dataset at once, chaotic right? Our job now is to make that data as readable as possible.
Double Click the X Axis -> Change Automatic to fixed -> Set a fixed start and end dependent on your data.
Double Click the Y Axis -> Change Automatic to fixed -> Set a fixed start and end that shows the full width of the pitch.Also, click reversed!
To start with, The range of values used to measure the pitch are 0-80 and 0-120. I have set my Y Axis (Height) to 0-80 and then for the X-Axis (Width) my range is set as 75-120 so it shows the final third. We have to reverse the Y-Axis because 0-0 usually occurs in the bottom left however on a football field we have 0-0 in the top left.
If we know the pitch border values we can add a background to the graphic, this gives more context on exactly where the shot took place.
In “Map” -> “background images”. Set a Background
Drag Team - > “Colour”
On the right of the graphic a “card” should now appear showing the colours of selected team, if you press the down arrow in the top right corner of this card you will then be able to edit the colours
Change “Marks” from Automatic -> Circle
Drag Match ID - > “Filter “
Your graphic should now look like the below, for the intent of producing something, this can be the end, however there are still ways to improve our shot maps and make them aesthetically pleasing and more consumer friendly.
Right-click both axis and take off ‘show header’,
Secondly, by double-clicking on the sheet along the bottom taskbar, we can change the sheet name, in this case, I’ve gone for ‘Shot Map’. This will update the title above the graphic. If we double-click that title a box will appear to edit it . Clicking the insert button then adding the ‘Match Id’ will allow you to dynamically change the title by filtering to a different match.
Drag xG over Size.
To calibrate, click the drop-down arrow on the xG Size pop-up(on the right) then set the start value at 0 and the end value at 1.
This gives a consistent scale for xG.
Click Colour and edit the border and halo colour.
Edit Tooltip
I have applied these principles to a new background which you can see below.
Final Graphic: