Skip to contents

High-level

Functions to call the NHL APIs for high-level data

League

Functions to access data about the entire league

seasons()
Access all the seasons
season_now()
Access the season as of now
game_type_now()
Access the game type as of now
standings_rules()
Access the standings rules by season
standings()
Access the standings for a date
schedule()
Access the schedule for a date
venues()
Access all the venues
attendance()
Access the attendance by season and game type

Franchise

Functions to access data about the franchises and teams

franchises()
Access all the franchises
franchise_statistics() franchise_stats()
Access the all-time statistics for all the franchises by game type
franchise_team_statistics() franchise_team_stats()
Access the all-time statistics for all the franchises by team and game type
franchise_season_statistics() franchise_season_stats()
Access the statistics for all the franchises by season and game type
franchise_versus_franchise() franchise_vs_franchise()
Access the all-time statistics versus other franchises for all the franchises by game type
franchise_playoff_situational_results()
Access the playoff series results for all the franchises by situation
teams()
Access all the teams
team_seasons()
Access the season(s) and game type(s) in which a team played
team_report_configurations() team_report_configs()
Access the configurations for team reports
team_season_report()
Access various reports for a season, game type, and category for all the teams by season
team_game_report()
Access various reports for a season, game type, and category for all the teams by game
team_season_statistics() team_season_stats()
Access the statistics for all the teams by season and game type
roster()
Access the roster for a team, season, and position
roster_statistics() roster_stats()
Access the roster statistics for a team, season, game type, and position
team_prospects()
Access the prospects for a team and position
team_season_schedule()
Access the schedule for a team and season
team_month_schedule()
Access the schedule for a team and month
team_week_schedule()
Access the schedule for a team and week since a date
team_logos()
Access all the team logos
team_edge_seasons()
Access the season(s) and game type(s) in which there exists team EDGE statistics
team_edge_leaders()
Access the team EDGE statistics leaders for a season and game type
team_edge_summary()
Access the EDGE summary for a team, season, and game type
team_edge_zone_time()
Access the EDGE zone time statistics for a team, season, game type, and category
team_edge_skating_distance()
Access the EDGE skating distance statistics for a team, season, game type, and category
team_edge_skating_speed()
Access the EDGE skating speed statistics for a team, season, game type, and category
team_edge_shot_location()
Access the EDGE shot location statistics for a team, season, game type, and category
team_edge_shot_speed()
Access the EDGE shot speed statistics for a team, season, game type, and category

Postseason

Functions to access data about the playoffs, awards, and drafts

series()
Access all the playoff series by game
playoff_season_statistics() playoff_season_stats()
Access the playoff statistics by season
bracket()
Access the playoff bracket for a season
series_schedule()
Access the playoff schedule for a season and series
awards()
Access all the awards
award_winners()
Access all the award winners/finalists
drafts()
Access all the drafts
draft_picks()
Access all the draft picks
draft_prospects()
Access all the draft prospects
draft_rankings()
Access the draft rankings for a class and category
combine_reports()
Access the draft combine reports
lottery_odds()
Access the draft lottery odds
draft_tracker()
Access the real-time draft tracker
expansion_drafts()
Access all the expansion drafts
expansion_draft_picks()
Access all the expansion draft picks

Management

Functions to access data about the GMs, coaches, and officials

general_managers() gms()
Access all the general managers
coaches()
Access all the coaches
coach_career_statistics() coach_career_stats()
Access the career statistics for all the coaches
coach_franchise_statistics() coach_franchise_stats()
Access the statistics for all the coaches by franchise and game type
officials()
Access all the officials

Other

Functions to acccess any other data

glossary()
Access the glossary
countries()
Access all the countries
location()
Access the location for a zip code
streams()
Access all the streams
tv_schedule()
Access the NHL Network TV schedule for a date

Mid-level

Functions to call the NHL APIs for mid-level data

Player

Functions to access data about the players at large

