Skip to contents

nhlscraper 0.7.0.9000 (development version)

  • game_roster() returns the dressed players for one game with gameId as its leading column, while game_rosters() loads the corresponding season-level roster snapshot from NHL_DB.
  • gc_play_by_play() and wsc_play_by_play() now assign blocked-shot zoneCode from the normalized block location, so teammate blocks no longer get blindly flipped to the wrong zone. Blocked-shot coordinates and derived distance/angle continue to describe the recorded block location, not the shot-release location.

nhlscraper 0.7.0

CRAN release: 2026-06-28

  • calculate_expected_goals() now scores against the completed rolling XGBoost xG model assets from the companion NHLxG project.
    • The package ships the small frozen preprocessing bundle and downloads needed versioned boosters into the user’s R cache on first use.
    • The scorer now routes each shot by target-season vintage and six game-state partitions for 2013-14 through the 2026-27 deployment vintage.
  • Removed minimum-dependency package language now that runtime scoring relies on external modeling packages.
  • Standardized all R code.
  • Improved all articles.
  • calculate_shift_times_by_situation() is now added to split player-period time on ice by exact situationCode, with situation columns expressed from the player’s team perspective rather than the play-by-play’s away/home perspective.

nhlscraper 0.6.1

CRAN release: 2026-05-24

nhlscraper 0.6.0

CRAN release: 2026-04-07

  • Documentation website now features more guided examples and explanation articles.
  • replays() is now added to retrieve season-aggregate replays.
  • contracts() now returns more contracts, dating back to the 90’s (and then some).
  • shift_chart() (and consequentially, shift_charts()) now returns completed shift charts for all games where at least either one of API or HTML report is available.
  • gc_play_by_play() and wsc_play_by_play() now return new schema.
    • HTML-report-derived on-ice goalie/skater ID columns are now added, limited to faceoff, hit, shot-on-goal, giveaway, missed-shot, blocked-shot, goal, delayed-penalty, takeaway, and failed-shot-attempt, while situationCode-derived strength/count columns remain available wherever situationCode itself is available. Check out our “Article” section on the documentation website to learn more.
    • Helpers now consistently expect the current public schema instead of silently backfilling the package’s older alias names.
    • add_shift_times() is now added to populate scalar on-ice shift time elapsed columns via C.
    • add_deltas() now handles event-to-event deltas in C, returns raw and normalized X/Y deltas alongside distance and angle deltas, and properly handles same-second events and shootouts/penalty shots with 1/n estimation.
    • calculate_speed() is now defunct; use add_deltas() instead.
  • gc_play_by_play_raw() and wsc_play_by_play_raw() now returns raw play-by-play data; note that there are heavy inconsistencies in this uncleaned data as audited.
  • calculate_expected_goals() now uses a fixed six-partition xG model.
    • The scorer now mirrors the training-time preprocessing with delta, biometric, previous-event, and shift-timing context where available.
    • The scorer now expects the current public play-by-play schema directly and no longer backfills legacy xG alias columns such as typeDescKey, period, SOGFor, SOGAgainst, and SOGDifferential.
    • ig_game_shot_locations(), x_game_shot_locations(), ig_game_cumulative_expected_goals(), and x_game_cumulative_expected_goals() still accept model for backward compatibility, but it is now ignored.
    • Check out our “Article” section on the documentation website to learn more.

nhlscraper 0.5.0

CRAN release: 2026-02-24

  • All return IDs, codes, and names are now standardized (i.e., no more arbitrary id columns and inconsistent column names across functions).
  • contracts() is now added to get all NHL contracts since the 2011-2012 season.
  • ig_game_shot_locations() and x_game_shot_locations() now use continuous xG scale instead of bins.
  • calculate_expected_goals() now combines the previous xG calculation functions; as a result, calculate_expected_goals_v1(), calculate_expected_goals_v2(), and calculate_expected_goals_v3() are now defunct.
  • calculate_speed() is now added to calculate event-to-event deltas in play-by-plays.
  • add_shooter_biometrics() is now added to add shooter biometrics to Fenewick events in play-by-plays.
  • add_goalie_biometrics() is now added to add goalie biometrics to Fenewick events in play-by-plays.
  • ps() is now deprecated; use pss() instead.

nhlscraper 0.4.2

CRAN release: 2026-01-28

nhlscraper 0.4.1

CRAN release: 2025-12-17

  • All API call functions are now wrapped with try-catch.

nhlscraper 0.4.0

CRAN release: 2025-11-30

  • Documentation website now features proper example.
  • New functions to help clean the data are now available:
    • strip_game_id()
    • strip_time_period()
    • strip_situation_code()
    • flag_is_home()
    • flag_is_rebound()
    • flag_is_rush()
    • count_goals_shots()
    • normalize_coordinates()
    • calculate_distance()
    • calculate_angle()
  • New functions to run built-in models are now available:
    • calculate_expected_goals_v1()
    • calculate_expected_goals_v2()
    • calculate_expected_goals_v3()
  • New function to help graph the data is now available:
  • New functions to help share the data are now available:

nhlscraper 0.3.0

nhlscraper 0.2.0

CRAN release: 2025-07-17

nhlscraper 0.1.1

CRAN release: 2025-06-11

  • Some functions are now more optimized.

nhlscraper 0.1.0