Visualize major league pitching data with PitchRx

February 19, 2013
By

(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 his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: 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.