players()
Access all the players
player_seasons()
Access the season(s) and game type(s) in which a player played
player_summary()
Access the summary for a player
player_game_log()
Access the game log for a player, season, and game type
spotlight_players()
Access the spotlight players

Skater

Functions to access data about the skaters

skater_report_configurations() skater_report_configs()
Access the configurations for skater reports
skater_season_report()
Access various reports for a season, game type, and category for all the skaters by season
skater_game_report()
Access various reports for a season, game type, and category for all the skaters by game
skater_statistics() skater_stats()
Access the career statistics for all the skaters
skater_regular_statistics() skater_regular_stats()
Access the career regular season statistics for all the skaters
skater_playoff_statistics() skater_playoff_stats()
Access the career playoff statistics for all the skaters
skater_season_statistics() skater_season_stats()
Access the statistics for all the skaters by season, game type, and team
skater_series_statistics() skater_series_stats()
Access the playoff statistics for all the skaters by series
skater_leaders()
Access the skater statistics leaders for a season, game type, and category
skater_milestones()
Access the skaters on milestone watch
skater_edge_seasons()
Access the season(s) and game type(s) in which there exists skater EDGE statistics
skater_edge_leaders()
Access the skater EDGE statistics leaders for a season and game type
skater_edge_summary()
Access the EDGE summary for a skater, season, and game type
skater_edge_zone_time()
Access the EDGE zone time statistics for a skater, season, game type, and category
skater_edge_skating_distance()
Access the EDGE skating distance statistics for a skater, season, game type, and category
skater_edge_skating_speed()
Access the EDGE skating speed statistics for a skater, season, game type, and category
skater_edge_shot_location()
Access the EDGE shot location statistics for a skater, season, game type, and category
skater_edge_shot_speed()
Access the EDGE shot speed statistics for a skater, season, game type, and category

Goalie

Functions to access data about the goalies

goalie_report_configurations() goalie_report_configs()
Access the configurations for goalie reports
goalie_season_report()
Access various reports for a season, game type, and category for all the goalies by season
goalie_game_report()
Access various reports for a season, game type, and category for all the goalies by game
goalie_statistics() goalie_stats()
Access the career statistics for all the goalies
goalie_regular_statistics() goalie_regular_stats()
Access the career regular season statistics for all the goalies
goalie_season_statistics() goalie_season_stats()
Access the statistics for all the goalies by season, game type, and team.
goalie_game_statistics() goalie_game_stats()
Access the statistics for all the goalies by game
goalie_series_statistics() goalie_series_stats()
Access the playoff statistics for all the goalies by series
goalie_scoring()
Access the career scoring statistics for all the goalies
goalie_game_scoring()
Access the scoring statistics for all the goalies by game
goalie_leaders()
Access the goalie statistics leaders for a season, game type, and category
goalie_milestones()
Access the goalies on milestone watch
goalie_edge_seasons()
Access the season(s) and game type(s) in which there exists goalie EDGE statistics
goalie_edge_leaders()
Access the goalie EDGE statistics leaders for a season and game type
goalie_edge_summary()
Access the EDGE summary for a goalie, season, and game type
goalie_edge_save_percentage()
Access the EDGE save percentage statistics for a goalie, season, game type, and category
goalie_edge_five_versus_five() goalie_edge_5_vs_5()
Access the EDGE 5 vs. 5 statistics for a goalie, season, game type, and category
goalie_edge_shot_location()
Access the EDGE shot location statistics for a goalie, season, game type, and category

Low-level

Functions to call the NHL APIs for low-level data

Game

Functions to access data about the games

games()
Access all the games
scores()
Access the scores for a date
gc_summary()
Access the GameCenter (GC) summary for a game
wsc_summary()
Access the World Showcase (WSC) summary for a game
boxscore()
Access the boxscore for a game, team, and position
game_rosters()
Access the rosters for a game
gc_play_by_play() gc_pbp()
Access the GameCenter (GC) play-by-play for a game
wsc_play_by_play() wsc_pbp()
Access the World Showcase (WSC) play-by-play for a game
shifts()
Access the shift charts for a game
game_odds()
Access the real-time game odds for a country by partnered bookmaker

