Learn R Programming

⚠️There's a newer version (1.8.2) of this package.Take me there.

pitchRx (version 1.3)

Tools for Harnessing MLBAM Gameday data and Visualizing PITCHf/x

Description

With pitchRx, one can easily obtain Major League Baseball Advanced Media's Gameday data (as well as store it in a remote database). The Gameday website hosts a wealth of data in XML format, 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.

Copy Link

Version

Install

install.packages('pitchRx')

Monthly Downloads

71

Version

1.3

License

MIT + file LICENSE

Maintainer

Carson Sievert

Last Published

April 4th, 2014

Functions in pitchRx (1.3)

getSnapshots

Produce time sequenced pitch locations from PITCHf/x parameters
pitchRx

PITCHf/x package
strikeFX

Visualize PITCHf/x strikezones
makeUrls

Construct Gameday urls based on some parameters.
scrape

Scrape Major League Baseball's Gameday Data
scrapeFX

Scrape Major League Baseball's PITCHf/x Data
pitches

Sample PITCHf/x Data Set
animateFX

Animate PITCHf/x
export

Export (append) a data.frame to a remote table in a database.
urlsToDataFrame

Parse XML files into data frame(s)
fields

Master list of tables and fields returned by scrape
gids

All Gameday IDs from 2008-2013
interactiveFX

Use rgl to visualize PITCHf/x
players

All MLB players from 2008-2012