As part of a paper I wrote, I utilized Tableau to generate a visual representation of plays ran by various NFL players. It turns out to be quite a simple thing to do, and appears more complex than it is.

The dataset comes from a Kaggle challenge located here, which provides data for 2 years of NFL seasons and provides detailed X,Y coordinates for each of the plays and players. With this information we can map the points on a standard scatter plot over time, and play connect the dots. In an effort to make things quicker, I parsed down the dataset to only include 2 players and the top 100 plays of each. The original dataset is approximately 76 million records (down to ~50k).

With a minimum of X,Y and Time, we plot the Sum(X) and Sum(Y) on Cols/Rows (making sure the X is on the columns). At this point you could add time to detail and you would see each point in time across a scatter plot. Note that I am filtering for only 1 person and 1 play.

However – if we change this to a line graph AND move the Time dimension to the Path card in Marks (what used to be Shape), it will connect the dots to create a realistic mapping.

Path is a very useful and frequently unknown function to beginners that is quite powerful. If you’ve ever seen a map of a hurricanes path or flight paths within Tableau, that’s probably what they are utilizing. The only thing left for us to do here is make our X,Y start/end a bit more realistic. Format the X axis and set the start/end to (0 – 120) and the Y to (0 – 50) to match a real football fields size.

You’ll notice when downloading the workbook that my football field background image is simply sitting behind the Play Sheet. All I’ve done is added an image and told Tableau to keep the original size (without scaling). Then I’ve added a floating sheet on top of it and lined up the edges. Obviously we don’t want the axis to show for the X,Y so I right click on them and uncheck “Show Header”. Notice below how the X-axis lines up to the image before I hide it.

And that’s about it, impress your friends and terrify your enemies. If you want to download the packaged Tableau workbook, you can do so here.