Play-by-play data

These are the functions to gather play-by-play data from the NHL API.

load_pbp()

Load season play-by-play

scrape_game()

Scrape game play-by-play

scrape_season()

Scrape full season play-by-play

scrape_day()

Scrape play-by-play for single day's games

get_game_ids()

Fetch game IDs for a single day or a full season

get_game_info()

Gather basic game information

get_game_rosters()

Scrape game day rosters for individual game

get_game_shifts()

Fetch game shift data

Other NHL.com data

Functions to scrape other data from the NHL API.

get_team_rosters()

Get current team roster

get_current_rosters()

Get current NHL rosters

get_draft_class()

Get draft classes

get_standings()

Load team standings

Calculation functions

Functions to calculate statistics for supplied data

calculate_xg()

Calculate hockeyR expected goals (xG)

calculate_toi()

Calculate player time on ice

calculate_on_ice()

Calculate player on-ice stats

calculate_individual()

Calculate individual player stats

Hockey-reference.com data

Functions to scrape data from hockey-reference.com

get_skater_stats_hr()

Scrape skater stats

get_goalie_stats_hr()

Scrape goalie stats

get_team_records()

Get team records from hockey-reference.com

get_rosters()

Get team rosters from hockey-reference.com

get_jersey_players()

Get Players by Jersey Number

get_player_stats_hr()

Get player counting stats from hockey-reference.com

Data objects

Internal package Data

team_logos_colors

Team logos & colors