bref_standings_on_date: *Scrape MLB Standings on a Given Date*

View source: R/bref_standings_on_date.R

bref_standings_on_dateR Documentation

Scrape MLB Standings on a Given Date

Description

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 of AL East, AL Central, AL West, AL Overall, NL East, NL Central, NL West, and NL Overall. Which divisions exist depends on the date: before 1969 only ⁠AL Overall⁠ / ⁠NL Overall⁠; 1969-1993 adds East/West; 1994 onward adds Central. Requesting a division that did not exist for the date errors with the era's available options.

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_name types description
Tm character Team abbreviation.
W integer Wins as of the requested date.
L integer Losses as of the requested date.
W-L% numeric Winning percentage.
GB character Games behind the division leader (-- for the leader).
RS integer Runs scored.
RA integer Runs allowed.
pythW-L% numeric Pythagorean (expected) winning percentage from RS/RA.

Examples


  try(bref_standings_on_date(date = "2015-08-04", division = "AL East"))


baseballr documentation built on Aug. 27, 2026, 1:07 a.m.