Skip to main content
Version: 0.1.5

NHL dataset loaders — Play-by-play

load_nhl_pbp​

Release: nhl_pbp_full · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_pbp_full/play_by_play_{season}.parquet

Returns​

col_nametypedescription
event_typeStringStandardized event type code.
eventStringEvent description label.
secondary_typeStringSecondary event type (e.g. shot type).
event_team_abbrStringAbbreviation of the team credited with the event.
event_team_typeStringWhether the event team is home or away.
descriptionStringFull text description of the event.
periodInt64Period number.
period_typeStringPeriod type (REG/OT/SO).
period_timeStringElapsed time in the period (MM:SS).
period_secondsInt64Elapsed seconds in the period.
period_seconds_remainingInt64Seconds remaining in the period.
period_time_remainingStringTime remaining in the period (MM:SS).
game_secondsInt64Elapsed seconds in the game.
game_seconds_remainingInt64Seconds remaining in regulation.
home_scoreInt64Home team final score.
away_scoreInt64Away team final score.
event_player_1_nameStringName of the primary event player.
event_player_1_typeStringRole of the primary event player.
event_player_1_idInt64Player id of the primary event player.
event_player_2_nameStringName of the secondary event player.
event_player_2_typeStringRole of the secondary event player.
event_player_2_idInt64Player id of the secondary event player.
event_player_3_nameStringName of the tertiary event player.
event_player_3_typeStringRole of the tertiary event player.
event_player_3_idInt64Player ID of the tertiary event player.
event_goalie_nameStringName of the goalie on the event.
event_goalie_idInt64Player id of the goalie on the event.
penalty_severityStringSeverity of the penalty.
penalty_minutesInt64Penalty minutes.
strength_stateStringStrength state (e.g. 5v5, 5v4).
strength_codeStringStrength state code (e.g., all, even, pp, pk).
strengthStringStrength label (Even, Power Play, Shorthanded).
empty_netBooleanWhether the net was empty.
extra_attackerBooleanWhether an extra attacker was on the ice.
xInt64Raw x-coordinate of the event.
yInt64Raw y-coordinate of the event.
x_fixedInt64Normalized x coordinate (home shoots right).
y_fixedInt64Normalized y coordinate (home shoots right).
shot_distanceFloat64Distance of the shot from the net.
shot_angleFloat64Angle of the shot relative to the net.
home_skatersInt64Number of home skaters on the ice.
away_skatersInt64Number of away skaters on the ice.
home_on_1StringName of home skater 1 on the ice.
home_on_2StringName of home skater 2 on the ice.
home_on_3StringName of home skater 3 on the ice.
home_on_4StringName of home skater 4 on the ice.
home_on_5StringName of home skater 5 on the ice.
home_on_6StringName of home skater 6 on the ice.
home_on_7StringName of home skater 7 on the ice.
away_on_1StringName of away skater 1 on the ice.
away_on_2StringName of away skater 2 on the ice.
away_on_3StringName of away skater 3 on the ice.
away_on_4StringName of away skater 4 on the ice.
away_on_5StringName of away skater 5 on the ice.
away_on_6StringName of away skater 6 on the ice.
away_on_7StringName of away skater 7 on the ice.
home_goalieStringName of the home goalie on the ice.
away_goalieStringName of the away goalie on the ice.
num_onInt64Number of players coming on (line change).
players_onStringNames of players coming on.
num_offInt64Number of players going off (line change).
players_offStringNames of players going off.
game_idInt64Unique game identifier.
seasonStringSeason year (echoed from arg).
season_typeStringSeason type code (echoed from arg).
home_abbrStringHome team abbreviation.
away_abbrStringAway team abbreviation.
event_idxInt64Sequential event index within the game.
event_idInt64ESPN event id (echoed from arg).
pptReplayUrlStringURL to the play replay, if available.
away_goalie_inInt64Whether the away goalie is on the ice (1/0).
home_goalie_inInt64Whether the home goalie is on the ice (1/0).
reasonStringReason for the event (e.g. stoppage reason).
secondaryReasonStringSecondary reason for a stoppage.
ids_onStringPlayer ids coming on.
ids_offStringPlayer ids going off.
home_on_1_idInt64Player id of home skater 1 on the ice.
away_on_1_idInt64Player id of away skater 1 on the ice.
home_on_2_idInt64Player id of home skater 2 on the ice.
away_on_2_idInt64Player id of away skater 2 on the ice.
home_on_3_idInt64Player id of home skater 3 on the ice.
away_on_3_idInt64Player id of away skater 3 on the ice.
home_on_4_idInt64Player id of home skater 4 on the ice.
away_on_4_idInt64Player id of away skater 4 on the ice.
home_on_5_idInt64Player id of home skater 5 on the ice.
away_on_5_idInt64Player id of away skater 5 on the ice.
home_on_6_idInt64Player id of home skater 6 on the ice.
away_on_6_idInt64Player id of away skater 6 on the ice.
home_on_7_idInt64Player id of home skater 7 on the ice.
away_on_7_idInt64Player id of away skater 7 on the ice.
home_goalie_idInt64Player ID of the home goalie on the ice.
away_goalie_idInt64Player ID of the away goalie on the ice.
xgFloat64Expected goals value for the shot event.
game_dateStringGame date.
load_nhl_pbp(seasons=2024)