Event

Functions to access data about the events (plays)

replay()
Access the replay for an event
penalty_shots() ps()
Access all the penalty shots

Analyze

Functions to help analyze the play-by-play data

Load

Functions to load pre-scraped full season play-by-plays

gc_play_by_plays() gc_pbps()
Access the GameCenter (GC) play-by-plays for a season
wsc_play_by_plays() wsc_pbps()
Access the World Showcase (WSC) play-by-plays for a season

Clean

Functions to help clean the data

strip_game_id()
Strip the game ID into the season ID, game type ID, and game number for all the events (plays) in a play-by-play
strip_time_period()
Strip the timestamp and period number into the time elapsed in the period and game for all the events (plays) in a play-by-play
strip_situation_code()
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
flag_is_home()
Flag if the event belongs to the home team or not for all the events (plays) in a play-by-play
flag_is_rebound()
Flag if the shot attempt is a rebound attempt or not for all the shots in a play-by-play
flag_is_rush()
Flag if the shot attempt is a rush attempt or not for all the shots in a play-by-play
count_goals_shots()
Count the as-of-event goal, shots on goal, Fenwick, and Corsi attempts and differentials for all the events (plays) in a play-by-play by perspective
normalize_coordinates()
Normalize the x and y coordinates for all the events (plays) in a play-by-play
calculate_distance()
Calculate the Euclidean distance from the attacking net for all the events (plays) in a play-by-play
calculate_angle()
Calculate the Euclidean angle from the attacking net for all the events (plays) in a play-by-play

Model

Functions to run built-in models

calculate_expected_goals_v1() calculate_xG_v1()
Calculate version 1 of the expected goals for all the events (plays) in a play-by-play
calculate_expected_goals_v2() calculate_xG_v2()
Calculate version 2 of the expected goals for all the events (plays) in a play-by-play
calculate_expected_goals_v3() calculate_xG_v3()
Calculate version 3 of the expected goals for all the events (plays) in a play-by-play

Graph

Functions to help graph the data (WIP)

draw_NHL_rink()
Draw a full NHL rink

Share

Functions to help share the data (WIP)

ig_game_shot_locations() ig_game_shot_locs()
Save an Instagram (IG) share-able shot-location plot for a game
x_game_shot_locations() x_game_shot_locs()
Save an X (Twitter) share-able shot-location plot for a game
ig_game_cumulative_expected_goals() ig_game_cum_xG()
Save an Instagram (IG) share-able cumulative expected goals (xG) time-series plot for a game
x_game_cumulative_expected_goals() x_game_cum_xG()
Save an X (Twitter) share-able cumulative expected goals (xG) time-series plot for a game

ESPN API

Functions to call the ESPN APIs

espn_teams()
Access all the ESPN teams
espn_team_summary()
Access the ESPN summary for a team
espn_players()
Access all the ESPN players
espn_player_summary()
Access the ESPN summary for a player
espn_games()
Access the ESPN games for a season
espn_game_summary()
Access the ESPN summary for a game
espn_play_by_play() espn_pbp()
Access the ESPN play-by-play for a game
espn_game_odds()
Access the ESPN odds for a game
espn_transactions()
Access the ESPN transactions for a season
espn_futures()
Access the ESPN futures for a season
espn_injuries()
Access the real-time ESPN injury reports

Outdated

Functions that are outdated.

Deprecated

Functions that are deprecated.

