Abstract
XML2R is a framework that reduces the effort required to transform XML content into tables in a way that preserves parent to child relationships. pitchRx applies XML2R’s grammar for XML manipulation to Major League Baseball Advanced Media (MLBAM)’s Gameday data. With pitchRx, one can easily obtain and store Gameday data in a remote database. The Gameday website hosts a wealth of XML data, but perhaps most interesting is PITCHf/x. Among other things, PITCHf/x data can be used to recreate a baseball’s flight path from a pitcher’s hand to home plate. With pitchRx, one can easily create animations and interactive 3D scatterplots of the baseball’s flight path. PITCHf/x data is also commonly used to generate a static plot of baseball locations at the moment they cross home plate. These plots, sometimes called strike-zone plots , can also refer to a plot of event probabilities over the same region. pitchRx provides an easy and robust way to generate strike-zone plots using the ggplot2 package.
Highlights
What is PITCHf/x?PITCHf/x is a general term for a system that generates a series of 3D measurements of a baseball’s path from a pitcher’s hand to home plate (Alt and White, 2008).1 In an attempt to estimate the location of the ball at any time point, a quadratic regression model with nine parameters is fit to each pitch
The website that provides these estimates is maintained by Major League Baseball Advanced Media (MLBAM) and hosts a wealth of other baseball related data used to inform MLB’s Gameday webcast service in near real time
Using the add_key function, the relevant value of num for game//inning observations can be recycled to its XML descendants
Summary
What is PITCHf/x?PITCHf/x is a general term for a system that generates a series of 3D measurements of a baseball’s path from a pitcher’s hand to home plate (Alt and White, 2008).1 In an attempt to estimate the location of the ball at any time point, a quadratic regression model with nine parameters (defined by the equations of motion for constant linear acceleration) is fit to each pitch. The inning_all.xml file contains the PITCHf/x data for that game. The pitch table is extracted from files whose name ends in inning_all.xml.
Published Version (Free)
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have