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 over the requested date range, one row per player, with the following columns:

col_nametypesdescription
bbref_idcharacterBaseball-Reference player id (slug).
seasonintegerSeason year.
NamecharacterPlayer name.
AgenumericPlayer age during the season.
LevelcharacterLeague level (e.g. Maj-AL, Maj-NL).
TeamcharacterTeam name.
GnumericGames pitched.
GSnumericGames started.
WnumericWins.
LnumericLosses.
SVnumericSaves.
IPnumericInnings pitched.
HnumericHits allowed.
RnumericRuns allowed.
ERnumericEarned runs allowed.
uBBnumericUnintentional walks allowed.
BBnumericWalks allowed.
SOnumericStrikeouts.
HRnumericHome runs allowed.
HBPnumericBatters hit by pitch.
ERAnumericEarned run average (per 9 innings).
ABnumericAt-bats against.
X1BnumericSingles allowed.
X2BnumericDoubles allowed.
X3BnumericTriples allowed.
IBBnumericIntentional walks allowed.
GDPnumericDouble plays induced.
SFnumericSacrifice flies allowed.
SBnumericStolen bases allowed.
CSnumericRunners caught stealing.
POnumericPickoffs.
BFnumericBatters faced.
PitnumericTotal pitches thrown.
StrnumericStrikes thrown (as a share of pitches).
StLnumericLooking (called) strikes share.
StSnumericSwinging strikes share.
GB.FBnumericGround ball to fly ball share.
LDnumericLine drive share.
PUnumericPop-up (infield fly) share.
WHIPnumericWalks plus hits per inning pitched.
BAbipnumericBatting average on balls in play allowed.
SO9numericStrikeouts per 9 innings.
SO.WnumericStrikeout-to-walk ratio.
SO_percnumericStrikeout rate (per batter faced).
uBB_percnumericUnintentional walk rate (per batter faced).
SO_uBBnumericStrikeouts minus unintentional walks.

Examples

# \donttest{
  try(bref_daily_pitcher("2015-05-10", "2015-06-20"))
#> ── MLB Daily Pitcher data from baseball-reference.com ──────────────────
#>  Data updated: 2026-06-12 14:06:41 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>, …
# }