Load season play-by-play

load_pbp(
  season = as.numeric(substr(Sys.Date() + 184, 1, 4)),
  shift_events = FALSE
)

Arguments

season

An integer value or vector of values denoting the end year of the season(s) to scrape. load_pbp also accepts character strings with more explicit definitions of the season to scrape: '2020-2021', '2020-21', '2020_21' are also acceptable.
The default value is the current season, switching to the next year on July 1st when the new league year begins.

shift_events

Logical value; when set to FALSE this function returns a smaller dataset that excludes specifically shift change events

Value

A tibble containing all play-by-play data for a given season(s) in the same format as the output of scrape_game

Examples

if (FALSE) {
pbp <- load_pbp(2021)
}