load_nhl_pbp_full​

Release: nhl_pbp_full · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_pbp_full/play_by_play_{season}.parquet

Returns​

col_nametypedescription
event_typeStringStandardized event type code.
eventStringEvent description label.
secondary_typeStringSecondary event type (e.g. shot type).
event_team_abbrStringAbbreviation of the team credited with the event.
event_team_typeStringWhether the event team is home or away.
descriptionStringFull text description of the event.
periodInt64Period number.
period_typeStringPeriod type (REG/OT/SO).
period_timeStringElapsed time in the period (MM:SS).
period_secondsInt64Elapsed seconds in the period.
period_seconds_remainingInt64Seconds remaining in the period.
period_time_remainingStringTime remaining in the period (MM:SS).
game_secondsInt64Elapsed seconds in the game.
game_seconds_remainingInt64Seconds remaining in regulation.
home_scoreInt64Home team final score.
away_scoreInt64Away team final score.
event_player_1_nameStringName of the primary event player.
event_player_1_typeStringRole of the primary event player.
event_player_1_idInt64Player id of the primary event player.
event_player_2_nameStringName of the secondary event player.
event_player_2_typeStringRole of the secondary event player.
event_player_2_idInt64Player id of the secondary event player.
event_player_3_nameStringName of the tertiary event player.
event_player_3_typeStringRole of the tertiary event player.
event_player_3_idInt64Player ID of the tertiary event player.
event_goalie_nameStringName of the goalie on the event.
event_goalie_idInt64Player id of the goalie on the event.
penalty_severityStringSeverity of the penalty.
penalty_minutesInt64Penalty minutes.
strength_stateStringStrength state (e.g. 5v5, 5v4).
strength_codeStringStrength state code (e.g., all, even, pp, pk).
strengthStringStrength label (Even, Power Play, Shorthanded).
empty_netBooleanWhether the net was empty.
extra_attackerBooleanWhether an extra attacker was on the ice.
xInt64Raw x-coordinate of the event.
yInt64Raw y-coordinate of the event.
x_fixedInt64Normalized x coordinate (home shoots right).
y_fixedInt64Normalized y coordinate (home shoots right).
shot_distanceFloat64Distance of the shot from the net.
shot_angleFloat64Angle of the shot relative to the net.
home_skatersInt64Number of home skaters on the ice.
away_skatersInt64Number of away skaters on the ice.
home_on_1StringName of home skater 1 on the ice.
home_on_2StringName of home skater 2 on the ice.
home_on_3StringName of home skater 3 on the ice.
home_on_4StringName of home skater 4 on the ice.
home_on_5StringName of home skater 5 on the ice.
home_on_6StringName of home skater 6 on the ice.
home_on_7StringName of home skater 7 on the ice.
away_on_1StringName of away skater 1 on the ice.
away_on_2StringName of away skater 2 on the ice.
away_on_3StringName of away skater 3 on the ice.
away_on_4StringName of away skater 4 on the ice.
away_on_5StringName of away skater 5 on the ice.
away_on_6StringName of away skater 6 on the ice.
away_on_7StringName of away skater 7 on the ice.
home_goalieStringName of the home goalie on the ice.
away_goalieStringName of the away goalie on the ice.
num_onInt64Number of players coming on (line change).
players_onStringNames of players coming on.
num_offInt64Number of players going off (line change).
players_offStringNames of players going off.
game_idInt64Unique game identifier.
seasonStringSeason year (echoed from arg).
season_typeStringSeason type code (echoed from arg).
home_abbrStringHome team abbreviation.
away_abbrStringAway team abbreviation.
event_idxInt64Sequential event index within the game.
event_idInt64ESPN event id (echoed from arg).
pptReplayUrlStringURL to the play replay, if available.
away_goalie_inInt64Whether the away goalie is on the ice (1/0).
home_goalie_inInt64Whether the home goalie is on the ice (1/0).
reasonStringReason for the event (e.g. stoppage reason).
secondaryReasonStringSecondary reason for a stoppage.
ids_onStringPlayer ids coming on.
ids_offStringPlayer ids going off.
home_on_1_idInt64Player id of home skater 1 on the ice.
away_on_1_idInt64Player id of away skater 1 on the ice.
home_on_2_idInt64Player id of home skater 2 on the ice.
away_on_2_idInt64Player id of away skater 2 on the ice.
home_on_3_idInt64Player id of home skater 3 on the ice.
away_on_3_idInt64Player id of away skater 3 on the ice.
home_on_4_idInt64Player id of home skater 4 on the ice.
away_on_4_idInt64Player id of away skater 4 on the ice.
home_on_5_idInt64Player id of home skater 5 on the ice.
away_on_5_idInt64Player id of away skater 5 on the ice.
home_on_6_idInt64Player id of home skater 6 on the ice.
away_on_6_idInt64Player id of away skater 6 on the ice.
home_on_7_idInt64Player id of home skater 7 on the ice.
away_on_7_idInt64Player id of away skater 7 on the ice.
home_goalie_idInt64Player ID of the home goalie on the ice.
away_goalie_idInt64Player ID of the away goalie on the ice.
xgFloat64Expected goals value for the shot event.
game_dateStringGame date.
load_nhl_pbp_full(seasons=2010)

