Skip to main content
Version: 0.1.5

PWHL — additional Python functions

Hand-written wrappers, loaders, and helpers in sportsdataverse.pwhl not covered by the generated API-endpoint reference above.

sportsdataverse-data releases​

FunctionSummary
load_pwhl_gamesLoad the PWHL games-in-data-repo manifest (no seasons argument).
load_pwhl_goalie_boxAlias of load_pwhl_goalie_boxscores() for naming parity with fastRhockey (R).
load_pwhl_player_boxAlias of load_pwhl_player_boxscores() for naming parity with fastRhockey (R).
load_pwhl_scheduleAlias of load_pwhl_schedules() for naming parity with fastRhockey (R).
load_pwhl_skater_boxAlias of load_pwhl_skater_boxscores() for naming parity with fastRhockey (R).
load_pwhl_team_boxAlias of load_pwhl_team_boxscores() for naming parity with fastRhockey (R).

HockeyTech / LeagueStat​

FunctionSummary
pwhl_game_corsiPlayer-level on-ice Corsi and Fenwick for a single PWHL game.
pwhl_game_infoPWHL single-game metadata.
pwhl_game_shiftsParsed shift stints for a single PWHL game.
pwhl_game_summaryPWHL game summary — dict of frames (game/goals/penalties/shots_by_period/three_stars).
pwhl_leadersPWHL statistical leaders for a given season.
pwhl_pbpPWHL play-by-play — one row per event, fully enriched.
pwhl_player_boxPWHL player box score for a single game.
pwhl_player_game_logPWHL player game-by-game log.
pwhl_player_infoPWHL player biographical info.
pwhl_player_searchSearch for PWHL players by name.
pwhl_player_statsPWHL player season stats across all seasons.
pwhl_player_toiPer-player time-on-ice totals for a single PWHL game.
pwhl_playoff_bracketPWHL playoff bracket for a given season.
pwhl_schedulePWHL schedule — one row per game (matches fastRhockey pwhl_schedule).
pwhl_scorebarPWHL live scorebar (today ± 3 days).
pwhl_skater_rapm② PWHL skater xG RAPM -- shim over nhl_skater_rapm with league='pwhl'.
pwhl_skater_war③ PWHL GAR/WAR composite -- shim over nhl_skater_war with league='pwhl'.
pwhl_special_teams_value⑥ PWHL special-teams value -- shim over nhl_special_teams_value with league='pwhl'.
pwhl_standingsPWHL standings — one row per team.
pwhl_statsPWHL aggregate stats by season and position.
pwhl_streaksCurrent PWHL player/team streaks — non-functional: no such upstream view.
pwhl_team_rosterPWHL team roster for a given team + season.
pwhl_teamsPWHL teams for a given season.
pwhl_transactionsPWHL roster transactions.
pwhl_unit_ratings⑤ PWHL line/pair ratings -- shim over nhl_unit_ratings with league='pwhl'.

Models and calculators​

FunctionSummary
LeagueConstantsFitted, league-specific constants for the NHL/PWHL prediction spine.
as_of_ratings_splitFilter a frame to rows strictly before cutoff_date (the leakage boundary).
brier_scoreMean squared error between predicted probabilities and binary outcomes.
calibration_tableBucket predicted probabilities into bins and compare to actual outcome rates.
log_loss_scoreBinary cross-entropy loss between predicted probabilities and outcomes.
maeMean absolute error between two arrays.
pwhl_team_ratingsPWHL opponent-adjusted, shrunk even-strength xG team ratings.
spearman_corrSpearman rank correlation between two arrays.

Analytics​

FunctionSummary
pwhl_game_totalPWHL per-game expected total goals (re-export of the expected-goals helper).
pwhl_in_game_win_probPWHL per-play live home win probability from the bundled in-game model.
pwhl_player_propsPWHL empirical-Bayes shots/points player-prop projections.
pwhl_predict_gamesPWHL vectorized pregame margin/win-prob/total (+ market edge).

Dates and seasons​

FunctionSummary
most_recent_pwhl_seasonNewest PWHL regular season as an end-year integer.
pwhl_season_idAll PWHL seasons with end-year + game-type labels (HockeyTech seasons).