dot-strip_situation_code: Strip the situation code into goalie and skater counts, man...

.strip_situation_codeR Documentation

Strip the situation code into goalie and skater counts, man differential, and strength state for all the events (plays) in a play-by-play by perspective

Description

.strip_situation_code() strips the situation code into goalie and skater counts for home and away teams, then (from the event owner's perspective) computes man differential and a strength state classification without rewriting the source situationCode column.

Usage

.strip_situation_code(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s); see gc_play_by_play() and/or wsc_play_by_play() for reference

Value

data.frame with one row per event (play) and added columns: homeIsEmptyNet, awayIsEmptyNet, homeSkaterCount, awaySkaterCount, isEmptyNetFor, isEmptyNetAgainst, skaterCountFor, skaterCountAgainst, manDifferential, and strengthState


nhlscraper documentation built on June 29, 2026, 1:06 a.m.