powered by
A function to calculate individual skater time on ice for a provided play-by-play data set
calculate_toi(pbp)
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
A tibble of play-by-play data, typically returned from either load_pbp or scrape_game
load_pbp
scrape_game
if (FALSE) { pbp_2022 <- load_pbp(2022) skater_toi <- calculate_toi(pbp_2022) }
Run the code above in your browser using DataLab