Skip to main content
Version: 0.0.56

QMJHL — additional Python functions

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

Utilities & helpers

most_recent_qmjhl_season() -> 'int'

Most-recent QMJHL season as an end-year integer (max season_yr), or 2026.

Other

qmjhl_game_corsi(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'

Player-level on-ice Corsi and Fenwick for a single QMJHL game.

Parameters

ParameterTypeDefaultDescription
game_idint
return_as_pandasboolFalse

qmjhl_game_shifts(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'

Parsed shift stints for a single QMJHL game.

Parameters

ParameterTypeDefaultDescription
game_idint
return_as_pandasboolFalse

qmjhl_game_summary(game_id: 'int') -> 'dict'

QMJHL game summary — dict of frames (game/goals/penalties/shots_by_period/three_stars).

Parameters

ParameterTypeDefaultDescription
game_idint

qmjhl_leaders(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'

QMJHL statistical leaders for a given season.

Parameters

ParameterTypeDefaultDescription
seasonOptional[int]None
season_idOptional[int]None
return_as_pandasboolFalse

Returns

col_nametypedescription
rankintegerRank of the streak.
player_idcharacterUnique player identifier.
jersey_numbercharacterJersey number.
namecharacterTeam mascot name.
team_idcharacterUnique team identifier.
team_namecharacterTeam name.
team_codecharacterTeam abbreviation.
team_logocharacterURL to the team logo image.
team_logo_smallcharacter
stat_formattedcharacter
type_formattedcharacter
photocharacterURL to the player photo.
photo_smallcharacter
positioncharacterPlayer position.
divisioncharacterDivision identifier.

qmjhl_pbp(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'

QMJHL play-by-play — one row per event, fully enriched.

Parameters

ParameterTypeDefaultDescription
game_idint
return_as_pandasboolFalse

qmjhl_player_stats(player_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'

QMJHL player season stats across all seasons.

Parameters

ParameterTypeDefaultDescription
player_idint
return_as_pandasboolFalse

Returns

col_nametypedescription
season_idcharacterSeason identifier.
season_namecharacterFull season name (e.g., "2024-25 Regular Season").
shortnamecharacterPlayer short name.
playoffcharacterWhether the row is playoff statistics.
careercharacterWhether this is a career-stats season.
sopt_track_faceoffscharacter
max_start_datecharacterLatest game start date for the season.
veteran_statuscharacterPlayer veteran status.
veterancharacterWhether the player is a veteran.
jersey_numbercharacterJersey number.
goalscharacterGoals scored.
games_playedcharacterGames played.
assistscharacterAssists.
pointscharacterTotal points (goals + assists).
plus_minuscharacterPlus/minus rating.
penalty_minutescharacterPenalty minutes.
power_play_goalscharacterPower-play goals.
power_play_assistscharacterPower-play assists.
shotscharacterShots on goal.
shootout_attemptscharacterShootout attempts.
shootout_goalscharacterShootout goals.
shootout_percentagecharacterShootout scoring percentage.
shooting_percentagecharacterShooting percentage.
shootout_winning_goalscharacterShootout game-winning goals.
points_per_gamecharacterPoints per game.
short_handed_goalscharacterShort-handed goals.
short_handed_assistscharacterShort-handed assists.
game_winning_goalscharacterGame-winning goals.
game_tieing_goalscharacterGame-tying goals.
faceoff_winscharacterFaceoff wins.
faceoff_attemptscharacterFaceoff attempts.
faceoff_pctcharacterFaceoff win percentage.
hitscharacterHits.
shots_oncharacterShots on goal count.
shots_widecharacter
team_namecharacterTeam name.
team_codecharacterTeam abbreviation.
team_citycharacterTeam city.
team_nicknamecharacterTeam nickname.
team_idcharacterUnique team identifier.
activecharacterWhether athlete is currently active.
first_goalscharacterFirst goals of a game.
insurance_goalscharacterInsurance goals.
overtime_goalscharacterOvertime goals.
unassisted_goalscharacterUnassisted goals.
empty_net_goalscharacterEmpty-net goals.
penalty_minutes_per_gamecharacterPenalty minutes per game.
divisioncharacterDivision identifier.
ice_timecharacterTotal ice time.
ice_time_minutes_secondscharacterIce time in minutes and seconds.
shots_blocked_by_playercharacterShots blocked by the player.
stat_typecharacterStatistic type ("regular"/"playoff").

qmjhl_player_toi(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'

Per-player time-on-ice totals for a single QMJHL game.

Parameters

ParameterTypeDefaultDescription
game_idint
return_as_pandasboolFalse

qmjhl_schedule(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'

QMJHL schedule — one row per game.

Parameters

ParameterTypeDefaultDescription
seasonOptional[int]None
season_idOptional[int]None
return_as_pandasboolFalse

Returns

col_nametypedescription
game_idcharacterUnique game identifier.
game_datecharacterGame date.
game_statuscharacterGame status text.
home_teamcharacterHome team name.
home_team_idcharacterHome team identifier.
home_scorecharacterHome team final score.
away_teamcharacterAway team name.
away_team_idcharacterAway team identifier.
away_scorecharacterAway team final score.
venuecharacterVenue where the game was played.
season_idcharacterSeason identifier.
game_typecharacterGame type the row belongs to.

qmjhl_season_id(return_as_pandas: 'bool' = False) -> 'Any'

All QMJHL seasons with end-year + game-type labels.

Parameters

ParameterTypeDefaultDescription
return_as_pandasboolFalse

Returns

col_nametypedescription
season_idintegerSeason identifier.
season_namecharacterFull season name (e.g., "2024-25 Regular Season").
season_shortcharacterShort season name.
careercharacterWhether this is a career-stats season.
playoffcharacterWhether the row is playoff statistics.
start_datecharacterSeason start date.
end_datecharacterSeason end date.
season_yrintegerYear derived from the season name (concluding year).
game_type_labelcharacterGame type: "preseason", "regular", or "playoffs".

qmjhl_standings(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'

QMJHL standings — one row per team.

Parameters

ParameterTypeDefaultDescription
seasonOptional[int]None
season_idOptional[int]None
return_as_pandasboolFalse

Returns

col_nametypedescription
team_codecharacterTeam abbreviation.
winscharacterWins.
lossescharacterLosses.
ot_lossescharacterOvertime losses.
ot_winscharacterOvertime wins.
shootout_winscharacterShootout wins.
shootout_lossescharacterShootout losses.
rowcharacterRow index within the game grouping (sequencing helper).
pointscharacterTotal points (goals + assists).
penalty_minutescharacterPenalty minutes.
streakcharacterCurrent streak value.
goals_forcharacterGoals for.
goals_againstcharacterGoals against.
goals_diffcharacter
percentagecharacter
overall_rankcharacterOverall recruit ranking (top recruits only; may be NA).
games_playedcharacterGames played.
team_rankintegerTeam rank in the standings.
past_10character
teamcharacterTeam name.

qmjhl_team_roster(team_id: 'int', season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'

QMJHL team roster for a given team + season.

Parameters

ParameterTypeDefaultDescription
team_idint
seasonOptional[int]None
season_idOptional[int]None
return_as_pandasboolFalse

Returns

col_nametypedescription
idcharacterUnique player identifier.
person_idcharacterUnique person identifier.
activecharacterWhether athlete is currently active.
first_namecharacterPlayer first name.
last_namecharacterPlayer last name.
phonetic_namecharacterPhonetic spelling of the player name.
display_namecharacterPlayer display name.
shootscharacterShooting hand.
hometowncharacterProspect hometown.
homeprovcharacterPlayer home province/state.
homecntrycharacterPlayer home country.
homeplacecharacterPlayer home place description.
birthtowncharacterPlayer birth town.
birthprovcharacterPlayer birth province/state.
birthcntrycharacterPlayer birth country.
birthplacecharacter
heightcharacterPlayer height in inches.
weightcharacterPlayer weight in pounds.
height_hyphenatedcharacter
hiddencharacter
current_teamcharacter
player_idcharacterUnique player identifier.
statuscharacterStatus string (e.g. captain markers).
birthdatecharacterDate of birth.
birthdate_yearcharacterPlayer birth year.
rawbirthdatecharacter
latest_team_idcharacterMost recent team identifier.
veteran_statuscharacterPlayer veteran status.
veteran_descriptioncharacter
team_namecharacterTeam name.
divisioncharacterDivision identifier.
tp_jersey_numbercharacter
rookiecharacterWhether the player is a rookie.
position_idcharacterOfficial position identifier.
positioncharacterPlayer position.
nhlteamcharacter
player_id_1character
is_rookiecharacterWhether the player is a rookie.
hcharacterHits.
wcharacterWins.
draft_statuscharacter
namecharacterTeam mascot name.
player_imagecharacter
catchescharacterCatching hand (goalies).

qmjhl_teams(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'

QMJHL teams for a given season.

Parameters

ParameterTypeDefaultDescription
seasonOptional[int]None
season_idOptional[int]None
return_as_pandasboolFalse

Returns

col_nametypedescription
team_namecharacterTeam name.
team_idcharacterUnique team identifier.
team_codecharacterTeam abbreviation.
team_nicknamecharacterTeam nickname.
team_labelcharacterShort city label.
divisioncharacterDivision identifier.
team_logocharacterURL to the team logo image.