| add_shift_times | R Documentation |
add_shift_times() adds SecondsRemainingInShift,
SecondsElapsedInShift, and SecondsElapsedInPeriodSinceLastShift columns
for the on-ice goalies and skaters already present in a public play-by-play.
It accepts either a single game play-by-play plus shift_chart() data or a
season aggregate plus shift_charts() data.
add_shift_times(play_by_play, shift_chart)
play_by_play |
data.frame of play-by-play(s) using the current public schema returned by |
shift_chart |
data.frame returned by |
data.frame with one row per event (play) and added or updated scalar on-ice shift timing columns
pbp <- gc_play_by_play(game = 2023030417)
sc <- shift_chart(game = 2023030417)
pbp <- add_shift_times(pbp, sc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.