get_seasons()
Access all the seasons
get_standings_information()
Access the standings rules by season
get_standings()
Access the standings for a date
get_schedule()
Access the schedule for a date
get_venues()
Access all the venues
get_attendance()
Access the attendance by season and game type
get_franchises()
Access all the franchises
get_franchise_team_totals()
Access the all-time statistics for all the franchises by team and game type
get_franchise_season_by_season()
Access the statistics for all the franchises by season and game type
get_franchise_vs_franchise()
Access the all-time statistics versus other franchises for all the franchises by game type
get_teams()
Access all the teams
get_team_seasons()
Access the season(s) and game type(s) in which a team played
get_team_roster()
Access the roster for a team, season, and player type
get_team_roster_statistics()
Access the roster statistics for a team, season, game type, and player type
get_team_prospects()
Access the prospects for a team and position
get_team_schedule()
Access the schedule for a team and season
get_players()
Access all the players
get_player_landing()
Access the summary for a player
get_player_game_log()
Access the game log for a player, season, and game type
get_spotlight_players()
Access the spotlight players
get_skater_leaders()
Access the skater statistics leaders for a season, game type, and category
get_skater_milestones()
Access the skaters on milestone watch
get_goalie_leaders()
Access the goalie statistics leaders for a season, game type, and category
get_goalie_milestones()
Access the goalies on milestone watch
get_games()
Access all the games
get_scores()
Access the scores for a date
get_scoreboards()
Access the scoreboards for a date
get_game_landing()
Access the GameCenter (GC) summary for a game
get_game_story()
Access the World Showcase (WSC) summary for a game
get_game_boxscore()
Access the boxscore for a game, team, and player type
get_gc_play_by_play()
Access the GameCenter (GC) play-by-play for a game
get_wsc_play_by_play()
Access the World Showcase (WSC) play-by-play for a game
get_shift_charts()
Access the shift charts for a game
get_bracket()
Access the playoff bracket for a season
get_series_schedule()
Access the playoff schedule for a season and series
get_awards()
Access all the awards
get_award_winners()
Access all the award winners/finalists
get_drafts()
Access all the drafts
get_draft_picks()
Access all the draft picks
get_draft_rankings()
Access the draft rankings for a year and player type
get_draft_tracker()
Access the real-time draft tracker
get_officials()
Access all the officials
get_glossary()
Access the glossary
get_countries()
Access all the countries
get_streams()
Access all the streams
get_tv_schedule()
Access the NHL Network TV schedule for a date
get_partner_odds()
Access the real-time game odds for a country by partnered bookmaker
get_espn_athletes()
Access all the ESPN athletes (players)
get_espn_athlete()
Access the ESPN summary for an athlete (player) and season
get_espn_event()
Access the ESPN summary for an event (game)
get_espn_event_play_by_play()
Access the ESPN play-by-play for an event (game)
get_espn_event_odds()
Access the ESPN odds for an event (game)
get_espn_injuries()
Access the real-time ESPN injury reports

Defunct

Functions that are defunct

get_season_now()
Access the season and game type as of now
get_team_statistics()
Access various reports for all the teams by season or game
get_team_scoreboard()
Access the team scoreboard as of now
get_skaters()
Access all the skaters for a range of seasons
get_skater_statistics()
Access various reports for all the skaters by season or game
get_goalies()
Access all the goalies for a range of seasons
get_goalie_statistics()
Access various reports for all the goalies by season or game
get_series()
Access the playoff series for a season and round
ping()
Ping
get_configuration()
Access the configurations for team, skater, and goalie reports
get_espn_teams()
Access all the ESPN teams for a season
get_espn_team()
Access the ESPN summary for a team and season
get_espn_athlete()
Access the ESPN summary for an athlete (player) and season
get_espn_events()
Access the ESPN events (games) by start and end dates
get_espn_event_stars()
Access the three stars for an ESPN event (game)
get_espn_event_officials()
Access the officials for an ESPN event (game)
get_espn_coaches()
Access the ESPN coaches for a season
get_espn_coach()
Access the ESPN statistics for a coach and (multiple) season(s)
get_espn_coach_career()
Access the career ESPN statistics for a coach
get_espn_transactions()
Access the ESPN transactions by start and end dates
get_espn_futures()
Access the ESPN futures for a season