load_nhl_pbp_lite​

Release: nhl_pbp_lite · asset https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_pbp_lite/play_by_play_{season}_lite.parquet

Returns​

col_nametypedescription
event_typeStringStandardized event type code.
eventStringEvent description label.
secondary_typeStringSecondary event type (e.g. shot type).
event_team_abbrStringAbbreviation of the team credited with the event.
event_team_typeStringWhether the event team is home or away.
descriptionStringFull text description of the event.
periodInt32Period number.
period_typeStringPeriod type (REG/OT/SO).
period_timeStringElapsed time in the period (MM:SS).
period_secondsInt32Elapsed seconds in the period.
period_seconds_remainingInt32Seconds remaining in the period.
period_time_remainingStringTime remaining in the period (MM:SS).
game_secondsInt32Elapsed seconds in the game.
game_seconds_remainingInt32Seconds remaining in regulation.
home_scoreInt32Home team final score.
away_scoreInt32Away team final score.
event_player_1_nameStringName of the primary event player.
event_player_1_typeStringRole of the primary event player.
event_player_1_idInt32Player id of the primary event player.
event_player_2_nameStringName of the secondary event player.
event_player_2_typeStringRole of the secondary event player.
event_player_2_idInt32Player id of the secondary event player.
event_player_3_nameStringName of the tertiary event player.
event_player_3_typeStringRole of the tertiary event player.
event_player_3_idInt32Player ID of the tertiary event player.
event_goalie_nameStringName of the goalie on the event.
event_goalie_idInt32Player id of the goalie on the event.
penalty_severityStringSeverity of the penalty.
penalty_minutesInt32Penalty minutes.
strength_stateStringStrength state (e.g. 5v5, 5v4).
strength_codeStringStrength state code (e.g., all, even, pp, pk).
strengthStringStrength label (Even, Power Play, Shorthanded).
empty_netBooleanWhether the net was empty.
extra_attackerBooleanWhether an extra attacker was on the ice.
xInt32Raw x-coordinate of the event.
yInt32Raw y-coordinate of the event.
x_fixedInt32Normalized x coordinate (home shoots right).
y_fixedInt32Normalized y coordinate (home shoots right).
shot_distanceFloat64Distance of the shot from the net.
shot_angleFloat64Angle of the shot relative to the net.
home_skatersInt32Number of home skaters on the ice.
away_skatersInt32Number of away skaters on the ice.
home_on_1StringName of home skater 1 on the ice.
home_on_2StringName of home skater 2 on the ice.
home_on_3StringName of home skater 3 on the ice.
home_on_4StringName of home skater 4 on the ice.
home_on_5StringName of home skater 5 on the ice.
home_on_6StringName of home skater 6 on the ice.
home_on_7StringName of home skater 7 on the ice.
away_on_1StringName of away skater 1 on the ice.
away_on_2StringName of away skater 2 on the ice.
away_on_3StringName of away skater 3 on the ice.
away_on_4StringName of away skater 4 on the ice.
away_on_5StringName of away skater 5 on the ice.
away_on_6StringName of away skater 6 on the ice.
away_on_7StringName of away skater 7 on the ice.
home_goalieStringName of the home goalie on the ice.
away_goalieStringName of the away goalie on the ice.
num_onInt32Number of players coming on (line change).
players_onStringNames of players coming on.
num_offInt32Number of players going off (line change).
players_offStringNames of players going off.
game_idInt32Unique game identifier.
seasonInt32Season year (echoed from arg).
season_typeStringSeason type code (echoed from arg).
home_abbrStringHome team abbreviation.
away_abbrStringAway team abbreviation.
event_idxInt32Sequential event index within the game.
event_idInt32ESPN event id (echoed from arg).
pptReplayUrlStringURL to the play replay, if available.
away_goalie_inInt32Whether the away goalie is on the ice (1/0).
home_goalie_inInt32Whether the home goalie is on the ice (1/0).
reasonStringReason for the event (e.g. stoppage reason).
secondaryReasonStringSecondary reason for a stoppage.
ids_onStringPlayer ids coming on.
ids_offStringPlayer ids going off.
home_on_1_idInt32Player id of home skater 1 on the ice.
away_on_1_idInt32Player id of away skater 1 on the ice.
home_on_2_idInt32Player id of home skater 2 on the ice.
away_on_2_idInt32Player id of away skater 2 on the ice.
home_on_3_idInt32Player id of home skater 3 on the ice.
away_on_3_idInt32Player id of away skater 3 on the ice.
home_on_4_idInt32Player id of home skater 4 on the ice.
away_on_4_idInt32Player id of away skater 4 on the ice.
home_on_5_idInt32Player id of home skater 5 on the ice.
away_on_5_idInt32Player id of away skater 5 on the ice.
home_on_6_idInt32Player id of home skater 6 on the ice.
away_on_6_idInt32Player id of away skater 6 on the ice.
home_on_7_idInt32Player id of home skater 7 on the ice.
away_on_7_idInt32Player id of away skater 7 on the ice.
home_goalie_idInt32Player ID of the home goalie on the ice.
away_goalie_idInt32Player ID of the away goalie on the ice.
xgFloat64Expected goals value for the shot event.
load_nhl_pbp_lite(seasons=2010)