Every Pitch of the 2014 MLB Season Visualized in Tableau

Data

Every Pitch of the 2014 MLB Season Visualized in Tableau

As a data geek, it’s hard not to be drawn in by a sport like Major League Baseball with such rich statistics readily available. I wasn’t very interested in the game until I discovered how simple it is to collect and analyze data on every player, pitch and play. This dashboard is the result of my discovery:

Getting the Data

All the data for this viz comes from PITCHf/x, a tracking system installed in every MLB stadium. Fangraphs has an excellent overview of it and how to interpret the data.

An easy way to get data in bulk is the pitchRx package for R by Carson Sievert. I followed the examples he gave for downloading it into a SQLite database. You will need to install a SQLite ODBC driver to get it from there into Tableau.

Bonus Tip: Smooth Colors With Halftone Custom Shapes

To create the heat map, I used a custom shape that provides a smooth transition between differently-colored overlapping marks. Since Tableau doesn’t recognize gradient transparency in custom shapes, we can use halftones (altering the size and spacing of small dots) to achieve the same result. This concept was first used in black-and-white printing to create the impression of gray scales. In Tableau, it creates a “fade” effect on each mark.

The pitching visualization uses the circular halftone below. Download the image and follow the steps here to use it in your own dashboards.

Radial Gradient Halftone

 

More About the Author

Robert Rouse

Analytics Consultant
Disney Data & Analytics Conference 2019 in Review At Disney World, every park has a theme. What you may not know is that their annual data and analytics conference has a theme, too. In ...
A Template for Date Calculations in Tableau The most common calculations I make in Tableau are date-related. I’ve made hundreds of them with variations for year-over-year, ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072