Description Usage Arguments Examples
This function allows you to query Statcast and PITCHf/x data as provided on http://baseballsavant.mlb.com and have that data returned as a data.frame
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | scrape_statcast_savant(start_date = Sys.Date() - 1,
end_date = Sys.Date(), playerid = NULL, player_type = "batter",
...)
## S3 method for class 'Date'
scrape_statcast_savant(start_date = Sys.Date() - 1,
end_date = Sys.Date(), playerid = NULL, player_type = "batter",
...)
## Default S3 method:
scrape_statcast_savant(start_date = Sys.Date() - 1,
end_date = Sys.Date(), playerid = NULL, player_type = "batter",
...)
scrape_statcast_savant_batter(start_date, end_date, batterid, ...)
scrape_statcast_savant_batter_all(start_date, end_date, ...)
scrape_statcast_savant_pitcher(start_date, end_date, pitcherid, ...)
scrape_statcast_savant_pitcher_all(start_date, end_date, ...)
|
start_date |
Date of first game for which you want data. Format must be in YYYY-MM-DD format. |
end_date |
Date of last game for which you want data. Format must be in YYYY-MM-DD format. |
playerid |
The MLBAM ID for the player whose data you want to query. |
player_type |
The player type. Can be |
... |
currently ignored |
batterid |
The MLBAM ID for the batter whose data you want to query. |
pitcherid |
The MLBAM ID for the pitcher whose data you want to query. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Not run:
correa <- scrape_statcast_savant(start_date = "2016-04-06",
end_date = "2016-04-15", playerid = 621043)
noah <- scrape_statcast_savant(start_date = "2016-04-06",
end_date = "2016-04-15", playerid = 592789, player_type = 'pitcher')
daily <- scrape_statcast_savant(start_date = "2016-04-06", end_date = "2016-04-06")
## End(Not run)
## Not run:
correa <- scrape_statcast_savant_batter(start_date = "2016-04-06",
end_date = "2016-04-15", batterid = 621043)
## End(Not run)
## Not run:
daily <- scrape_statcast_savant_batter_all(start_date = "2016-04-06",
end_date = "2016-04-06")
## End(Not run)
## Not run:
noah <- scrape_statcast_savant_pitcher(start_date = "2016-04-06",
end_date = "2016-04-15", pitcherid = 592789)
## End(Not run)
## Not run:
daily <- scrape_statcast_savant_pitcher_all(start_date = "2016-04-06",
end_date = "2016-04-06")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.