Skip to contents

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

Usage

bref_daily_pitcher(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"

Value

Returns a tibble of pitcher performance with the following columns:

col_nametypes
bbref_idcharacter
seasoninteger
Namecharacter
Agenumeric
Levelcharacter
Teamcharacter
Gnumeric
GSnumeric
Wnumeric
Lnumeric
SVnumeric
IPnumeric
Hnumeric
Rnumeric
ERnumeric
uBBnumeric
BBnumeric
SOnumeric
HRnumeric
HBPnumeric
ERAnumeric
ABnumeric
X1Bnumeric
X2Bnumeric
X3Bnumeric
IBBnumeric
GDPnumeric
SFnumeric
SBnumeric
CSnumeric
POnumeric
BFnumeric
Pitnumeric
Strnumeric
StLnumeric
StSnumeric
GB.FBnumeric
LDnumeric
PUnumeric
WHIPnumeric
BAbipnumeric
SO9numeric
SO.Wnumeric
SO_percnumeric
uBB_percnumeric
SO_uBBnumeric

Examples

# \donttest{
  try(bref_daily_pitcher("2015-05-10", "2015-06-20"))
#> ── MLB Daily Pitcher data from baseball-reference.com ──────────────────
#>  Data updated: 2024-04-13 21:54:16 UTC
#> # A tibble: 511 × 46
#>    bbref_id season Name    Age Level Team      G    GS     W     L    SV
#>    <chr>     <int> <chr> <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 salech01   2015 Chri…    26 Maj-… Chic…     8     8     4     2    NA
#>  2 scherma…   2015 Max …    30 Maj-… Wash…     8     8     6     2    NA
#>  3 buehrma…   2015 Mark…    36 Maj-… Toro…     8     8     3     2    NA
#>  4 klubeco…   2015 Core…    29 Maj-… Clev…     8     8     3     4    NA
#>  5 keuchda…   2015 Dall…    27 Maj-… Hous…     8     8     4     3    NA
#>  6 degroja…   2015 Jaco…    27 Maj-… New …     8     8     4     2    NA
#>  7 samarje…   2015 Jeff…    30 Maj-… Chic…     8     8     2     2    NA
#>  8 colege01   2015 Gerr…    24 Maj-… Pitt…     8     8     7     1    NA
#>  9 buchhcl…   2015 Clay…    30 Maj-… Bost…     8     8     3     2    NA
#> 10 burnea.…   2015 A.J.…    38 Maj-… Pitt…     8     8     5     2    NA
#> # ℹ 501 more rows
#> # ℹ 35 more variables: IP <dbl>, H <dbl>, R <dbl>, ER <dbl>, uBB <dbl>,
#> #   BB <dbl>, SO <dbl>, HR <dbl>, HBP <dbl>, ERA <dbl>, AB <dbl>,
#> #   X1B <dbl>, X2B <dbl>, X3B <dbl>, IBB <dbl>, GDP <dbl>, SF <dbl>,
#> #   SB <dbl>, CS <dbl>, PO <dbl>, BF <dbl>, Pit <dbl>, Str <dbl>,
#> #   StL <dbl>, StS <dbl>, GB.FB <dbl>, LD <dbl>, PU <dbl>, WHIP <dbl>,
#> #   BAbip <dbl>, SO9 <dbl>, SO.W <dbl>, SO_perc <dbl>, …
# }