Visualize major league pitching data with PitchRx
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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)
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.