statsapi_pbp | R Documentation |
Acquire pitch-by-pitch data for Major and Minor League games via the MLB api http://statsapi.mlb.com/api/
statsapi_pbp(game_pk)
game_pk |
The date for which you want to find game_pk values for MLB games |
Returns a data frame that includes over 100 columns of data provided by the MLB Stats API at a pitch level.
Some data will vary depending on the park and the league level, as most sensor data is not availble in minor league parks via this API. Note that the column names have mostly been left as-is and there are likely duplicate columns in terms of the information they provide. I plan to clean the output up down the road, but for now I am leaving the majority as-is.
Both major and minor league pitch-by-pitch data can be pulled with this function.
## Not run: statsapi_pbp(575156)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.