A function to calculate individual skater time on ice for a provided play-by-play data set
calculate_toi(pbp)
A tibble of play-by-play data, typically returned from either
load_pbp
or scrape_game
A tibble containing time on ice information for every skater in supplied pbp data
String identifying player name
Integer value of the NHL player ID
Games Played
String description of total time on ice in 'minutes:seconds'
String description of average time on ice over all supplied games, in 'minutes:seconds'
Numeric total time on ice, in minutes
Numeric average time on ice over all supplied games, in minutes
if (FALSE) {
pbp_2022 <- load_pbp(2022)
skater_toi <- calculate_toi(pbp_2022)
}