Title: Scraper for National Hockey League Data
Version: 0.6.0
Description: Scrapes and cleans data from the 'NHL' and 'ESPN' APIs into data.frames and lists. Wraps 125+ endpoints documented in https://github.com/RentoSaijo/nhlscraper/wiki from high-level multi-season summaries and award winners to low-level decisecond replays and bookmakers' odds, making them more accessible. Features cleaning and visualization tools, primarily for play-by-plays.
License: GPL (≥ 3)
Encoding: UTF-8
RoxygenNote: 7.3.3
Depends: R (≥ 4.1.0)
Imports: httr2 (≥ 1.2.0), jsonlite (≥ 2.0.0), xml2 (≥ 1.5.0), arrow (≥ 23.0.0)
Suggests: testthat (≥ 3.0.0), knitr (≥ 1.50.0), rmarkdown (≥ 2.29.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://rentosaijo.github.io/nhlscraper/, https://github.com/RentoSaijo/nhlscraper
BugReports: https://github.com/RentoSaijo/nhlscraper/issues
Copyright: Copyright: NHL and the NHL Shield are registered trademarks of the National Hockey League. NHL and NHL team marks are the property of the NHL and its teams.
NeedsCompilation: yes
Packaged: 2026-04-07 04:24:18 UTC; rsai_91
Author: Rento Saijo ORCID iD [aut, cre, cph], Lars Skytte [ctb], Jack Pallotta ORCID iD [ctb]
Maintainer: Rento Saijo <rentosaijo0527@gmail.com>
Repository: CRAN
Date/Publication: 2026-04-07 04:50:08 UTC

nhlscraper: Scrape, clean, and visualize NHL data

Description

nhlscraper is a minimum-dependency R package to scrape, clean, and visualize NHL data via the NHL and ESPN APIs. It primarily wraps 125+ endpoints from high-level multi-season summaries and award winners to low-level decisecond replays and bookmakers' odds, making them significantly more accessible. It also features cleaning and visualization functions, primarily for play-by-plays, to help analyze the data.

Prerequisite

Disclosure

Detailed documentation for each scraping function will be released gradually over time. Because each function can return a large amount of information, users are encouraged to explore the provided examples to discover what is available. Most, if not all, of the endpoints accessed by this package are unofficially documented (i.e., hidden), so it is important to use them responsibly and with respect for the NHL's data servers. Endpoints serving historical or otherwise mostly static data should ideally be queried once and then stored locally (for example, in a MySQL database) for further analysis, rather than being called repeatedly; the load functions attempt to mitigate this risk by providing pre-scraped data, so please make use of them. The exact rate limits for these APIs are not publicly known, so users are asked to avoid excessive or abusive querying to help ensure continued access for everyone.

History

Prior to the NHL API rework in 2023, Drew Hynes documented a comprehensive list of known endpoints, and several R packages, such as nhlapi and hockeyR, were built to access them. However, after the NHL completely transformed its API structure, all of these packages became mostly defunct as their authors understandably chose not to continue maintaining them. The community gathered around work by Zachary Maludzinski to discover and share new endpoints, but progress naturally slowed once most of the "main" endpoints were identified. Over the summer of 2025, I began reverse-engineering many of the remaining, undocumented endpoints while searching for additional data for future research, with a particular focus on NHL EDGE and Records data. After I shared those findings, the effort to expand and refine this map of the APIs accelerated, and with the addition of David Fleischer's effort, we ultimately identified 400+ new endpoints. In parallel, I also discovered many new endpoints for the ESPN API, extending beyond what Joseph Wilson had already compiled.

Author(s)

Maintainer: Rento Saijo rentosaijo0527@gmail.com (ORCID) [copyright holder]

Other contributors:

See Also

Useful links:


Initialize empty on-ice columns

Description

.add_empty_html_on_ice_columns() allocates empty scalar on-ice player ID and timing columns before HTML and shift-chart enrichment.

Usage

.add_empty_html_on_ice_columns(play_by_play, slot_count = NULL)

Arguments

play_by_play

data.frame play-by-play object

slot_count

optional integer scalar minimum slot count requested by the caller

Value

data.frame with empty on-ice columns added


Add HTML-derived on-ice players to play-by-play

Description

.add_html_on_ice_players() resolves HTML on-ice goalie and skater IDs, matches them to API rows, and injects the resulting scalar on-ice columns into play-by-play output.

Usage

.add_html_on_ice_players(
  play_by_play,
  game,
  rosters = NULL,
  home_team = NULL,
  away_team = NULL,
  html_rows = NULL
)

Arguments

play_by_play

data.frame play-by-play object

game

game ID

rosters

optional roster data.frame

home_team

optional home-team metadata

away_team

optional away-team metadata

html_rows

optional parsed HTML on-ice rows

Value

data.frame enriched with HTML-derived on-ice columns


Add on-ice shift timing context

Description

.add_on_ice_shift_timing_context() enriches play-by-play rows with scalar shift elapsed and since-last-shift columns for the on-ice goalies and skaters.

Usage

.add_on_ice_shift_timing_context(play_by_play, game, shift_data = NULL)

Arguments

play_by_play

data.frame play-by-play object with on-ice player IDs

game

game ID

shift_data

optional shift chart data.frame

Value

data.frame with scalar on-ice timing columns added


Add one-on-one shooter/goalie assignments

Description

.add_one_on_one_on_ice_players() populates on-ice player-ID columns for penalty-shot and shootout rows whose situationCode implies a one-skater versus one-goalie state (0101/1010). The raw situationCode remains the source column; this helper only synthesizes the compatible scalar player-ID assignments when the general HTML on-ice signature is not usable.

Usage

.add_one_on_one_on_ice_players(play_by_play, matched = data.frame())

Arguments

play_by_play

data.frame play-by-play object

matched

optional matched HTML rows from .match_html_pbp_to_api()

Value

data.frame enriched with one-on-one shooter/goalie assignments


Attach delta context columns to play-by-play

Description

.apply_pbp_delta_columns() inserts computed delta columns into a play-by-play and reorders them into the public schema.

Usage

.apply_pbp_delta_columns(play_by_play, delta_ctx)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

delta_ctx

named list returned by .compute_pbp_deltas()

Value

data.frame with public delta columns inserted


Attach shot context columns to play-by-play

Description

.apply_shot_context() appends rush, rebound, and running score/attempt context columns to a play-by-play.

Usage

.apply_shot_context(play_by_play)

Arguments

play_by_play

data.frame play-by-play object

Value

data.frame with shot context columns added


Assign resolved HTML on-ice IDs to scalar columns

Description

.assign_html_on_ice_player_ids() copies resolved HTML goalie and skater IDs into the public scalar on-ice player-ID columns for one play-by-play row.

Usage

.assign_html_on_ice_player_ids(
  play_by_play,
  idx,
  home_goalie,
  away_goalie,
  home_skaters,
  away_skaters
)

Arguments

play_by_play

data.frame play-by-play object

idx

row index to update

home_goalie

resolved home goalie player ID

away_goalie

resolved away goalie player ID

home_skaters

integer vector of resolved home skater IDs

away_skaters

integer vector of resolved away skater IDs

Value

data.frame with scalar on-ice player-ID columns assigned for idx


Assign scalar on-ice timing metrics

Description

.assign_on_ice_shift_metric() copies goalie and skater timing matrices into home, away, for, and against scalar play-by-play columns.

Usage

.assign_on_ice_shift_metric(
  play_by_play,
  home_matrix,
  away_matrix,
  metric_suffix
)

Arguments

play_by_play

data.frame play-by-play object

home_matrix

numeric matrix for home on-ice players

away_matrix

numeric matrix for away on-ice players

metric_suffix

scalar timing suffix

Value

data.frame with timing columns assigned


Backfill unmatched delayed-penalty rows from nearby populated rows

Description

.backfill_delayed_penalty_on_ice_players() fills unmatched delayed-penalty rows from the nearest previous populated supported row in the same game and period when the raw situationCode and goalie/skater counts are unchanged.

Usage

.backfill_delayed_penalty_on_ice_players(play_by_play, max_gap_seconds = 15L)

Arguments

play_by_play

data.frame play-by-play object

max_gap_seconds

integer scalar time window

Value

data.frame with delayed-penalty rows backfilled where possible


Build API-side HTML matching features

Description

.build_api_html_match_table() derives the API-side matching features used to align HTML play-by-play rows back to API play-by-play rows.

Usage

.build_api_html_match_table(play_by_play)

Arguments

play_by_play

data.frame play-by-play object

Value

data.frame of API-side matching features


Build a game-roster lookup table

Description

.build_game_roster_lookup() standardizes roster columns and prepares a lookup table used to resolve HTML sweater numbers to player IDs.

Usage

.build_game_roster_lookup(rosters)

Arguments

rosters

roster data.frame from the game play-by-play metadata

Value

standardized roster lookup data.frame


Calculate the Euclidean angle from the attacking net for all the events (plays) in a play-by-play

Description

.calculate_angle() calculates the Euclidean angle from the attacking net for all the events (plays) in a play-by-play.

Usage

.calculate_angle(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 angle column


Calculate the Euclidean distance from the attacking net for all the events (plays) in a play-by-play

Description

.calculate_distance() calculates the Euclidean distance from the attacking net for all the events (plays) in a play-by-play.

Usage

.calculate_distance(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 distance column


Compute on-ice shift timings in R

Description

.compute_on_ice_shift_timing_in_r() is the pure-R fallback for resolving on-ice remaining-shift, elapsed-shift, and time-since-last-shift matrices.

Usage

.compute_on_ice_shift_timing_in_r(play_by_play, shift_data)

Arguments

play_by_play

data.frame play-by-play object with on-ice player IDs

shift_data

data.frame shift chart data

Value

list containing home and away timing matrices


Compute on-ice shift timing matrices

Description

.compute_on_ice_shift_timing_matrices() uses the native timing resolver when available and falls back to the R implementation otherwise.

Usage

.compute_on_ice_shift_timing_matrices(play_by_play, shift_data)

Arguments

play_by_play

data.frame play-by-play object with on-ice player IDs

shift_data

data.frame shift chart data

Value

list containing home and away timing matrices


Compute play-by-play deltas with native fallback

Description

.compute_pbp_deltas() validates the public schema, then uses the native delta routine when available and falls back to R otherwise.

Usage

.compute_pbp_deltas(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

Value

named list containing delta context vectors


Compute play-by-play deltas in R

Description

.compute_pbp_deltas_in_r() is the pure-R fallback for event-to-event delta calculations.

Usage

.compute_pbp_deltas_in_r(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

Value

named list containing delta context vectors


Compute shot context summaries

Description

.compute_shot_context() derives rush and rebound flags plus running goal, shot, Fenwick, and Corsi counts, using native code when available.

Usage

.compute_shot_context(play_by_play)

Arguments

play_by_play

data.frame play-by-play object

Value

named list of logical and integer shot-context vectors


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

Description

.count_goals_shots() counts 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.

Usage

.count_goals_shots(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: homeGoals, awayGoals, homeShots, awayShots, homeFenwick, awayFenwick, homeCorsi, awayCorsi, goalsFor, goalsAgainst, shotsFor, shotsAgainst, fenwickFor, fenwickAgainst, corsiFor, corsiAgainst, goalDifferential, shotDifferential, fenwickDifferential, and corsiDifferential


Identify Return-to-Play round-robin shootout games

Description

.covid_round_robin_shootout_game_ids() returns the 2019-20 round-robin seeding games that used regular-season overtime/shootout rules despite carrying playoff game IDs.

Usage

.covid_round_robin_shootout_game_ids()

Value

integer vector of game IDs


Remove illogically ordered boundary events from a play-by-play

Description

.drop_illogical_ordered_events() removes stray boundary rows that can appear between a period's period-end and the following period's period-start. In practice, these are most often duplicated 0:00 faceoff/stoppage rows that are still tagged to the previous period even though the actual opening sequence for the next period follows immediately after.

Usage

.drop_illogical_ordered_events(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 illogically ordered boundary events removed


Build an empty play-by-play delta context

Description

.empty_pbp_delta_context() allocates an empty delta context sized to the number of play-by-play rows.

Usage

.empty_pbp_delta_context(n)

Arguments

n

integer row count

Value

named list of empty delta vectors


Allocate a missing public play-by-play column

Description

.empty_public_pbp_column() returns a typed NA vector for a public play-by-play column that is absent in the upstream source data.

Usage

.empty_public_pbp_column(name, n)

Arguments

name

public play-by-play column name

n

output row count

Value

typed vector of missing values


Ensure a native symbol is available

Description

.ensure_local_native_symbol() checks whether a native symbol is already registered and, if needed, tries to load the installed package shared object. It does not trust the current working directory.

Usage

.ensure_local_native_symbol(symbol)

Arguments

symbol

native symbol name

Value

logical scalar indicating whether the symbol is available


Fetch HTML on-ice play-by-play rows

Description

.fetch_html_pbp_on_ice() downloads an NHL HTML play-by-play report and parses its on-ice content into a structured data frame.

Usage

.fetch_html_pbp_on_ice(
  game,
  rosters,
  home_team_id,
  away_team_id,
  home_abbrev,
  away_abbrev
)

Arguments

game

game ID

rosters

roster data.frame from play-by-play metadata

home_team_id

home-team ID

away_team_id

away-team ID

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

Value

data.frame of parsed HTML play-by-play rows


Finalize public play-by-play output

Description

.finalize_pbp_output() selects and orders the final GC or WSC public play-by-play column set.

Usage

.finalize_pbp_output(play_by_play, source = c("gc", "wsc"))

Arguments

play_by_play

data.frame play-by-play object

source

output source, either "gc" or "wsc"

Value

data.frame with the finalized public play-by-play schema


Flag if the event belongs to the home team or not for all the events (plays) in a play-by-play

Description

.flag_is_home() flags if the event belongs to the home team or not for all the events (plays) in a play-by-play.

Usage

.flag_is_home(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 isHome column


Flag if the shot attempt is a rebound attempt or creates a rebound for all the shots in a play-by-play

Description

.flag_is_rebound() flags whether a shot attempt is a rebound attempt (i.e., taken within 3 seconds of a prior blocked, missed, or saved attempt with no stoppage in between), and whether a shot attempt creates a rebound under the same definition.

Usage

.flag_is_rebound(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: createdRebound and isRebound


Flag if the shot attempt is a rush attempt or not for all the shots in a play-by-play

Description

.flag_is_rush() flags whether a shot attempt is a rush attempt, defined as any shot attempt occurring within 4 seconds of a prior event in the neutral or defensive zone with no stoppage in play in between.

Usage

.flag_is_rush(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 isRush column


Format elapsed seconds as an MM:SS clock

Description

.format_elapsed_clock() converts elapsed-in-period seconds back into zero-padded MM:SS strings.

Usage

.format_elapsed_clock(seconds)

Arguments

seconds

integer/numeric vector of elapsed seconds

Value

character vector


Identify populated on-ice player rows

Description

.has_any_on_ice_player_ids() returns a logical vector indicating whether a play-by-play row already has any scalar on-ice player IDs assigned.

Usage

.has_any_on_ice_player_ids(play_by_play)

Arguments

play_by_play

data.frame play-by-play object

Value

logical vector


Resolve the owner team from an HTML description

Description

.html_desc_owner_team_id() infers the event owner team ID from the leading team abbreviation embedded in an HTML event description.

Usage

.html_desc_owner_team_id(
  description,
  home_abbrev,
  away_abbrev,
  home_team_id,
  away_team_id
)

Arguments

description

HTML event description

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

home_team_id

home-team ID

away_team_id

away-team ID

Value

integer team ID or NA_integer_


Map HTML event codes to event type keys

Description

.html_event_code_to_type_desc() converts HTML report event codes and select description fallbacks into internal play-by-play event type keys.

Usage

.html_event_code_to_type_desc(event_code, description = NA_character_)

Arguments

event_code

HTML event code

description

optional HTML event description

Value

event type key or NA_character_


Extract actor player IDs from an HTML event

Description

.html_extract_actor_player_ids() resolves primary, secondary, and tertiary actor player IDs from HTML event descriptions using the roster lookup.

Usage

.html_extract_actor_player_ids(
  description,
  type_desc_key,
  owner_team_id,
  home_team_id,
  away_team_id,
  home_abbrev,
  away_abbrev,
  roster_lookup
)

Arguments

description

HTML event description

type_desc_key

internal event type key

owner_team_id

owner team ID

home_team_id

home-team ID

away_team_id

away-team ID

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

roster_lookup

standardized roster lookup data.frame

Value

named list of actor player IDs


Extract team-tagged player references from HTML

Description

.html_extract_tagged_players() resolves explicitly team-tagged HTML player references such as TOR #42 into ordered team/player pairs.

Usage

.html_extract_tagged_players(
  description,
  home_team_id,
  away_team_id,
  home_abbrev,
  away_abbrev,
  roster_lookup
)

Arguments

description

HTML event description

home_team_id

home-team ID

away_team_id

away-team ID

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

roster_lookup

standardized roster lookup data.frame

Value

data.frame of ordered team/player references


Check whether an HTML on-ice signature can override derived strength context

Description

.html_on_ice_can_override_strength_context() allows the HTML on-ice skater and goalie counts to replace derived strength context when the resolved signature still looks like a plausible hockey state. Overflow rows with more than six skaters are preserved in the scalar player-ID output but do not rewrite the derived count columns.

Usage

.html_on_ice_can_override_strength_context(
  situation_code,
  home_goalie_player_id,
  away_goalie_player_id,
  home_skater_player_ids,
  away_skater_player_ids
)

Arguments

situation_code

raw API situation code

home_goalie_player_id

parsed home goalie player ID

away_goalie_player_id

parsed away goalie player ID

home_skater_player_ids

parsed home skater IDs

away_skater_player_ids

parsed away skater IDs

Value

logical scalar


Check required event actors against resolved HTML on-ice IDs

Description

.html_on_ice_matches_event_actors() validates that the key API event actors for a matched row are present on the corresponding HTML on-ice team sets. It is intentionally narrow and only returns TRUE when at least one informative actor field is available for the event type.

Usage

.html_on_ice_matches_event_actors(
  play_by_play,
  idx,
  home_goalie_player_id,
  away_goalie_player_id,
  home_skater_player_ids,
  away_skater_player_ids
)

Arguments

play_by_play

data.frame cleaned internal play-by-play object

idx

row index in the play-by-play

home_goalie_player_id

parsed home goalie player ID

away_goalie_player_id

parsed away goalie player ID

home_skater_player_ids

parsed home skater IDs

away_skater_player_ids

parsed away skater IDs

Value

logical scalar


Check HTML on-ice state against a late empty-net heuristic

Description

.html_on_ice_matches_late_empty_net() accepts late-game 6-on-5 HTML rows when the trailing team has clearly pulled its goalie and there are no active reconstructed penalties that would already explain the manpower mismatch.

Usage

.html_on_ice_matches_late_empty_net(
  play_by_play,
  reconstruction,
  idx,
  home_goalie_player_id,
  away_goalie_player_id,
  home_skater_player_ids,
  away_skater_player_ids
)

Arguments

play_by_play

data.frame cleaned internal play-by-play object

reconstruction

data.frame from .reconstruct_skater_counts_from_penalties()

idx

row index in the play-by-play

home_goalie_player_id

parsed home goalie player ID

away_goalie_player_id

parsed away goalie player ID

home_skater_player_ids

parsed home skater IDs

away_skater_player_ids

parsed away skater IDs

Value

logical scalar


Check HTML skater counts against reconstructed penalty state

Description

.html_on_ice_matches_reconstructed_strength() validates the HTML skater counts against the penalty-based reconstruction. Goalie presence is validated separately when deciding whether the HTML row can override stale source strength context.

Usage

.html_on_ice_matches_reconstructed_strength(
  reconstruction,
  idx,
  home_skater_player_ids,
  away_skater_player_ids
)

Arguments

reconstruction

data.frame from .reconstruct_skater_counts_from_penalties()

idx

row index in the play-by-play

home_skater_player_ids

parsed home skater IDs

away_skater_player_ids

parsed away skater IDs

Value

logical scalar


Check HTML on-ice counts against a situation code

Description

.html_on_ice_matches_situation_code() validates that a parsed HTML on-ice row is compatible with the source API situation code. Missing or unparseable situation codes are treated as compatible.

Usage

.html_on_ice_matches_situation_code(
  situation_code,
  home_goalie_player_id,
  away_goalie_player_id,
  home_skater_player_ids,
  away_skater_player_ids
)

Arguments

situation_code

raw API situation code

home_goalie_player_id

parsed home goalie player ID

away_goalie_player_id

parsed away goalie player ID

home_skater_player_ids

parsed home skater player IDs

away_skater_player_ids

parsed away skater player IDs

Value

logical scalar


Build the HTML play-by-play report URL

Description

.html_pbp_report_url() returns the NHL HTML play-by-play report URL for a game.

Usage

.html_pbp_report_url(game)

Arguments

game

game ID

Value

character scalar URL


Build an HTML report request

Description

.html_report_request() constructs an HTML report request with the same retry policy used for API calls.

Usage

.html_report_request(url)

Arguments

url

character scalar

Value

httr2 request object


Resolve a roster player ID

Description

.lookup_roster_player_id() resolves a player ID from team, sweater number, and optional name information within a roster lookup table.

Usage

.lookup_roster_player_id(
  roster_lookup,
  team_id,
  sweater_number,
  player_name = NA_character_
)

Arguments

roster_lookup

standardized roster lookup data.frame

team_id

team ID

sweater_number

sweater number

player_name

optional player name

Value

integer player ID or NA_integer_


Mask HTML on-ice columns on unsupported events

Description

.mask_strength_context_block() sets HTML-derived on-ice player-ID and timing columns to NA on event types that are not supported by the HTML on-ice player pipeline.

Usage

.mask_strength_context_block(play_by_play)

Arguments

play_by_play

data.frame play-by-play object

Value

data.frame with unsupported rows masked


Match HTML play-by-play rows to API rows

Description

.match_html_pbp_to_api() aligns parsed HTML play-by-play rows back to API play-by-play rows using exact keys, greedy scoring, and a reciprocal-best fallback for duplicate clusters.

Usage

.match_html_pbp_to_api(play_by_play, html_rows)

Arguments

play_by_play

data.frame API play-by-play object

html_rows

data.frame parsed HTML play-by-play rows

Value

data.frame of matched HTML rows with apiIndex


Parse an NHL API response as JSON

Description

.nhl_json_from_response() converts an httr2 response object into a parsed JSON object using the package's standard flattening settings.

Usage

.nhl_json_from_response(resp)

Arguments

resp

httr2 response object

Value

parsed JSON (i.e., data.frame or list)


Build an NHL API request

Description

.nhl_request() constructs an NHL API request with the standard retry policy used throughout the package.

Usage

.nhl_request(path, query = list(), type)

Arguments

path

character

query

list

type

character of 'w' for web, 's' for stats, and 'r' for records

Value

httr2 request object


Normalize the x and y coordinates for all the events (plays) in a play-by-play

Description

.normalize_coordinates() normalizes the x and y coordinates for all the events (plays) in a play-by-play such that they all attack towards +x. If homeTeamDefendingSide is not available, the home defending side in period 1 is inferred using zoneCode, isHome, and xCoord.

Usage

.normalize_coordinates(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 xCoordNorm and yCoordNorm


Normalize an HTML team abbreviation

Description

.normalize_html_team_abbrev() uppercases and strips punctuation from HTML team abbreviations so dotted legacy abbreviations still match.

Usage

.normalize_html_team_abbrev(x)

Arguments

x

character vector of team abbreviations

Value

normalized character vector


Normalize raw/internal play-by-play names to the public schema

Description

.normalize_public_pbp_names() renames the raw GameCenter/World Showcase column names used during ingest into the current public play-by-play schema. This helper is for the package's own ingest pipeline only and is not a legacy-input compatibility layer for downstream callers.

Usage

.normalize_public_pbp_names(play_by_play)

Arguments

play_by_play

data.frame play-by-play object

Value

data.frame with current public column names where available


Normalize roster person labels

Description

.normalize_roster_person() standardizes roster names for stable matching by uppercasing, trimming, collapsing whitespace, and transliterating accents.

Usage

.normalize_roster_person(x)

Arguments

x

character vector of player names

Value

normalized character vector


Normalize situation codes for parsing

Description

.normalize_situation_code_for_parse() pads 1-4 digit situation codes to four characters for internal parsing without rewriting the source column.

Usage

.normalize_situation_code_for_parse(situation_code)

Arguments

situation_code

vector of raw situation codes

Value

character vector of parse-ready situation codes


List on-ice player ID columns

Description

.on_ice_id_scalar_column_names() returns the public scalar goalie and skater ID column names used in enriched play-by-play outputs.

Usage

.on_ice_id_scalar_column_names(play_by_play = NULL, slot_count = NULL)

Arguments

play_by_play

optional data.frame whose existing on-ice columns should be inspected

slot_count

optional integer scalar minimum slot count requested by the caller

Value

character vector of on-ice player ID columns


Extract an integer on-ice column

Description

.on_ice_int_col() safely extracts an integer column from a data frame and returns NA values when the column is absent.

Usage

.on_ice_int_col(df, name)

Arguments

df

data.frame source object

name

column name to extract

Value

integer vector


List all scalar on-ice columns

Description

.on_ice_scalar_column_names() returns the scalar on-ice player ID and shift-timing columns used by the public play-by-play schema.

Usage

.on_ice_scalar_column_names(play_by_play = NULL, slot_count = NULL)

Arguments

play_by_play

optional data.frame whose existing on-ice columns should be inspected

slot_count

optional integer scalar minimum slot count requested by the caller

Value

character vector of scalar on-ice columns


Return the tracked number of on-ice skater slots

Description

.on_ice_skater_slots() returns the current number of skater slots tracked per team in play-by-play outputs. It guarantees the standard five skater columns and expands further when the input already contains overflow skater slots or when a caller requests a larger slot count.

Usage

.on_ice_skater_slots(play_by_play = NULL, slot_count = NULL, min_slots = 5L)

Arguments

play_by_play

optional data.frame whose existing on-ice columns should be inspected

slot_count

optional integer scalar minimum slot count requested by the caller

min_slots

integer scalar default floor for standard outputs

Value

integer scalar


Build scalar on-ice timing column names

Description

.on_ice_timing_scalar_column_names() returns the scalar goalie and skater timing column names for a timing metric suffix.

Usage

.on_ice_timing_scalar_column_names(
  metric_suffix,
  play_by_play = NULL,
  slot_count = NULL
)

Arguments

metric_suffix

scalar timing suffix

play_by_play

optional data.frame whose existing on-ice columns should be inspected

slot_count

optional integer scalar minimum slot count requested by the caller

Value

character vector of column names


Parse optional HTML on-ice rows from a parallel response

Description

.optional_html_pbp_rows_from_response() parses a fetched HTML play-by-play response when it succeeded and otherwise returns an empty data frame.

Usage

.optional_html_pbp_rows_from_response(
  resp,
  game,
  rosters,
  home_team_id,
  away_team_id,
  home_abbrev,
  away_abbrev
)

Arguments

resp

response or failure object

game

game ID

rosters

roster data.frame from play-by-play metadata

home_team_id

home-team ID

away_team_id

away-team ID

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

Value

data.frame of parsed HTML rows or an empty data.frame


Override derived strength context from resolved on-ice players

Description

.override_strength_context_from_html() updates the derived strength/count columns from a resolved HTML on-ice signature while leaving the raw situationCode column untouched.

Usage

.override_strength_context_from_html(
  play_by_play,
  idx,
  home_goalie,
  away_goalie,
  home_skaters,
  away_skaters
)

Arguments

play_by_play

data.frame play-by-play object

idx

row index to update

home_goalie

resolved home goalie player ID

away_goalie

resolved away goalie player ID

home_skaters

integer vector of resolved home skater IDs

away_skaters

integer vector of resolved away skater IDs

Value

data.frame with derived strength context updated for idx


Check whether a parallel request failed

Description

.parallel_request_failed() returns TRUE when a response object from .perform_parallel_requests() is an httr2 failure.

Usage

.parallel_request_failed(resp)

Arguments

resp

response or failure object

Value

logical scalar


Parse an HTML elapsed clock

Description

.parse_html_elapsed_clock() extracts the elapsed MM:SS clock from an HTML report time field and converts it to elapsed seconds in period.

Usage

.parse_html_elapsed_clock(x)

Arguments

x

HTML time field

Value

integer seconds elapsed in period or NA_integer_


Parse an HTML on-ice cell

Description

.parse_html_on_ice_cell() resolves a goalie and skater player-ID list from a single team on-ice HTML cell.

Usage

.parse_html_on_ice_cell(text, team_id, roster_lookup)

Arguments

text

on-ice cell text

team_id

team ID for the cell

roster_lookup

standardized roster lookup data.frame

Value

named list containing goalie and skater player IDs


Parse an HTML play-by-play document

Description

.parse_html_pbp_doc() extracts event rows, actor IDs, and on-ice player lists from an NHL HTML play-by-play report.

Usage

.parse_html_pbp_doc(
  doc,
  roster_lookup,
  home_team_id,
  away_team_id,
  home_abbrev,
  away_abbrev,
  is_playoffs = FALSE
)

Arguments

doc

parsed HTML document

roster_lookup

standardized roster lookup data.frame

home_team_id

home-team ID

away_team_id

away-team ID

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

is_playoffs

logical; whether the game is a playoff game

Value

data.frame of parsed HTML play-by-play rows


Parse an HTML on-ice play-by-play response

Description

.parse_html_pbp_response() converts an already-fetched HTML play-by-play response into parsed on-ice rows.

Usage

.parse_html_pbp_response(
  resp,
  game,
  rosters,
  home_team_id,
  away_team_id,
  home_abbrev,
  away_abbrev
)

Arguments

resp

httr2 response object for the HTML report

game

game ID

rosters

roster data.frame from play-by-play metadata

home_team_id

home-team ID

away_team_id

away-team ID

home_abbrev

home-team abbreviation

away_abbrev

away-team abbreviation

Value

data.frame of parsed HTML play-by-play rows


Parse an HTML period label

Description

.parse_html_period_label() converts HTML report period labels such as OT and SO into integer period numbers.

Usage

.parse_html_period_label(x, is_playoffs = FALSE)

Arguments

x

HTML period label

is_playoffs

logical; whether the game is a playoff game

Value

integer period number or NA_integer_


Parse situation-code components

Description

.parse_situation_code_components() converts situation codes into away/home goalie and skater counts without mutating the original source vector.

Usage

.parse_situation_code_components(situation_code)

Arguments

situation_code

vector of raw situation codes

Value

integer matrix with away/home goalie and skater counts


List public delta column names

Description

.pbp_delta_public_cols() returns the public-facing delta columns inserted by add_deltas().

Usage

.pbp_delta_public_cols()

Value

character vector of public delta column names


Perform multiple requests concurrently

Description

.perform_parallel_requests() executes a list of httr2 requests with libcurl multi support and preserves the input names on the output.

Usage

.perform_parallel_requests(reqs, on_error = c("stop", "return", "continue"))

Arguments

reqs

list of httr2 request objects

on_error

forwarded to httr2::req_perform_parallel()

Value

list of responses or httr2 failure objects


Identify shootout-eligible games for public play-by-play cleanup

Description

.public_pbp_is_shootout_eligible() returns TRUE for games whose overtime rules follow the regular-season shootout path.

Usage

.public_pbp_is_shootout_eligible(game_id, game_type_id)

Arguments

game_id

integer game IDs

game_type_id

integer game type IDs

Value

logical vector


Description

.public_pbp_legal_period_seconds() returns the nominal legal length for each play-by-play row's period under the relevant game context.

Usage

.public_pbp_legal_period_seconds(game_id, game_type_id, period)

Arguments

game_id

integer game IDs

game_type_id

integer game type IDs

period

integer period numbers

Value

integer vector of legal period lengths in seconds


Reconstruct skater counts from active penalties

Description

.reconstruct_skater_counts_from_penalties() walks a cleaned play-by-play in event order and reconstructs home/away skater counts from active strength- affecting penalties. The reconstruction intentionally targets regulation and playoff-strength states; regular-season overtime is left unsupported because its 3-on-3 penalty rules require a separate ruleset.

Usage

.reconstruct_skater_counts_from_penalties(play_by_play)

Arguments

play_by_play

data.frame cleaned internal play-by-play object

Value

data.frame with reconstructed home/away skater counts and metadata


Repair public play-by-play clock/order defects in boundary-row feeds

Description

.repair_public_pbp_sequence() removes rows with impossible clocks and reorders explicit-boundary feeds into a more coherent public sequence. The repair is intentionally scoped to the modern boundary-row era, where the audited issues are dominated by stale sort-order markers, early period-end rows, and opening faceoffs that arrive after live-play rows.

Usage

.repair_public_pbp_sequence(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 repaired clocks and ordering where feasible


Validate required public play-by-play columns

Description

.require_public_pbp_columns() errors when a public helper is called with a play-by-play missing required public schema columns.

Usage

.require_public_pbp_columns(play_by_play, cols, fn_name)

Arguments

play_by_play

data.frame play-by-play object

cols

character vector of required columns

fn_name

calling function name used in the error message

Value

NULL, invisibly, or an error if required columns are missing


Validate required shift-chart columns

Description

.require_shift_chart_columns() errors when a helper is called with a shift chart missing required public schema columns.

Usage

.require_shift_chart_columns(shift_chart, cols, fn_name)

Arguments

shift_chart

data.frame shift chart object

cols

character vector of required columns

fn_name

calling function name used in the error message

Value

NULL, invisibly, or an error if required columns are missing


Score HTML-to-API matching candidates

Description

.score_html_api_candidates() scores candidate API rows for a single HTML row using time, type, team, player, and local sequence agreement.

Usage

.score_html_api_candidates(api, html, cand, h_idx, last_api_seq = NULL)

Arguments

api

API-side matching table

html

HTML-side matching table

cand

integer candidate API indices

h_idx

HTML row index being scored

last_api_seq

optional last matched API sequence number

Value

named numeric vector of candidate scores


Build a shot-event mask

Description

.shot_event_mask() flags play-by-play rows matching selected event types.

Usage

.shot_event_mask(play_by_play, types)

Arguments

play_by_play

data.frame play-by-play object

types

character vector of event type keys to keep

Value

logical vector


Sort shift data for timing lookups

Description

.sort_shift_chart_for_timing() filters incomplete shift rows and sorts the remainder into the order expected by the timing resolvers.

Usage

.sort_shift_chart_for_timing(shift_data)

Arguments

shift_data

data.frame shift chart data

Value

filtered and sorted shift data.frame


Strip the game ID into the season ID, game type ID, and game number for all the events (plays) in a play-by-play

Description

.strip_game_id() strips the game ID into season ID, game type ID, and game number for all the events (plays) in a play-by-play.

Usage

.strip_game_id(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: seasonId, gameTypeId, and gameNumber


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


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

Description

.strip_time_period() strips the timestamp and period number into the time elapsed in the period and game for all the events (plays) in a play-by-play.

Usage

.strip_time_period(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 secondsElapsedInPeriod and secondsElapsedInGame


List HTML on-ice player-ID event types

Description

.supported_html_on_ice_id_event_types() returns the event types that are allowed to receive HTML-derived on-ice player IDs.

Usage

.supported_html_on_ice_id_event_types()

Value

character vector of supported on-ice player-ID event type keys


List strength-context event types

Description

.supported_strength_event_types() returns the event types that support the HTML row-matching pipeline.

Usage

.supported_strength_event_types()

Value

character vector of supported event type keys


Add event-to-event deltas to a play-by-play

Description

add_deltas() adds event-to-event deltas in raw and normalized x/y, distance, and angle for a play-by-play. Sequences are bounded by faceoffs: each sequence begins at a faceoff, faceoff rows do not look backward across the boundary, and subsequent events are compared to the most recent prior valid-spatial event in the same faceoff-bounded sequence. Shootout and penalty-shot rows (0101/1010) are left as NA and do not serve as anchors for later rows. When multiple events in a sequence share the same recorded second, zero-time denominators used internally are replaced by 1 / n, where n is the number of events in that same second within the sequence.

Usage

add_deltas(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

Value

data.frame with one row per event (play) and added columns: eventIdPrev, secondsElapsedInSequence, dSecondsElapsedInSequence, dXCoord, dYCoord, dXCoordNorm, dYCoordNorm, dDistance, dAngle, dXCoordPerSecond, dYCoordPerSecond, dXCoordNormPerSecond, dYCoordNormPerSecond, dDistancePerSecond, dAnglePerSecond


Add goalie biometrics to (a) play-by-play(s)

Description

add_goalie_biometrics() adds goalie biometrics (height, weight, hand, and age at game date) to (a) play-by-play(s) for shot attempts. Goalie identity is resolved from goalieInNetId first and goaliePlayerIdAgainst second. If neither is available on a row, the added goalie biometrics are left as NA.

Usage

add_goalie_biometrics(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

Value

data.frame with one row per event (play) and added columns: goalieHeight, goalieWeight, goalieHandCode, and goalieAge


Add on-ice shift times to a play-by-play

Description

add_shift_times() adds SecondsRemainingInShift, SecondsElapsedInShift, and SecondsElapsedInPeriodSinceLastShift columns for the on-ice goalies and skaters already present in a public play-by-play. It accepts either a single game play-by-play plus shift_chart() data or a season aggregate plus shift_charts() data.

Usage

add_shift_times(play_by_play, shift_chart)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

shift_chart

data.frame returned by shift_chart() or shift_charts()

Value

data.frame with one row per event (play) and added or updated scalar on-ice shift timing columns

Examples


  pbp <- gc_play_by_play(game = 2023030417)
  sc  <- shift_chart(game = 2023030417)
  pbp <- add_shift_times(pbp, sc)


Add shooter biometrics to (a) play-by-play(s)

Description

add_shooter_biometrics() adds shooter biometrics (height, weight, hand, age at game date, and position) to (a) play-by-play(s) for shot attempts.

Usage

add_shooter_biometrics(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays()

Value

data.frame with one row per event (play) and added columns: shooterHeight, shooterWeight, shooterHandCode, shooterAge, and shooterPositionCode


Access the attendance by season and game type

Description

attendance() retrieves the attendance by season and game type as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context.

Usage

attendance()

Value

data.frame with one row per season

Examples

all_attendance <- attendance()

Access all the award winners/finalists

Description

award_winners() retrieves all the award winners/finalists as a data.frame where each row represents winner/finalist and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

award_winners()

Value

data.frame with one row per winner/finalist

Examples

all_award_winners <- award_winners()

Access all the awards

Description

awards() retrieves all the awards as a data.frame where each row represents award and includes detail on recognition, leaderboard, and milestone-watch context.

Usage

awards()

Value

data.frame with one row per award

Examples

all_awards <- awards()

Access the boxscore for a game, team, and position

Description

boxscore() retrieves the boxscore for a game, team, and position as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile plus production, workload, efficiency, and result-level performance outcomes.

Usage

boxscore(game = 2023030417, team = "home", position = "forwards")

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

team

character of 'h'/'home' or 'a'/'away'

position

character of 'f'/'forwards', 'd'/'defensemen', or 'g'/'goalies'

Value

data.frame with one row per player

Examples

boxscore_COL_forwards_Martin_Necas_legacy_game <- boxscore(
  game     = 2025020275,
  team     = 'H',
  position = 'F'
)

Access the playoff bracket for a season

Description

bracket() retrieves the playoff bracket for a season as a data.frame where each row represents series and includes detail on team identity, affiliation, and matchup-side context.

Usage

bracket(season = season_now())

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per series

Examples

bracket_20242025 <- bracket(season = 20242025)

Calculate the expected goals for all the shots in (a) play-by-plays

Description

calculate_expected_goals() scores shot events with nhlscraper's built-in ridge expected-goals model. The runtime model is a fixed six-partition system: sd (5v5), ev (other even strength), pp (power play), sh (short-handed), en (empty net against), and ps (penalty shot; trained on penalty-shot and shootout-style rows). The legacy model argument is accepted for backward compatibility but ignored.

Usage

calculate_expected_goals(play_by_play, model = NULL)

calculate_xG(play_by_play, model = NULL)

Arguments

play_by_play

data.frame of play-by-play(s) using the current public schema returned by gc_play_by_play(), gc_play_by_plays(), wsc_play_by_play(), or wsc_play_by_plays(). Legacy alias-only columns such as typeDescKey, period, SOGFor, SOGAgainst, and SOGDifferential are no longer backfilled by the xG scorer.

model

deprecated legacy model selector; ignored

Value

data.frame with one row per event (play) and added xG column

Examples

# May take >5s, so skip.

  pbp <- gc_play_by_play()
  pbp_with_xg <- calculate_expected_goals(play_by_play = pbp)


Access the career statistics for all the coaches

Description

coach_career_statistics() retrieves the career statistics for all the coaches as a data.frame where each row represents coach and includes detail on ranking movement, points pace, and division/conference position signals.

Usage

coach_career_statistics()

coach_career_stats()

Value

data.frame with one row per coach

Examples

coach_career_stats <- coach_career_statistics()

Access the statistics for all the coaches by franchise and game type

Description

coach_franchise_statistics() retrieves the statistics for all the coaches by franchise and game type as a data.frame where each row represents franchise per coach per game type and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

coach_franchise_statistics()

coach_franchise_stats()

Value

data.frame with one row per franchise per coach per game type

Examples

coach_franchise_stats <- coach_franchise_statistics()

Access all the coaches

Description

coaches() retrieves all the coaches as a data.frame where each row represents coach and includes detail on team identity, affiliation, and matchup-side context plus player identity, role, handedness, and biographical profile.

Usage

coaches()

Value

data.frame with one row per coach

Examples

all_coaches <- coaches()

Access the draft combine reports

Description

combine_reports() retrieves the draft combine reports as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile.

Usage

combine_reports()

Value

data.frame with one row per player

Examples

combine_reports <- combine_reports()

Access all contracts from packaged internal data

Description

contracts() loads preprocessed contract records bundled with the package and returns a cleaned data.frame with package-consistent column names, season IDs, numeric money fields, and team/player identifiers.

Usage

contracts()

Value

data.frame with one row per contract

Examples

all_contracts <- contracts()

Access all the countries

Description

countries() retrieves all the countries as a data.frame where each row represents country and includes detail on reference metadata, regional context, and media availability detail.

Usage

countries()

Value

data.frame with one row per country

Examples

all_countries <- countries()

Convert dot-delimited names to camelCase

Description

Convert dot-delimited names to camelCase

Usage

dot_to_camel(x)

Arguments

x

character vector

Value

character vector


Access all the draft picks

Description

draft_picks() retrieves all the draft picks as a data.frame where each row represents pick and includes detail on team identity, affiliation, and matchup-side context plus player identity, role, handedness, and biographical profile.

Usage

draft_picks()

Value

data.frame with one row per pick

Examples

# May take >5s, so skip.
all_draft_picks <- draft_picks()

Access all the draft prospects

Description

draft_prospects() retrieves all the draft prospects as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile plus broadcast carriage, media availability, and viewing-link metadata.

Usage

draft_prospects()

Value

data.frame with one row per player

Examples

# May take >5s, so skip.
all_prospects <- draft_prospects()

Access the draft rankings for a class and category

Description

draft_rankings() retrieves the draft rankings for a class and category as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile plus draft-board context, scouting background, and pick/round progression.

Usage

draft_rankings(class = season_now()%%10000, category = 1)

Arguments

class

integer in YYYY (e.g., 2017); see drafts() for reference

category

integer in 1:4 (where 1 = North American Skaters, 2 = International Skaters, 3 = North American Goalies, and 4 = International Goalies) OR character of 'NAS'/'NA Skaters'/'North American Skaters', 'INTLS'/'INTL Skaters'/'International Skaters', 'NAG'/'NA Goalies'/'North American Goalies', 'INTLG'/'INTL Goalies'/'International Goalies'

Value

data.frame with one row per player

Examples

draft_rankings_INTL_Skaters_2017 <- draft_rankings(
  class    = 2017, 
  category = 2
)

Access the real-time draft tracker

Description

draft_tracker() retrieves the real-time draft tracker as a data.frame where each row represents player and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and venue/location geography and regional metadata.

Usage

draft_tracker()

Value

data.frame with one row per player

Examples

draft_tracker <- draft_tracker()

Access all the drafts

Description

drafts() retrieves all the drafts as a data.frame where each row represents draft and includes detail on venue/location geography and regional metadata.

Usage

drafts()

Value

data.frame with one row per draft

Examples

all_drafts <- drafts()

Draw a full NHL rink

Description

draw_NHL_rink() draws a full NHL rink such that the x and y coordinates span -100 to 100 and -43 to +43, respectively. Use graphics::points() to create custom graphs; check out an example on the online documentation!

Usage

draw_NHL_rink()

Value

NULL

Examples

draw_NHL_rink()

Draw an arc on the rink

Description

draw_rink_arc() draws an arc on the rink.

Usage

draw_rink_arc(cx, cy, r, theta1, theta2, n = 100, col = "black", lwd = 1)

Arguments

cx

numeric x coordinate of the circle center

cy

numeric y coordinate of the circle center

r

numeric radius

theta1

numeric start angle of arc

theta2

numeric end angle of arc

n

integer number of points used to approximate arc

col

character color

lwd

numeric line width

Value

NULL


Draw a circle on the rink

Description

draw_rink_circle() draws a circle on the rink.

Usage

draw_rink_circle(x, y, r, n = 200, col = "black", lwd = 1)

Arguments

x

numeric x coordinate of the circle center

y

numeric y coordinate of the circle center

r

numeric radius

n

integer number of points used to approximate circle

col

character color

lwd

numeric line width

Value

NULL


Call the ESPN API with 429 (rate limit) error-handling

Description

Call the ESPN API with 429 (rate limit) error-handling

Usage

espn_api(path, query = list(), type)

Arguments

path

character

query

list

type

character of 'g' for general and 'c' for core

Value

parsed JSON (i.e., data.frame or list)


Access the ESPN futures for a season

Description

espn_futures() retrieves the ESPN futures for a season as a data.frame where each row represents type and includes detail on betting market snapshots with side/total prices and provider variation.

Usage

espn_futures(season = season_now())

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

nested data.frame with one row per type (outer) and book (inner)

Examples

ESPN_futures_20252026 <- espn_futures(20252026)

Access the ESPN odds for a game

Description

espn_game_odds() retrieves the ESPN odds for a game as a data.frame where each row represents provider and includes detail on team identity, affiliation, and matchup-side context plus betting market snapshots with side/total prices and provider variation.

Usage

espn_game_odds(game = 401777460)

Arguments

game

integer ID (e.g., 401777460); see espn_games() for reference

Value

data.frame with one row per provider

Examples

ESPN_odds_SCF_20242025 <- espn_game_odds(game = 401777460)

Access the ESPN summary for a game

Description

espn_game_summary() retrieves the ESPN summary for a game as a nested list that separates summary and detail blocks for date/season filtering windows and chronological context, venue/location geography and regional metadata, and playoff-series progression, round status, and series leverage.

Usage

espn_game_summary(game = 401777460)

Arguments

game

integer ID (e.g., 401777460); see espn_games() for reference

Value

list with various items

Examples

ESPN_summary_SCF_20242025 <- espn_game_summary(game = 401777460)

Access the ESPN games for a season

Description

espn_games() retrieves the ESPN games for a season as a data.frame where each row represents ESPN and includes detail on game timing, matchup state, scoring flow, and situational event detail.

Usage

espn_games(season = season_now())

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per ESPN game

Examples

ESPN_games_20242025 <- espn_games(season = 20242025)

Access the real-time ESPN injury reports

Description

espn_injuries() retrieves the real-time ESPN injury reports as a data.frame where each row represents team and includes detail on availability status tracking for injuries or transactions.

Usage

espn_injuries()

Value

nested data.frame with one row per team (outer) and player (inner)

Examples

ESPN_injuries_now <- espn_injuries()

Access the ESPN play-by-play for a game

Description

espn_play_by_play() retrieves the ESPN play-by-play for a game as a data.frame where each row represents event and includes detail on game timeline state, period/clock progression, and matchup flow, team identity, affiliation, and matchup-side context, and situational splits across home/road, strength state, and overtime/shootout states.

Usage

espn_play_by_play(game = 401777460)

espn_pbp(game = 401777460)

Arguments

game

integer ID (e.g., 401777460); see espn_games() for reference

Value

data.frame with one row per event (play)

Examples

ESPN_pbp_SCF_20242025 <- espn_play_by_play(game = 401777460)

Access the ESPN summary for a player

Description

espn_player_summary() retrieves the ESPN summary for a player as a data.frame where each row represents one result and includes detail on game timing, matchup state, scoring flow, and situational event detail.

Usage

espn_player_summary(player = 3988803)

Arguments

player

integer ID (e.g., 3988803); see espn_players() for reference

Value

data.frame with one row

Examples

ESPN_summary_Charlie_McAvoy <- espn_player_summary(player = 3988803)

Access all the ESPN players

Description

espn_players() retrieves all the ESPN players as a data.frame where each row represents ESPN player and includes detail on person-level profile context and performance history with situational splits.

Usage

espn_players()

Value

data.frame with one row per ESPN player

Examples

all_ESPN_players <- espn_players()

Access the ESPN summary for a team

Description

espn_team_summary() retrieves the ESPN summary for a team as a data.frame where each row represents one result and includes detail on game timing, matchup state, scoring flow, and situational event detail.

Usage

espn_team_summary(team = 1)

Arguments

team

integer ID (e.g., 1); see espn_teams() for reference

Value

data.frame with one row

Examples

ESPN_summary_Boston_Bruins <- espn_team_summary(team = 1)

Access all the ESPN teams

Description

espn_teams() retrieves all the ESPN teams as a data.frame where each row represents ESPN team and includes detail on team composition, matchup context, and season progression detail.

Usage

espn_teams()

Value

data.frame with one row per ESPN team

Examples

all_ESPN_teams <- espn_teams()

Access the ESPN transactions for a season

Description

espn_transactions() retrieves the ESPN transactions for a season as a data.frame where each row represents transaction and includes detail on availability and transaction-status tracking detail.

Usage

espn_transactions(season = season_now())

Arguments

season

integer in YYYYYYYY (e.g., 20242025); the summer of the latter year is included

Value

data.frame with one row per transaction

Examples

ESPN_transactions_20242025 <- espn_transactions(season = 20242025)

Access all the expansion draft picks

Description

expansion_draft_picks() retrieves all the expansion draft picks as a data.frame where each row represents pick and includes detail on date/season filtering windows and chronological context plus team identity, affiliation, and matchup-side context.

Usage

expansion_draft_picks()

Value

data.frame with one row per pick

Examples

all_expansion_draft_picks <- expansion_draft_picks()

Access all the expansion drafts

Description

expansion_drafts() retrieves all the expansion drafts as a data.frame where each row represents expansion draft and includes detail on date/season filtering windows and chronological context plus reference definitions and rules-framework information.

Usage

expansion_drafts()

Value

data.frame with one row per expansion draft

Examples

all_expansion_drafts <- expansion_drafts()

Access the playoff series results for all the franchises by situation

Description

franchise_playoff_situational_results() retrieves the playoff series results for all the franchises by situation as a data.frame where each row represents franchise per situation and includes detail on team identity, affiliation, and matchup-side context.

Usage

franchise_playoff_situational_results()

Value

data.frame with one row per franchise per situation

Examples

franchise_playoff_situational_results <- 
  franchise_playoff_situational_results()

Access the statistics for all the franchises by season and game type

Description

franchise_season_statistics() retrieves the statistics for all the franchises by season and game type as a data.frame where each row represents franchise per season per game type and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and production, workload, efficiency, and result-level performance outcomes.

Usage

franchise_season_statistics()

franchise_season_stats()

Value

data.frame with one row per franchise per season per game type

Examples

# May take >5s, so skip.
franchise_season_stats <- franchise_season_statistics()

Access the all-time statistics for all the franchises by game type

Description

franchise_statistics() retrieves the all-time statistics for all the franchises by game type as a data.frame where each row represents franchise per game type and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and production, workload, efficiency, and result-level performance outcomes.

Usage

franchise_statistics()

franchise_stats()

Value

data.frame with one row per franchise per game type

Examples

franchise_stats <- franchise_statistics()

Access the all-time statistics for all the franchises by team and game type

Description

franchise_team_statistics() retrieves the all-time statistics for all the franchises by team and game type as a data.frame where each row represents team per franchise per game type and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and production, workload, efficiency, and result-level performance outcomes.

Usage

franchise_team_statistics()

franchise_team_stats()

Value

data.frame with one row per team per franchise per game type

Examples

franchise_team_stats <- franchise_team_statistics()

Access the all-time statistics versus other franchises for all the franchises by game type

Description

franchise_versus_franchise() retrieves the all-time statistics versus other franchises for all the franchises by game type as a data.frame where each row represents franchise per franchise per game type and includes detail on date/season filtering windows and chronological context plus team identity, affiliation, and matchup-side context.

Usage

franchise_versus_franchise()

franchise_vs_franchise()

Value

data.frame with one row per franchise per franchise per game type

Examples

# May take >5s, so skip.
franchise_vs_franchise <- franchise_versus_franchise()

Access all the franchises

Description

franchises() retrieves all the franchises as a data.frame where each row represents franchise and includes detail on team identity, affiliation, and matchup-side context.

Usage

franchises()

Value

data.frame with one row per franchise

Examples

all_franchises <- franchises()

Access the real-time game odds for a country by partnered bookmaker

Description

game_odds() retrieves the real-time game odds for a country by partnered bookmaker as a data.frame where each row represents game and includes detail on betting market lines, prices, and provider-level context.

Usage

game_odds(country = "US")

Arguments

country

two-letter code (e.g., 'CA'); see countries() for reference

Value

data.frame with one row per game

Examples

game_odds_CA <- game_odds(country = 'CA')

Access the rosters for a game

Description

game_rosters() retrieves the rosters for a game as a data.frame where each row represents player and includes detail on team identity, affiliation, and matchup-side context plus player identity, role, handedness, and biographical profile.

Usage

game_rosters(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per player

Examples

rosters_Martin_Necas_legacy_game <- game_rosters(game = 2025020275)

Access the game type as of now

Description

game_type_now() retrieves the game type as of now and returns a scalar integer used as the current-context default in season/game-type dependent wrappers.

Usage

game_type_now()

Value

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season)

Examples

game_type_now <- game_type_now()

Access all the games

Description

games() retrieves all the games as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow plus date/season filtering windows and chronological context.

Usage

games()

Value

data.frame with one row per game

Examples

# May take >5s, so skip.
all_games <- games()

Access the GameCenter (GC) play-by-play for a game

Description

gc_play_by_play() retrieves the GameCenter (GC) play-by-play for a game as a data.frame where each row represents an event. The returned schema is the cleaned, public-facing play-by-play schema, including canonical names such as periodNumber, eventTypeCode, eventTypeDescKey, homeShots, shotsFor, penaltyTypeDescKey, penaltyDuration, servedByPlayerId, goalieInNetId, and HTML-report-derived on-ice player ID columns such as homeGoaliePlayerId, awayGoaliePlayerId, homeSkater1PlayerId, and any additional overflow skater slots required by the game. HTML report skater and goalie IDs are returned whenever they can be matched back to a supported row, even when the raw situationCode is stale. Use add_shift_times() with shift_chart() (or shift_charts()) to add on-ice shift timing columns.

Usage

gc_play_by_play(game = 2023030417)

gc_pbp(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per event (play)

Examples

# May take >5s, so skip.
gc_pbp_Martin_Necas_legacy_game <- gc_play_by_play(game = 2025020275)

Access the raw GameCenter (GC) play-by-play for a game

Description

gc_play_by_play_raw() returns the raw flattened GameCenter play-by-play as served by the NHL API for one game. Use gc_play_by_play() for the cleaned public schema that repairs common clock/order defects and appends the derived public columns.

Usage

gc_play_by_play_raw(game = 2023030417)

gc_pbp_raw(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per event (play)

Examples

gc_raw_Martin_Necas_legacy_game <- gc_play_by_play_raw(game = 2025020275)

Access the GameCenter (GC) play-by-plays for a season

Description

gc_play_by_plays() loads the GC play-by-plays for a given season.

Usage

gc_play_by_plays(season = 20242025)

gc_pbps(season = 20242025)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per event (play) per game

Examples

# May take >5s, so skip.
gc_pbps_20212022 <- gc_play_by_plays(season = 20212022)

Access the raw GameCenter (GC) play-by-plays for a season

Description

gc_play_by_plays_raw() loads the raw GC play-by-plays for a given season.

Usage

gc_play_by_plays_raw(season = 20242025)

gc_pbps_raw(season = 20242025)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per raw event (play) per game

Examples

# May take >5s, so skip.
gc_pbps_raw_20212022 <- gc_play_by_plays_raw(season = 20212022)

Access the GameCenter (GC) summary for a game

Description

gc_summary() retrieves the GameCenter (GC) summary for a game as a nested list that separates summary and detail blocks for game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and venue/location geography and regional metadata.

Usage

gc_summary(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

list of various items

Examples

gc_summary_Martin_Necas_legacy_game <- gc_summary(game = 2025020275)

Access all the general managers

Description

general_managers() retrieves all the general managers as a data.frame where each row represents general manager and includes detail on player identity, role, handedness, and biographical profile.

Usage

general_managers()

gms()

Value

data.frame with one row per general manager

Examples

all_GMs <- general_managers()

Access the attendance by season and game type

Description

get_attendance() is deprecated. Use attendance() instead.

Usage

get_attendance()

Value

data.frame with one row per season


Access all the award winners/finalists

Description

get_award_winners() is deprecated. Use award_winners() instead.

Usage

get_award_winners()

Value

data.frame with one row per winner/finalist


Access all the awards

Description

get_awards() is deprecated. Use awards() instead.

Usage

get_awards()

Value

data.frame with one row per award


Access the playoff bracket for a season

Description

get_bracket() is deprecated. Use bracket() instead.

Usage

get_bracket(season = season_now())

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per series


Access the configurations for team, skater, and goalie reports

Description

get_configuration() is defunct. Use team_report_configurations(), skater_report_configurations(), and/or goalie_report_configurations() instead.

Usage

get_configuration()

Access all the countries

Description

get_countries() is deprecated. Use countries() instead.

Usage

get_countries()

Value

data.frame with one row per country


Access all the draft picks

Description

get_draft_picks() is deprecated. Use draft_picks() instead.

Usage

get_draft_picks()

Value

data.frame with one row per pick


Access the draft rankings for a year and player type

Description

get_draft_rankings() is deprecated. Use draft_rankings() instead.

Usage

get_draft_rankings(year = season_now()%/%10000, player_type = 1)

Arguments

year

integer in YYYY (e.g., 2017); see drafts() for reference

player_type

integer in 1:4 (where 1 = North American Skaters, 2 = International Skaters, 3 = North American Goalies, and 4 = International Goalies)

Value

data.frame with one row per player


Access the real-time draft tracker

Description

get_draft_tracker() is deprecated. Use draft_tracker() instead.

Usage

get_draft_tracker()

Value

data.frame with one row per player


Access all the drafts

Description

get_drafts() is deprecated. Use drafts() instead.

Usage

get_drafts()

Value

data.frame with one row per draft


Access the ESPN summary for an athlete (player) and season

Description

get_espn_athlete() is defunct. Use espn_player_summary() instead.

Usage

get_espn_athlete()

Access all the ESPN athletes (players)

Description

get_espn_athletes() is deprecated. Use espn_players() instead.

Usage

get_espn_athletes()

Value

data.frame with one row per ESPN athlete (player)


Access the ESPN statistics for a coach and (multiple) season(s)

Description

get_espn_coach() is defunct. Use coach_career_statistics() instead.

Usage

get_espn_coach()

Access the career ESPN statistics for a coach

Description

get_espn_coach_career() is defunct. Use coach_career_statistics() instead.

Usage

get_espn_coach_career()

Access the ESPN coaches for a season

Description

get_espn_coaches() is defunct. Use coaches() instead.

Usage

get_espn_coaches()

Access the ESPN summary for an event (game)

Description

get_espn_event() is deprecated. Use espn_game_summary() instead.

Usage

get_espn_event(event = 401777460)

Arguments

event

integer ID (e.g., 401777460); see espn_games() for reference

Value

data.frame with one row per event (game)


Access the ESPN odds for an event (game)

Description

get_espn_event_odds() is deprecated. Use espn_game_odds() instead.

Usage

get_espn_event_odds(event = 401777460)

Arguments

event

integer ID (e.g., 401777460); see espn_games() for reference

Value

data.frame with one row per provider


Access the officials for an ESPN event (game)

Description

get_espn_event_officials() is defunct. Use gc_summary() and/or wsc_summary() instead.

Usage

get_espn_event_officials()

Access the ESPN play-by-play for an event (game)

Description

get_espn_event_play_by_play() is deprecated. Use espn_play_by_play() instead.

Usage

get_espn_event_play_by_play(event = 401777460)

Arguments

event

integer ID (e.g., 401777460); see espn_games() for reference

Value

data.frame with one row per play


Access the three stars for an ESPN event (game)

Description

get_espn_event_stars() is defunct. Use gc_summary() and/or wsc_summary() instead.

Usage

get_espn_event_stars()

Access the ESPN events (games) by start and end dates

Description

get_espn_events() is defunct. Use espn_games() instead.

Usage

get_espn_events()

Access the ESPN futures for a season

Description

get_espn_futures() is defunct. Use espn_futures() instead.

Usage

get_espn_futures()

Access the real-time ESPN injury reports

Description

get_espn_injuries() is deprecated. Use espn_injuries() instead.

Usage

get_espn_injuries()

Value

nested data.frame with one row per team (outer) and player (inner)


Access the ESPN summary for a team and season

Description

get_espn_team() is defunct. Use espn_team_summary() instead.

Usage

get_espn_team()

Access all the ESPN teams for a season

Description

get_espn_teams() is defunct. Use espn_teams() instead.

Usage

get_espn_teams()

Access the ESPN transactions by start and end dates

Description

get_espn_transactions() is defunct. Use espn_transactions() instead.

Usage

get_espn_transactions()

Access the statistics for all the franchises by season and game type

Description

get_franchise_season_by_season() is deprecated. Use franchise_season_statistics() instead.

Usage

get_franchise_season_by_season()

Value

data.frame with one row per franchise per season per game type


Access the all-time statistics for all the franchises by team and game type

Description

get_franchise_team_totals() is deprecated. Use franchise_team_statistics() instead.

Usage

get_franchise_team_totals()

Value

data.frame with one row per team per franchise per game type


Access the all-time statistics versus other franchises for all the franchises by game type

Description

get_franchise_vs_franchise() is deprecated. Use franchise_versus_franchise() instead.

Usage

get_franchise_vs_franchise()

Value

data.frame with one row per franchise per franchise per game type


Access all the franchises

Description

get_franchises() is deprecated. Use franchises() instead.

Usage

get_franchises()

Value

data.frame with one row per franchise


Access the boxscore for a game, team, and player type

Description

get_game_boxscore() is deprecated. Use boxscore() instead.

Usage

get_game_boxscore(game = 2023030417, team = "home", player_type = "forwards")

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

team

character of 'home' or 'away'

player_type

character of 'forwards', 'defense', or 'goalies'

Value

data.frame with one row per player


Access the GameCenter (GC) summary for a game

Description

get_game_landing() is deprecated. Use gc_summary() instead.

Usage

get_game_landing(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

list of various items


Access the World Showcase (WSC) summary for a game

Description

get_game_story() is deprecated. Use wsc_summary() instead.

Usage

get_game_story(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

list of various items


Access all the games

Description

get_games() is deprecated. Use games() instead.

Usage

get_games()

Value

data.frame with one row per game


Access the GameCenter (GC) play-by-play for a game

Description

get_gc_play_by_play() is deprecated. Use gc_play_by_play() instead.

Usage

get_gc_play_by_play(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per event (play)


Access the glossary

Description

get_glossary() is deprecated. Use glossary() instead.

Usage

get_glossary()

Value

data.frame with one row per terminology


Access the goalie statistics leaders for a season, game type, and category

Description

get_goalie_leaders() is deprecated. Use goalie_leaders() instead.

Usage

get_goalie_leaders(season = "current", game_type = "", category = "wins")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character of 'wins', 'shutouts', 'savePctg', or 'goalsAgainstAverage'

Value

data.frame with one row per player


Access the goalies on milestone watch

Description

get_goalie_milestones() is deprecated. Use goalie_milestones() instead.

Usage

get_goalie_milestones()

Value

data.frame with one row per player


Access various reports for all the goalies by season or game

Description

get_goalie_statistics() is defunct. Use goalie_season_report() or goalie_game_report() instead.

Usage

get_goalie_statistics()

Access all the goalies for a range of seasons

Description

get_goalies() is defunct. Use players() instead.

Usage

get_goalies()

Access all the officials

Description

get_officials() is deprecated. Use officials() instead.

Usage

get_officials()

Value

data.frame with one row per official


Access the real-time game odds for a country by partnered bookmaker

Description

get_partner_odds() is deprecated. Use game_odds() instead.

Usage

get_partner_odds(country = "US")

Arguments

country

two-letter code (e.g., 'CA'); see countries() for reference

Value

data.frame with one row per game


Access the game log for a player, season, and game type

Description

get_player_game_log() is deprecated. Use player_game_log() instead.

Usage

get_player_game_log(player = 8478402, season = "now", game_type = "")

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

Value

data.frame with one row per game


Access the summary for a player

Description

get_player_landing() is deprecated. Use player_summary() instead.

Usage

get_player_landing(player = 8478402)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

Value

list with various items


Access all the players

Description

get_players() is deprecated. Use players() instead.

Usage

get_players()

Value

data.frame with one row per player


Access the schedule for a date

Description

get_schedule() is deprecated. Use schedule() instead.

Usage

get_schedule(date = "2025-01-01")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per game


Access the scoreboards for a date

Description

get_scoreboards() is deprecated. Use scores() instead.

Usage

get_scoreboards(date = "now")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per game


Access the scores for a date

Description

get_scores() is deprecated. Use scores() instead.

Usage

get_scores(date = "now")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per game


Access the season and game type as of now

Description

get_season_now() is defunct. Use season_now() and/or game_type_now() instead.

Usage

get_season_now()

Access all the seasons

Description

get_seasons() is deprecated. Use seasons() instead.

Usage

get_seasons()

Value

data.frame with one row per season


Access the playoff series for a season and round

Description

get_series() is defunct.

Usage

get_series()

Access the playoff schedule for a season and series

Description

get_series_schedule() is deprecated. Use series_schedule() instead.

Usage

get_series_schedule(season = season_now(), series = "a")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

series

one-letter code (e.g., 'O'); see series() and/or bracket() for reference

Value

data.frame with one row per game


Access the shift charts for a game

Description

get_shift_charts() is deprecated. Use shift_chart() instead.

Usage

get_shift_charts(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per shift


Access the skater statistics leaders for a season, game type, and category

Description

get_skater_leaders() is deprecated. Use skater_leaders() instead.

Usage

get_skater_leaders(season = "current", game_type = "", category = "points")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character of 'assists', 'goals', 'goalsSh', 'goalsPp', 'points, 'penaltyMins', 'toi', 'plusMinus', or 'faceoffLeaders'

Value

data.frame with one row per player


Access the skaters on milestone watch

Description

get_skater_milestones() is deprecated. Use skater_milestones() instead.

Usage

get_skater_milestones()

Value

data.frame with one row per player


Access various reports for all the skaters by season or game

Description

get_skater_statistics() is defunct. Use skater_season_report() or skater_game_report() instead.

Usage

get_skater_statistics()

Access all the skaters for a range of seasons

Description

get_skaters() is defunct. Use players() instead.

Usage

get_skaters()

Access the spotlight players

Description

get_spotlight_players() is deprecated. Use spotlight_players() instead.

Usage

get_spotlight_players()

Value

data.frame with one row per player


Access the standings for a date

Description

get_standings() is deprecated. Use standings() instead.

Usage

get_standings(date = "2025-01-01")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per team


Access the standings rules by season

Description

get_standings_information() is deprecated. Use standings_rules() instead.

Usage

get_standings_information()

Value

data.frame with one row per season


Access all the streams

Description

get_streams() is deprecated. Use streams() instead.

Usage

get_streams()

Value

data.frame with one row per stream


Access the prospects for a team and position

Description

get_team_prospects() is deprecated. Use team_prospects() instead.

Usage

get_team_prospects(team = "NJD", player_type = "forwards")

Arguments

team

three-letter code (e.g., 'COL'); see teams() for reference

player_type

character of 'forwards', 'defensemen', or 'goalies'

Value

data.frame with one row per player


Access the roster for a team, season, and player type

Description

get_team_roster() is deprecated. Use roster() instead.

Usage

get_team_roster(team = "NJD", season = "current", player_type = "forwards")

Arguments

team

three-letter code (e.g., 'COL'); see teams() for reference

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

player_type

character of 'forwards', 'defensemen', or 'goalies'

Value

data.frame with one row per player


Access the roster statistics for a team, season, game type, and player type

Description

get_team_roster_statistics() is deprecated. Use roster_statistics() instead.

Usage

get_team_roster_statistics(
  team = "NJD",
  season = "now",
  game_type = 2,
  player_type = "skaters"
)

Arguments

team

three-letter code (e.g., 'COL'); see teams() for reference

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

player_type

character of 'skaters' or 'goalies'

Value

data.frame with one row per player


Access the schedule for a team and season

Description

get_team_schedule() is deprecated. Use team_season_schedule() instead.

Usage

get_team_schedule(team = "NJD", season = "now")

Arguments

team

three-letter code (e.g., 'COL'); see teams() for reference

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per game


Access the team scoreboard as of now

Description

get_team_scoreboard() is defunct.

Usage

get_team_scoreboard()

Access the season(s) and game type(s) in which a team played

Description

get_team_seasons() is deprecated. Use team_seasons() instead.

Usage

get_team_seasons(team = "NJD")

Arguments

team

three-letter code (e.g., 'COL'); see teams() for reference

Value

data.frame with one row per season


Access various reports for all the teams by season or game

Description

get_team_statistics() is defunct. Use team_season_report() and/or team_game_report() instead.

Usage

get_team_statistics()

Access all the teams

Description

get_teams() is deprecated. Use teams() instead.

Usage

get_teams()

Value

data.frame with one row per team


Access the NHL Network TV schedule for a date

Description

get_tv_schedule() is deprecated. Use tv_schedule() instead.

Usage

get_tv_schedule(date = "now")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per program


Access all the venues

Description

get_venues() is deprecated. Use venues() instead.

Usage

get_venues()

Value

data.frame with one row per venue


Access the World Showcase (WSC) play-by-play for a game

Description

get_wsc_play_by_play() is deprecated. Use wsc_play_by_play() instead.

Usage

get_wsc_play_by_play(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per event (play)


Access the glossary

Description

glossary() retrieves the glossary as a data.frame where each row represents terminology and includes detail on reference definitions and rules-framework information.

Usage

glossary()

Value

data.frame with one row per terminology

Examples

glossary <- glossary()

Access the EDGE 5 vs. 5 statistics for a goalie, season, game type, and category

Description

goalie_edge_five_versus_five() retrieves the EDGE 5 vs. 5 statistics for a goalie, season, game type, and category as a nested list that separates summary and detail blocks for production, workload, efficiency, and result-level performance outcomes plus NHL EDGE style tracking outputs and relative-performance context.

Usage

goalie_edge_five_versus_five(
  player = 8476945,
  season = "now",
  game_type = "",
  category = "details"
)

goalie_edge_5_vs_5(
  player = 8476945,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8478406)

season

integer in YYYYYYYY (e.g., 20242025); see goalie_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see goalie_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'l'/'l10'/'last 10'

Value

list with four items (category = 'details') or data.frame with one row per game (category = 'last 10')

Examples

Mackenzie_Blackwood_L10_5_vs_5_regular_20242025 <- goalie_edge_five_versus_five(
  player    = 8478406,
  season    = 20242025,
  game_type = 2,
  category  = 'L'
 )

Access the goalie EDGE statistics leaders for a season and game type

Description

goalie_edge_leaders() retrieves the goalie EDGE statistics leaders for a season and game type as a nested list that separates summary and detail blocks for NHL EDGE style tracking outputs and relative-performance context.

Usage

goalie_edge_leaders(season = "now", game_type = "")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see goalie_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see goalie_edge_seasons() for reference; most functions will NOT support pre-season

Value

list of various items

Examples

goalie_EDGE_leaders_regular_20242025 <- goalie_edge_leaders(
  season    = 20242025,
  game_type = 2
)

Access the EDGE save percentage statistics for a goalie, season, game type, and category

Description

goalie_edge_save_percentage() retrieves the EDGE save percentage statistics for a goalie, season, game type, and category as a nested list that separates summary and detail blocks for NHL EDGE style tracking outputs and relative-performance context.

Usage

goalie_edge_save_percentage(
  player = 8476945,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8478406)

season

integer in YYYYYYYY (e.g., 20242025); see goalie_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see goalie_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'l'/'l10'/'last 10'

Value

list with two items (category = 'details') or data.frame with one row per game (category = 'last 10')

Examples

Mackenzie_Blackwood_L10_sP_regular_20242025 <- 
  goalie_edge_save_percentage(
    player    = 8478406,
    season    = 20242025,
    game_type = 2,
    category  = 'L'
  )

Access the season(s) and game type(s) in which there exists goalie EDGE statistics

Description

goalie_edge_seasons() retrieves the season(s) and game type(s) in which there exists goalie EDGE statistics as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context plus NHL EDGE style tracking outputs and relative-performance context.

Usage

goalie_edge_seasons()

Value

data.frame with one row per season

Examples

goalie_EDGE_seasons <- goalie_edge_seasons()

Access the EDGE shot location statistics for a goalie, season, game type, and category

Description

goalie_edge_shot_location() retrieves the EDGE shot location statistics for a goalie, season, game type, and category as a data.frame where each row represents shot location and includes detail on production, workload, efficiency, and result-level performance outcomes plus NHL EDGE style tracking outputs and relative-performance context.

Usage

goalie_edge_shot_location(
  player = 8476945,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8478406)

season

integer in YYYYYYYY (e.g., 20242025); see goalie_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see goalie_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/details' or 't'/'totals'

Value

data.frame with one row per shot location

Examples

Mackenzie_Blackwood_shot_location_totals_regular_20242025 <- 
  goalie_edge_shot_location(
    player    = 8478406,
    season    = 20242025,
    game_type = 2,
    category  = 'T'
  )

Access the EDGE summary for a goalie, season, and game type

Description

goalie_edge_summary() retrieves the EDGE summary for a goalie, season, and game type as a nested list that separates summary and detail blocks for player identity, role, handedness, and biographical profile plus NHL EDGE style tracking outputs and relative-performance context.

Usage

goalie_edge_summary(player = 8476945, season = "now", game_type = "")

Arguments

player

integer ID (e.g., 8478406)

season

integer in YYYYYYYY (e.g., 20242025); see goalie_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see goalie_edge_seasons() for reference; most functions will NOT support pre-season

Value

list of various items

Examples

Mackenzie_Blackwood_EDGE_summary_regular_20242025 <- goalie_edge_summary(
  player    = 8478406, 
  season    = 20242025,
  game_type = 2
)

Access various reports for a season, game type, and category for all the goalies by game

Description

goalie_game_report() retrieves various reports for a season, game type, and category for all the goalies by game as a data.frame where each row represents game per goalie and includes detail on game timeline state, period/clock progression, and matchup flow, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

goalie_game_report(
  season = season_now(),
  game_type = game_type_now(),
  category = "summary"
)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character (e.g., 'advanced'); see goalie_report_configurations() for reference

Value

data.frame with one row per game per goalie

Examples

# May take >5s, so skip.
advanced_goalie_game_report_playoffs_20212022 <- 
  goalie_game_report(
    season    = 20212022, 
    game_type = 3, 
    category  = 'advanced'
  )

Access the scoring statistics for all the goalies by game

Description

goalie_game_scoring() retrieves the scoring statistics for all the goalies by game as a data.frame with detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

goalie_game_scoring()

Value

data.frame with one row per player per game

Examples

goalie_game_scoring <- goalie_game_scoring()

Access the statistics for all the goalies by game

Description

goalie_game_statistics() retrieves the statistics for all the goalies by game as a data.frame with detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

goalie_game_statistics()

goalie_game_stats()

Value

data.frame with one row per goalie per game

Examples

goalie_game_stats <- goalie_game_statistics()

Access the goalie statistics leaders for a season, game type, and category

Description

goalie_leaders() retrieves the goalie statistics leaders for a season, game type, and category as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile.

Usage

goalie_leaders(season = "current", game_type = "", category = "wins")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character of 'w'/'wins', 's'/shutouts', 's%'/'sP'/'save %'/'save percentage', or 'gaa'/'goals against average'

Value

data.frame with one row per player

Examples

GAA_leaders_regular_20242025 <- goalie_leaders(
  season    = 20242025,
  game_type = 2,
  category  = 'GAA'
)

Access the goalies on milestone watch

Description

goalie_milestones() retrieves the goalies on milestone watch as a data.frame where each row represents player and includes detail on date/season filtering windows and chronological context, player identity, role, handedness, and biographical profile, and ranking movement, points pace, and division/conference position signals.

Usage

goalie_milestones()

Value

data.frame with one row per player

Examples

goalie_milestones <- goalie_milestones()

Access the career regular season statistics for all the goalies

Description

goalie_regular_statistics() retrieves the career regular season statistics for all the goalies as a data.frame where each row represents goalie and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

goalie_regular_statistics()

goalie_regular_stats()

Value

data.frame with one row per goalie

Examples

goalie_career_regular_statistics <- goalie_regular_statistics()

Access the configurations for goalie reports

Description

goalie_report_configurations() retrieves the configurations for goalie reports as a nested list that separates summary and detail blocks for situational splits across home/road, strength state, and overtime/shootout states plus configuration catalogs for valid report categories and filters.

Usage

goalie_report_configurations()

goalie_report_configs()

Value

list with various items

Examples

goalie_report_configs <- goalie_report_configurations()

Access the career scoring statistics for all the goalies

Description

goalie_scoring() retrieves the career scoring statistics for all the goalies as a data.frame where each row represents player and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

goalie_scoring()

Value

data.frame with one row per player

Examples

goalie_scoring <- goalie_scoring()

Access various reports for a season, game type, and category for all the goalies by season

Description

goalie_season_report() retrieves various reports for a season, game type, and category for all the goalies by season as a data.frame where each row represents player and includes detail on date/season filtering windows and chronological context, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

goalie_season_report(
  season = season_now(),
  game_type = game_type_now(),
  category = "summary"
)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character (e.g., 'advanced'); see goalie_report_configurations() for reference

Value

data.frame with one row per player

Examples

# May take >5s, so skip.
advanced_goalie_season_report_playoffs_20212022 <- 
  goalie_season_report(
    season    = 20212022, 
    game_type = 3, 
    category  = 'advanced'
  )

Access the statistics for all the goalies by season, game type, and team.

Description

goalie_season_statistics() retrieves the statistics for all the goalies by season, game type, and team as a data.frame where each row represents player per season per game type, separated by team if applicable and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

goalie_season_statistics()

goalie_season_stats()

Value

data.frame with one row per player per season per game type, separated by team if applicable

Examples

goalie_season_stats <- goalie_season_statistics()

Access the playoff statistics for all the goalies by series

Description

goalie_series_statistics() retrieves the playoff statistics for all the goalies by series as a data.frame where each row represents player per series and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

goalie_series_statistics()

goalie_series_stats()

Value

data.frame with one row per player per series

Examples

goalie_series_stats <- goalie_series_statistics()

Access the career statistics for all the goalies

Description

goalie_statistics() retrieves the career statistics for all the goalies as a data.frame where each row represents player and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

goalie_statistics()

goalie_stats()

Value

data.frame with one row per player

Examples

goalie_stats <- goalie_statistics()

Save an Instagram (IG) share-able cumulative expected goals (xG) time-series plot for a game

Description

ig_game_cumulative_expected_goals() saves an IG share-able cumulative xG time-series plot for a given game as a PNG.

Usage

ig_game_cumulative_expected_goals(game = 2023030417, model = NULL, save = TRUE)

ig_game_cum_xG(game = 2023030417, model = NULL)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

model

deprecated legacy model selector; ignored

save

logical only FALSE for tests

Value

NULL

Examples

# May take >5s, so skip.
ig_game_cumulative_expected_goals(
  game  = 2023030417, 
  save  = FALSE
)

Save an Instagram (IG) share-able shot-location plot for a game

Description

ig_game_shot_locations() saves an IG share-able shot location plot for a given game.

Usage

ig_game_shot_locations(
  game = 2023030417,
  team = "home",
  model = NULL,
  save = TRUE
)

ig_game_shot_locs(game = 2023030417, team = "home", model = NULL)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

team

character of 'h'/'home' or 'a'/'away'

model

deprecated legacy model selector; ignored

save

logical only FALSE for tests

Value

NULL

Examples

# May take >5s, so skip.
ig_game_shot_locations(
  game  = 2023030417, 
  team  = 'H', 
  save  = FALSE
)

Access the location for a zip code

Description

location() retrieves the location for a zip code as a data.frame where each row represents team and includes detail on venue/location geography and regional metadata.

Usage

location(zip = 10001)

Arguments

zip

integer (e.g., 48304)

Value

data.frame with one row per team

Examples

Cranbrook_Schools <- location(48304)

Access the draft lottery odds

Description

lottery_odds() retrieves the draft lottery odds as a data.frame where each row represents draft lottery and includes detail on draft-cycle evaluation, ranking, and selection tracking detail.

Usage

lottery_odds()

Value

data.frame with one row per draft lottery

Examples

lottery_odds <- lottery_odds()

Call the NHL API with 429 (rate limit) error-handling

Description

Call the NHL API with 429 (rate limit) error-handling

Usage

nhl_api(path, query = list(), type)

Arguments

path

character

query

list

type

character of 'w' for web, 's' for stats, and 'r' for records

Value

parsed JSON (i.e., data.frame or list)


Normalize locale-style dotted columns to camelCase

Description

Converts dotted names (e.g., firstName.default, name.cs) to camelCase and removes trailing Default from default-language fields.

Usage

normalize_locale_names(x)

Arguments

x

character vector

Value

character vector


Normalize team abbreviation columns to team tri-code names

Description

Normalize team abbreviation columns to team tri-code names

Usage

normalize_team_abbrev_cols(x)

Arguments

x

character vector

Value

character vector


Normalize the team key

Description

Normalize the team key

Usage

normalize_team_key(team)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL')

Value

integer in 1:68, character full name, OR three-letter code


Access all the officials

Description

officials() retrieves all the officials as a data.frame where each row represents official and includes detail on player identity, role, handedness, and biographical profile plus coach/management/officiating identity and assignment history.

Usage

officials()

Value

data.frame with one row per official

Examples

all_officials <- officials()

Access all the penalty shots

Description

penalty_shots() retrieves all the penalty shots as a data.frame where each row represents penalty shot and includes detail on game timeline state, period/clock progression, and matchup flow plus date/season filtering windows and chronological context.

Usage

penalty_shots()

pss()

Value

data.frame with one row per penalty shot

Examples

all_pss <- penalty_shots()

Ping

Description

ping() is defunct.

Usage

ping()

Access the game log for a player, season, and game type

Description

player_game_log() retrieves the game log for a player, season, and game type as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow plus production, workload, efficiency, and result-level performance outcomes.

Usage

player_game_log(player = 8478402, season = "now", game_type = "")

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

Value

data.frame with one row per game

Examples

Martin_Necas_game_log_regular_20242025 <- player_game_log(
  player    = 8480039,
  season    = 20242025,
  game_type = 2
)

Access the season(s) and game type(s) in which a player played

Description

player_seasons() retrieves the season(s) and game type(s) in which a player played as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context.

Usage

player_seasons(player = 8478402)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

Value

data.frame with one row per season

Examples

Martin_Necas_seasons <- player_seasons(player = 8480039)

Access the summary for a player

Description

player_summary() retrieves the summary for a player as a nested list that separates summary and detail blocks for player identity, role, handedness, and biographical profile.

Usage

player_summary(player = 8478402)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

Value

list with various items

Examples

Martin_Necas_summary <- player_summary(player = 8480039)

Access all the players

Description

players() retrieves all the players as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile.

Usage

players()

Value

data.frame with one row per player

Examples

# May take >5s, so skip.
all_players <- players()

Access the playoff statistics by season

Description

playoff_season_statistics() retrieves the playoff statistics by season as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context.

Usage

playoff_season_statistics()

playoff_season_stats()

Value

data.frame with one row per season

Examples

playoff_season_stats <- playoff_season_statistics()

Access all the penalty shots

Description

ps() is deprecated. Use penalty_shots() instead.

Usage

ps()

Value

data.frame with one row per penalty shot


Access the replay for an event

Description

replay() retrieves the replay for an event as a data.frame where each row represents decisecond and includes detail on team identity, affiliation, and matchup-side context plus player identity, role, handedness, and biographical profile.

Usage

replay(game = 2023030417, event = 866)

Arguments

game

integer ID (e.g., 2025020262); see games() for reference

event

integer ID (e.g., 751); see gc_play_by_play() and/or wsc_play_by_play() for reference; must be a 'goal' event

Value

data.frame with one row per decisecond

Examples

Gabriel_Landeskog_first_regular_goal_back_replay <- replay(
  game  = 2025020262,
  event = 751
)

Access the replays for a season

Description

replays() loads the replays for a given season.

Usage

replays(season = 20242025)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per decisecond

Examples

# May take >5s, so skip.
replays_20252026 <- replays(season = 20252026)

Access the roster for a team, season, and position

Description

roster() retrieves the roster for a team, season, and position as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile.

Usage

roster(team = 1, season = "current", position = "forwards")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

position

character of 'f'/'forwards', 'd'/'defensemen', or 'g'/'goalies'

Value

data.frame with one row per player

Examples

COL_defensemen_20242025 <- roster(
  team     = 21,
  season   = 20242025,
  position = 'D'
)

Access the roster statistics for a team, season, game type, and position

Description

roster_statistics() retrieves the roster statistics for a team, season, game type, and position as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile plus production, workload, efficiency, and result-level performance outcomes.

Usage

roster_statistics(
  team = 1,
  season = "now",
  game_type = "",
  position = "skaters"
)

roster_stats(team = 1, season = "now", game_type = "", position = "skaters")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

position

character of 's'/'skaters' or 'g'/'goalies'

Value

data.frame with one row per player

Examples

COL_goalies_statistics_regular_20242025 <- roster_statistics(
  team      = 21,
  season    = 20242025,
  game_type = 2,
  position  = 'G'
)

Access the schedule for a date

Description

schedule() retrieves the schedule for a date as a data.frame where each row represents game and includes detail on game timing, matchup state, scoring flow, and situational event detail.

Usage

schedule(date = Sys.Date())

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per game

Examples

schedule_Halloween_2025 <- schedule(date = '2025-10-31')

Scope generic person-name columns to an entity

Description

Scope generic person-name columns to an entity

Usage

scope_person_name_cols(x, prefix)

Arguments

x

character vector

prefix

character scalar (e.g., 'player', 'goalie', 'skater')

Value

character vector


Access the scores for a date

Description

scores() retrieves the scores for a date as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

scores(date = "now")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per game

Examples

scores_Halloween_2025 <- scores(date = '2025-10-31')

Access the season as of now

Description

season_now() retrieves the season as of now and returns a scalar integer used as the current-context default in season/game-type dependent wrappers.

Usage

season_now()

Value

integer in YYYYYYYY (e.g., 20242025)

Examples

season_now <- season_now()

Access all the seasons

Description

seasons() retrieves all the seasons as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context.

Usage

seasons()

Value

data.frame with one row per season

Examples

all_seasons <- seasons()

Access all the playoff series by game

Description

series() retrieves all the playoff series by game as a data.frame where each row represents game per series and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and playoff-series progression, round status, and series leverage.

Usage

series()

Value

data.frame with one row per game per series

Examples

# May take >5s, so skip.
all_series <- series()

Access the playoff schedule for a season and series

Description

series_schedule() retrieves the playoff schedule for a season and series as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

series_schedule(season = season_now() - 10001, series = "a")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

series

one-letter code (e.g., 'O'); see series() and/or bracket() for reference

Value

data.frame with one row per game

Examples

SCF_schedule_20212022 <- series_schedule(
  season = 20212022, 
  series = 'O'
)

Access the shift chart for a game

Description

shift_chart() retrieves the shift chart for a game as a data.frame where each row represents shift and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

shift_chart(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per shift

Examples

shifts_Martin_Necas_legacy_game <- shift_chart(game = 2025020275)

Access the shift charts for a season

Description

shift_charts() loads the shift charts for a given season.

Usage

shift_charts(season = 20242025)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per event (play) per game

Examples

# May take >5s, so skip.
shift_charts_20212022 <- shift_charts(season = 20212022)

Access the shift charts for a game

Description

shifts() is deprecated. Use shift_chart() instead.

Usage

shifts(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per shift


Access the skater EDGE statistics leaders for a season and game type

Description

skater_edge_leaders() retrieves the skater EDGE statistics leaders for a season and game type as a nested list that separates summary and detail blocks for NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_leaders(season = "now", game_type = "")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

Value

list of various items

Examples

skater_EDGE_leaders_regular_20242025 <- skater_edge_leaders(
  season    = 20242025,
  game_type = 2
)

Access the season(s) and game type(s) in which there exists skater EDGE statistics

Description

skater_edge_seasons() retrieves the season(s) and game type(s) in which there exists skater EDGE statistics as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context plus NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_seasons()

Value

data.frame with one row per season

Examples

skater_EDGE_seasons <- skater_edge_seasons()

Access the EDGE shot location statistics for a skater, season, game type, and category

Description

skater_edge_shot_location() retrieves the EDGE shot location statistics for a skater, season, game type, and category as a data.frame where each row represents shot location and includes detail on production, workload, efficiency, and result-level performance outcomes plus NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_shot_location(
  player = 8478402,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/details' or 't'/'totals'

Value

data.frame with one row per shot location

Examples

Martin_Necas_shot_location_totals_regular_20242025 <- 
  skater_edge_shot_location(
    player    = 8480039,
    season    = 20242025,
    game_type = 2,
    category  = 'T'
  )

Access the EDGE shot speed statistics for a skater, season, game type, and category

Description

skater_edge_shot_speed() retrieves the EDGE shot speed statistics for a skater, season, game type, and category as a nested list that separates summary and detail blocks for NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_shot_speed(
  player = 8478402,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'h'/'hardest'

Value

list with six items (category = 'details') or data.frame with one row per shot (category = 'hardest')

Examples

Martin_Necas_hardest_shots_regular_20242025 <- skater_edge_shot_speed(
  player    = 8480039,
  season    = 20242025,
  game_type = 2,
  category  = 'H'
)

Access the EDGE skating distance statistics for a skater, season, game type, and category

Description

skater_edge_skating_distance() retrieves the EDGE skating distance statistics for a skater, season, game type, and category as a data.frame where each row represents strength state and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and tracking/spatial detail such as location, speed, distance, and zone distribution.

Usage

skater_edge_skating_distance(
  player = 8478402,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'l'/'l10'/'last 10'

Value

data.frame with one row per strength state (category = 'details') or game (category = 'last 10')

Examples

Martin_Necas_L10_skating_distance_regular_20242025 <- 
  skater_edge_skating_distance(
    player    = 8480039,
    season    = 20242025,
    game_type = 2,
    category  = 'L'
  )

Access the EDGE skating speed statistics for a skater, season, game type, and category

Description

skater_edge_skating_speed() retrieves the EDGE skating speed statistics for a skater, season, game type, and category as a nested list that separates summary and detail blocks for NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_skating_speed(
  player = 8478402,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 't'/'top'/'top speeds'

Value

list with four items (category = 'details') or data.frame with one row per burst (category = 'top speeds')

Examples

Martin_Necas_top_speeds_regular_20242025 <- skater_edge_skating_speed(
  player    = 8480039,
  season    = 20242025,
  game_type = 2,
  category  = 'T'
)

Access the EDGE summary for a skater, season, and game type

Description

skater_edge_summary() retrieves the EDGE summary for a skater, season, and game type as a nested list that separates summary and detail blocks for player identity, role, handedness, and biographical profile plus NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_summary(player = 8478402, season = "now", game_type = "")

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

Value

list of various items

Examples

Martin_Necas_EDGE_summary_regular_20242025 <- skater_edge_summary(
  player    = 8480039, 
  season    = 20242025,
  game_type = 2
)

Access the EDGE zone time statistics for a skater, season, game type, and category

Description

skater_edge_zone_time() retrieves the EDGE zone time statistics for a skater, season, game type, and category as a data.frame where each row represents strength state and includes detail on NHL EDGE style tracking outputs and relative-performance context.

Usage

skater_edge_zone_time(
  player = 8478402,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

player

integer ID (e.g., 8480039); see players() for reference

season

integer in YYYYYYYY (e.g., 20242025); see skater_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see skater_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 's'/'starts'

Value

data.frame with one row per strength state (category = 'details') or list with six items (category = 'starts')

Examples

Martin_Necas_starts_regular_20242025 <- skater_edge_zone_time(
  player    = 8480039,
  season    = 20242025,
  game_type = 2,
  category  = 'S'
)

Access various reports for a season, game type, and category for all the skaters by game

Description

skater_game_report() retrieves various reports for a season, game type, and category for all the skaters by game as a data.frame where each row represents game per player and includes detail on game timeline state, period/clock progression, and matchup flow, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

skater_game_report(
  season = season_now(),
  game_type = game_type_now(),
  category = "summary"
)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character (e.g., 'puckPossessions'); see skater_report_configurations() for reference

Value

data.frame with one row per game per player

Examples

# May take >5s, so skip.
possession_skater_game_report_playoff_20212022 <- 
  skater_game_report(
    season    = 20212022, 
    game_type = 3, 
    category  = 'puckPossessions'
  )

Access the skater statistics leaders for a season, game type, and category

Description

skater_leaders() retrieves the skater statistics leaders for a season, game type, and category as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile.

Usage

skater_leaders(season = "current", game_type = "", category = "points")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

string of 'a'/'assists', 'g'/goals', 'shg'/'shorthanded goals', 'ppg'/'powerplay goals', 'p'/'points', 'pim'/penalty minutes'/'penalty infraction minutes', 'toi'/'time on ice', 'pm'/'plus minus', or 'f'/'faceoffs'

Value

data.frame with one row per player

Examples

TOI_leaders_regular_20242025 <- skater_leaders(
  season    = 20242025,
  game_type = 2,
  category  = 'TOI'
)

Access the skaters on milestone watch

Description

skater_milestones() retrieves the skaters on milestone watch as a data.frame where each row represents player and includes detail on date/season filtering windows and chronological context, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

skater_milestones()

Value

data.frame with one row per player

Examples

skater_milestones <- skater_milestones()

Access the career playoff statistics for all the skaters

Description

skater_playoff_statistics() retrieves the career playoff statistics for all the skaters as a data.frame where each row represents player and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

skater_playoff_statistics()

skater_playoff_stats()

Value

data.frame with one row per player

Examples

skater_playoff_stats <- skater_playoff_statistics()

Access the career regular season statistics for all the skaters

Description

skater_regular_statistics() retrieves the career regular season statistics for all the skaters as a data.frame where each row represents player and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

skater_regular_statistics()

skater_regular_stats()

Value

data.frame with one row per player

Examples

skater_regular_stats <- skater_regular_statistics()

Access the configurations for skater reports

Description

skater_report_configurations() retrieves the configurations for skater reports as a nested list that separates summary and detail blocks for production, workload, efficiency, and result-level performance outcomes, situational splits across home/road, strength state, and overtime/shootout states, and configuration catalogs for valid report categories and filters.

Usage

skater_report_configurations()

skater_report_configs()

Value

list with various items

Examples

skater_report_configs <- skater_report_configurations()

Access various reports for a season, game type, and category for all the skaters by season

Description

skater_season_report() retrieves various reports for a season, game type, and category for all the skaters by season as a data.frame where each row represents player and includes detail on date/season filtering windows and chronological context, player identity, role, handedness, and biographical profile, and production, workload, efficiency, and result-level performance outcomes.

Usage

skater_season_report(
  season = season_now(),
  game_type = game_type_now(),
  category = "summary"
)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character (e.g., 'puckPossessions'); see skater_report_configurations() for reference

Value

data.frame with one row per player

Examples

# May take >5s, so skip.
possession_skater_season_report_playoff_20212022 <- 
  skater_season_report(
    season    = 20212022, 
    game_type = 3, 
    category  = 'puckPossessions'
  )

Access the statistics for all the skaters by season, game type, and team

Description

skater_season_statistics() retrieves the statistics for all the skaters by season, game type, and team as a data.frame where each row represents player per season per game type, separated by team if applicable and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

skater_season_statistics()

skater_season_stats()

Value

data.frame with one row per player per season per game type, separated by team if applicable

Examples

# May take >5s, so skip.
skater_season_stats <- skater_season_statistics()

Access the playoff statistics for all the skaters by series

Description

skater_series_statistics() retrieves the playoff statistics for all the skaters by series as a data.frame where each row represents player per series and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and player identity, role, handedness, and biographical profile.

Usage

skater_series_statistics()

skater_series_stats()

Value

data.frame with one row per player per series

Examples

# May take >5s, so skip.
skater_series_stats <- skater_series_statistics()

Access the career statistics for all the skaters

Description

skater_statistics() retrieves the career statistics for all the skaters as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile plus production, workload, efficiency, and result-level performance outcomes.

Usage

skater_statistics()

skater_stats()

Value

data.frame with one row per player

Examples

skater_stats <- skater_statistics()

Access the spotlight players

Description

spotlight_players() retrieves the spotlight players as a data.frame where each row represents player and includes detail on team identity, affiliation, and matchup-side context plus player identity, role, handedness, and biographical profile.

Usage

spotlight_players()

Value

data.frame with one row per player

Examples

spotlight_players <- spotlight_players()

Access the standings for a date

Description

standings() retrieves the standings for a date as a data.frame where each row represents team and includes detail on date/season filtering windows and chronological context, production, workload, efficiency, and result-level performance outcomes, and ranking movement, points pace, and division/conference position signals.

Usage

standings(date = "now")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per team

Examples

standings_Halloween_2025 <- standings(date = '2025-10-31')

Access the standings rules by season

Description

standings_rules() retrieves the standings rules by season as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context.

Usage

standings_rules()

Value

data.frame with one row per season

Examples

standings_rules <- standings_rules()

Access all the streams

Description

streams() retrieves all the streams as a data.frame where each row represents stream and includes detail on reference metadata, regional context, and media availability detail.

Usage

streams()

Value

data.frame with one row per stream

Examples

all_streams <- streams()

Access the team EDGE statistics leaders for a season and game type

Description

team_edge_leaders() retrieves the team EDGE statistics leaders for a season and game type as a nested list that separates summary and detail blocks for NHL EDGE style tracking outputs and relative-performance context.

Usage

team_edge_leaders(season = "now", game_type = "")

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

Value

list of various items

Examples

team_EDGE_leaders_regular_20242025 <- team_edge_leaders(
  season    = 20242025,
  game_type = 2
)

Access the season(s) and game type(s) in which there exists team EDGE statistics

Description

team_edge_seasons() retrieves the season(s) and game type(s) in which there exists team EDGE statistics as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context plus NHL EDGE style tracking outputs and relative-performance context.

Usage

team_edge_seasons()

Value

data.frame with one row per season

Examples

team_EDGE_seasons <- team_edge_seasons()

Access the EDGE shot location statistics for a team, season, game type, and category

Description

team_edge_shot_location() retrieves the EDGE shot location statistics for a team, season, game type, and category as a data.frame where each row represents location and includes detail on production, workload, efficiency, and result-level performance outcomes plus NHL EDGE style tracking outputs and relative-performance context.

Usage

team_edge_shot_location(
  team = 1,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/details' or 't'/'totals'

Value

data.frame with one row per location (category = 'details') or combination of strength state and position (category = 'totals')

Examples

COL_shot_location_totals_regular_20242025 <- team_edge_shot_location(
  team      = 21,
  season    = 20242025,
  game_type = 2,
  category  = 'T'
)

Access the EDGE shot speed statistics for a team, season, game type, and category

Description

team_edge_shot_speed() retrieves the EDGE shot speed statistics for a team, season, game type, and category as a data.frame where each row represents position and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and ranking movement, points pace, and division/conference position signals.

Usage

team_edge_shot_speed(
  team = 1,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'h'/'hardest'

Value

data.frame with one row per position (category = 'details') or shot (category = 'hardest')

Examples

COL_hardest_shots_regular_20242025 <- team_edge_shot_speed(
  team      = 21,
  season    = 20242025,
  game_type = 2,
  category  = 'H'
)

Access the EDGE skating distance statistics for a team, season, game type, and category

Description

team_edge_skating_distance() retrieves the EDGE skating distance statistics for a team, season, game type, and category as a data.frame where each row represents combination of strength state and position and includes detail on team identity, affiliation, and matchup-side context, ranking movement, points pace, and division/conference position signals, and NHL EDGE style tracking outputs and relative-performance context.

Usage

team_edge_skating_distance(
  team = 1,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'l'/'l10'/'last 10'

Value

data.frame with one row per combination of strength state and position (category = 'details') or game (category = 'last 10') game

Examples

COL_L10_skating_distance_regular_20242025 <- team_edge_skating_distance(
  team      = 21,
  season    = 20242025,
  game_type = 2,
  category  = 'L'
)

Access the EDGE skating speed statistics for a team, season, game type, and category

Description

team_edge_skating_speed() retrieves the EDGE skating speed statistics for a team, season, game type, and category as a data.frame where each row represents position and includes detail on team identity, affiliation, and matchup-side context, player identity, role, handedness, and biographical profile, and ranking movement, points pace, and division/conference position signals.

Usage

team_edge_skating_speed(
  team = 1,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 't'/'top'/'top speeds'

Value

data.frame with one row per position (category = 'details') or burst (category = 'top speeds')

Examples

COL_top_speeds_regular_20242025 <- team_edge_skating_speed(
  team      = 21,
  season    = 20242025,
  game_type = 2,
  category  = 'T'
)

Access the EDGE summary for a team, season, and game type

Description

team_edge_summary() retrieves the EDGE summary for a team, season, and game type as a nested list that separates summary and detail blocks for team identity, affiliation, and matchup-side context plus NHL EDGE style tracking outputs and relative-performance context.

Usage

team_edge_summary(team = 1, season = "now", game_type = "")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

Value

list of various items

Examples

COL_EDGE_summary_regular_20242025 <- team_edge_summary(
  team      = 21, 
  season    = 20242025,
  game_type = 2
)

Access the EDGE zone time statistics for a team, season, game type, and category

Description

team_edge_zone_time() retrieves the EDGE zone time statistics for a team, season, game type, and category as a data.frame where each row represents strength state and includes detail on NHL EDGE style tracking outputs and relative-performance context.

Usage

team_edge_zone_time(
  team = 1,
  season = "now",
  game_type = "",
  category = "details"
)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see team_edge_seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'; see team_edge_seasons() for reference; most functions will NOT support pre-season

category

character of 'd'/'details' or 'dS'/'dSOG'/'dShot'/'shot differential'

Value

data.frame with one row per strength state (category = 'details') or list with four items (category = 'shot differential')

Examples

COL_dS_regular_20242025 <- team_edge_zone_time(
  team      = 21,
  season    = 20242025,
  game_type = 2,
  category  = 'dS'
)

Access various reports for a season, game type, and category for all the teams by game

Description

team_game_report() retrieves various reports for a season, game type, and category for all the teams by game as a data.frame where each row represents game per team and includes detail on game timeline state, period/clock progression, and matchup flow, team identity, affiliation, and matchup-side context, and production, workload, efficiency, and result-level performance outcomes.

Usage

team_game_report(
  season = season_now(),
  game_type = game_type_now(),
  category = "summary"
)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character (e.g., 'leadingtrailing'); see team_report_configurations() for reference

Value

data.frame with one row per game per team

Examples

situational_team_game_report_playoffs_20212022 <- team_game_report(
  season    = 20212022, 
  game_type = 3, 
  category  = 'leadingtrailing'
)

Access all the team logos

Description

team_logos() retrieves all the team logos as a data.frame where each row represents logo and includes detail on team identity, affiliation, and matchup-side context.

Usage

team_logos()

Value

data.frame with one row per logo

Examples

all_team_logos <- team_logos()

Access the schedule for a team and month

Description

team_month_schedule() retrieves the schedule for a team and month as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

team_month_schedule(team = 1, month = "now")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

month

character in 'YYYY-MM' (e.g., '2025-01'); see seasons() for reference

Value

data.frame with one row per game

Examples

COL_schedule_December_2025 <- team_month_schedule(
  team  = 21, 
  month = '2025-12'
)

Access the prospects for a team and position

Description

team_prospects() retrieves the prospects for a team and position as a data.frame where each row represents player and includes detail on player identity, role, handedness, and biographical profile.

Usage

team_prospects(team = 1, position = "forwards")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

position

character of 'f'/'forwards', 'd'/'defensemen', or 'g'/'goalies'

Value

data.frame with one row per player

Examples

COL_forward_prospects <- team_prospects(
  team     = 21,
  position = 'F'
)

Access the configurations for team reports

Description

team_report_configurations() retrieves the configurations for team reports as a nested list that separates summary and detail blocks for situational splits across home/road, strength state, and overtime/shootout states plus configuration catalogs for valid report categories and filters.

Usage

team_report_configurations()

team_report_configs()

Value

list with various items

Examples

team_report_configs <- team_report_configurations()

Access various reports for a season, game type, and category for all the teams by season

Description

team_season_report() retrieves various reports for a season, game type, and category for all the teams by season as a data.frame where each row represents team and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and production, workload, efficiency, and result-level performance outcomes.

Usage

team_season_report(
  season = season_now(),
  game_type = game_type_now(),
  category = "summary"
)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or playoff'/'post'; see seasons() for reference; most functions will NOT support pre-season

category

character (e.g., 'leadingtrailing'); see team_report_configurations() for reference

Value

data.frame with one row per team

Examples

situational_team_season_report_playoffs_20212022 <- team_season_report(
  season    = 20212022, 
  game_type = 3, 
  category  = 'leadingtrailing'
)

Access the schedule for a team and season

Description

team_season_schedule() retrieves the schedule for a team and season as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

team_season_schedule(team = 1, season = "now")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per game

Examples

COL_schedule_20252026 <- team_season_schedule(
  team   = 21, 
  season = 20252026
)

Access the statistics for all the teams by season and game type

Description

team_season_statistics() retrieves the statistics for all the teams by season and game type as a data.frame where each row represents team per season per game type and includes detail on date/season filtering windows and chronological context, team identity, affiliation, and matchup-side context, and production, workload, efficiency, and result-level performance outcomes.

Usage

team_season_statistics()

team_season_stats()

Value

data.frame with one row per team per season per game type

Examples

# May take >5s, so skip.
team_season_statistics <- team_season_statistics()

Access the season(s) and game type(s) in which a team played

Description

team_seasons() retrieves the season(s) and game type(s) in which a team played as a data.frame where each row represents season and includes detail on date/season filtering windows and chronological context.

Usage

team_seasons(team = 1)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

Value

data.frame with one row per season

Examples

COL_seasons <- team_seasons(team = 21)

Access the schedule for a team and week since a date

Description

team_week_schedule() retrieves the schedule for a team and week since a date as a data.frame where each row represents game and includes detail on game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and team identity, affiliation, and matchup-side context.

Usage

team_week_schedule(team = 1, date = "now")

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL'); see teams() for reference; ID is preferable as there now exists duplicate three-letter codes (i.e., 'UTA' for 'Utah Hockey Club' and 'Utah Mammoth')

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per game

Examples

COL_schedule_Family_Week_2025 <- team_week_schedule(
  team = 21,
  date = '2025-10-06'
)

Access all the teams

Description

teams() retrieves all the teams as a data.frame where each row represents team and includes detail on team identity, affiliation, and matchup-side context.

Usage

teams()

Value

data.frame with one row per team

Examples

all_teams <- teams()

Convert to the appropriate game type ID

Description

Convert to the appropriate game type ID

Usage

to_game_type_id(game_type)

Arguments

game_type

integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season) OR character of 'pre', 'regular', or 'playoff'/'post'

Value

integer in 1:3


Convert to the appropriate team ID

Description

Convert to the appropriate team ID

Usage

to_team_id(team, lookup = .to_team_id)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL')

Value

integer in 1:68


Convert to the appropriate team three-letter code

Description

Convert to the appropriate team three-letter code

Usage

to_team_tri_code(team, lookup = .to_team_tri_code)

Arguments

team

integer ID (e.g., 21), character full name (e.g., 'Colorado Avalanche'), OR three-letter code (e.g., 'COL')

Value

three-letter code


Access the NHL Network TV schedule for a date

Description

tv_schedule() retrieves the NHL Network TV schedule for a date as a data.frame where each row represents program and includes detail on date/season filtering windows and chronological context.

Usage

tv_schedule(date = "now")

Arguments

date

character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see seasons() for reference

Value

data.frame with one row per program

Examples

tv_schedule_Halloween_2025 <- tv_schedule(date = '2025-10-31')

Access all the venues

Description

venues() retrieves all the venues as a data.frame where each row represents venue and includes detail on venue/location geography and regional metadata.

Usage

venues()

Value

data.frame with one row per venue

Examples

all_venues <- venues()

Access the World Showcase (WSC) play-by-play for a game

Description

wsc_play_by_play() retrieves the World Showcase (WSC) play-by-play for a game as a data.frame where each row represents an event. The returned schema follows the same cleaned public-facing naming as gc_play_by_play(), including servedByPlayerId, goalieInNetId, and utc immediately after secondsElapsedInGame while omitting GC-only clip fields. It also includes the same HTML-report-derived on-ice player ID columns added to the GC output, including dynamically expanded overflow skater slots when needed. HTML report skater and goalie IDs are returned whenever they can be matched back to a supported row, even when the raw situationCode is stale. Use add_shift_times() with shift_chart() (or shift_charts()) to add on-ice shift timing columns.

Usage

wsc_play_by_play(game = 2023030417)

wsc_pbp(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per event (play)

Examples

# May take >5s, so skip.
wsc_pbp_Martin_Necas_legacy_game <- wsc_play_by_play(game = 2025020275)

Access the raw World Showcase (WSC) play-by-play for a game

Description

wsc_play_by_play_raw() returns the raw flattened World Showcase play-by-play as served by the NHL API for one game. Use wsc_play_by_play() for the cleaned public schema that repairs common clock/order defects and appends the derived public columns.

Usage

wsc_play_by_play_raw(game = 2023030417)

wsc_pbp_raw(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

data.frame with one row per event (play)

Examples

wsc_raw_Martin_Necas_legacy_game <- wsc_play_by_play_raw(game = 2025020275)

Access the World Showcase (WSC) play-by-plays for a season

Description

wsc_play_by_plays() loads the WSC play-by-plays for a given season.

Usage

wsc_play_by_plays(season = 20242025)

wsc_pbps(season = 20242025)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per event (play) per game

Examples

# May take >5s, so skip.
wsc_pbps_20212022 <- wsc_play_by_plays(season = 20212022)

Access the raw World Showcase (WSC) play-by-plays for a season

Description

wsc_play_by_plays_raw() loads the raw WSC play-by-plays for a given season.

Usage

wsc_play_by_plays_raw(season = 20242025)

wsc_pbps_raw(season = 20242025)

Arguments

season

integer in YYYYYYYY (e.g., 20242025); see seasons() for reference

Value

data.frame with one row per raw event (play) per game

Examples

# May take >5s, so skip.
wsc_pbps_raw_20212022 <- wsc_play_by_plays_raw(season = 20212022)

Access the World Showcase (WSC) summary for a game

Description

wsc_summary() retrieves the World Showcase (WSC) summary for a game as a nested list that separates summary and detail blocks for game timeline state, period/clock progression, and matchup flow, date/season filtering windows and chronological context, and venue/location geography and regional metadata.

Usage

wsc_summary(game = 2023030417)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

Value

list of various items

Examples

wsc_summary_Martin_Necas_legacy_game <- wsc_summary(game = 2025020275)

Save an X (Twitter) share-able cumulative expected goals (xG) time-series plot for a game

Description

x_game_cumulative_expected_goals() saves an X share-able cumulative xG time-series plot for a given game as a PNG.

Usage

x_game_cumulative_expected_goals(game = 2023030417, model = NULL, save = TRUE)

x_game_cum_xG(game = 2023030417, model = NULL)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

model

deprecated legacy model selector; ignored

save

logical only FALSE for tests

Value

NULL

Examples

# May take >5s, so skip.
x_game_cumulative_expected_goals(
  game  = 2023030417, 
  save  = FALSE
)

Save an X (Twitter) share-able shot-location plot for a game

Description

x_game_shot_locations() saves an X share-able shot-location plot for a given game.

Usage

x_game_shot_locations(
  game = 2023030417,
  team = "home",
  model = NULL,
  save = TRUE
)

x_game_shot_locs(game = 2023030417, team = "home", model = NULL)

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

team

character of 'h'/'home' or 'a'/'away'

model

deprecated legacy model selector; ignored

save

logical only FALSE for tests

Value

NULL

Examples

# May take >5s, so skip.
x_game_shot_locations(
  game  = 2023030417, 
  team  = 'H',
  save  = FALSE
)