Visualize major league pitching data with PitchRx

February 19, 2013

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Anyone interested in playing around with the data generated by the PITCHf/x cameras at major league baseball games should definitely check out the pitchRx package from Carson Sievert. Major League Baseball Advanced Media makes the data available for download, and this package provides an interface from R to the speed, position and pitcher data for just about every MLB pitch. This introduction to the pitchRx package provides details on how to grab data, subset data by pitcher or team, and visualize strike zones. But one of the coolest things you can do is create animations, like the one below of every 'four-seam' and 'cutting' fastballs thrown by Mariano Rivera and Phil Hughes during the 2011 season:

If you're a baseball fan, this package will be a blast to play with. Download it from CRAN now (or just type install.packages("pitchRx") in R), and try some of the examples from the link below.

PitchRx: Collecting PITCHf/x Data (via the author)

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training


CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)