bref_daily_batter function

Scrape Batter Performance Data Over a Custom Time Frame

Scrape Batter Performance Data Over a Custom Time Frame

This function allows you to scrape basic batter statistics over a custom time frame. Data is sourced from Baseball-Reference.com.

bref_daily_batter(t1, t2)

Arguments

  • t1: First date data should be scraped from. Should take the form "YEAR-MONTH-DAY"
  • t2: Last date data should be scraped from. Should take the form "YEAR-MONTH-DAY"

Returns

Returns a tibble of batter performance with the following columns:

col_nametypes
bbref_idcharacter
seasoninteger
Namecharacter
Agenumeric
Levelcharacter
Teamcharacter
Gnumeric
PAnumeric
ABnumeric
Rnumeric
Hnumeric
X1Bnumeric
X2Bnumeric
X3Bnumeric
HRnumeric
RBInumeric
BBnumeric
IBBnumeric
uBBnumeric
SOnumeric
HBPnumeric
SHnumeric
SFnumeric
GDPnumeric
SBnumeric
CSnumeric
BAnumeric
OBPnumeric
SLGnumeric
OPSnumeric

Examples

try(bref_daily_batter(t1="2015-05-10", t2="2015-06-20"))