powered by
This function allows you to query Statcast and PITCHf/x data as provided on baseballsavant.mlb.com and have that data returned as a dataframe.
scrape_statcast_savant_batter(start_date, end_date, batterid)
Date of first game for which you want data. Format must be in YYYY-MM-DD format.
Date of last game for which you want data. Format must be in YYYY-MM-DD format.
The MLBAM ID for the batter who's data you want to query.
# NOT RUN { scrape_statcast_savant_batter(start_date = "2016-04-06", end_date = "2016-04-15", batterid = 621043) # }
Run the code above in your browser using DataLab