load_pbp: Load season play-by-play

View source: R/load_pbp.R

load_pbpR Documentation

Load season play-by-play

Description

Load season play-by-play

Usage

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

## Not run: 
pbp <- load_pbp(2021)

## End(Not run)

hockeyR documentation built on Oct. 12, 2022, 5:07 p.m.