Skip to contents

This function allows you to scrape the standings from MLB for any date you choose.

Usage

bref_standings_on_date(date, division, from = FALSE)

Arguments

date

a date object

division

One or more of AL East, AL Central, AL West, AL Overall, NL East, NL Central, NL West, and NL Overall

from

a logical indicating whether you want standings up to and including the date (FALSE, default) or rather standings for games played after the date

Value

Returns a tibble of MLB standings, one row per team in the requested division, with the following columns:

col_nametypesdescription
TmcharacterTeam abbreviation.
WintegerWins as of the requested date.
LintegerLosses as of the requested date.
W-L%numericWinning percentage.
GBcharacterGames behind the division leader (– for the leader).
RSintegerRuns scored.
RAintegerRuns allowed.
pythW-L%numericPythagorean (expected) winning percentage from RS/RA.

Examples

# \donttest{
  try(bref_standings_on_date(date = "2015-08-04", division = "AL East"))
#> ── MLB Standings on Date data from baseball-reference.com ──────────────
#>  Data updated: 2026-06-24 02:03:23 UTC
#> # A tibble: 5 × 8
#>   Tm        W     L `W-L%` GB       RS    RA `pythW-L%`
#>   <chr> <int> <int>  <dbl> <chr> <int> <int>      <dbl>
#> 1 NYY      60    45  0.571 --      525   455      0.565
#> 2 TOR      56    52  0.519 5.5     569   457      0.599
#> 3 BAL      54    52  0.509 6.5     464   415      0.551
#> 4 TBR      54    54  0.5   7.5     399   408      0.49 
#> 5 BOS      47    60  0.439 14.0    449   524      0.43 
# }