get_game_ids
which defaulted to wrong season-end date and missed out on final gamesget_game_shifts
function to show message when no shift data present instead of erroring outcalculate_individual
to ensure players with 0 shot events recorded still show up in final stats data (affects individual game stats mostly)polite
dependency, shifted to entirely rvest
scrapingscrape_game
team_logos_colors
(#6)calculate_toi
calculates the time on ice for all skaters in a supplied play-by-play setcalculate_on_ice
calculates player on-ice statistics for all skaters in a supplied play-by-play setcalculate_individual
calculates player individual statistics for all skaters in a supplied play-by-play setget_standings
pulls standings and team stats for given seasons from NHL.comget_game_ids
now returns column for scheduled start time for each game%not_in%
operator now defined globally within packageget_draft_class
now works for classes prior to 1983 (first year player IDs existed)load_pbp
includes new column for expected goalsscrape_game
function has been adjusted to automatically add expected goals to the outputcalculate_xg
adds expected goals column to pbp data (used inside scrape_game
, not necessary to use this to get expected goal values)player_id
column in get_draft_class
to prospect_id
- proper NHL player_id
column only returns with player_details
set to TRUE
scrape_game()
function runs about 4x faster nowThree new functions have been added:
get_team_roster()
fetches the current roster for a single team from nhl.comget_current_rosters()
fetches current rosters for all 32 teams from nhl.comget_draft_class()
fetches all draft selections for a single draft year from nhl.comget_game_info()
& get_game_rosters()
functions to require game_id
as the argument rather than raw json datascrape_game()
function to accommodate above changesget_goalie_stats()
function to scrape season goalie stats from hockey-reference.comget_skater_stats()
function to scrape season skater stats from hockey-reference.com%>%
rather than the native R |>
load_pbp()
functionNEWS.md
file to track changes to the package.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.