BCHL — additional Python functions
Hand-written wrappers, loaders, and helpers in sportsdataverse.bchl
not covered by the generated API-endpoint reference above.
Utilities & helpers
most_recent_bchl_season
most_recent_bchl_season() -> 'int'
Most-recent BCHL season as an end-year integer (max season_yr), or 2026.
Other
bchl_game_corsi
bchl_game_corsi(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'
Player-level on-ice Corsi and Fenwick for a single BCHL game.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
game_id | int | ||
return_as_pandas | bool | False |
bchl_game_shifts
bchl_game_shifts(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'
Parsed shift stints for a single BCHL game.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
game_id | int | ||
return_as_pandas | bool | False |
bchl_game_summary
bchl_game_summary(game_id: 'int') -> 'dict'
BCHL game summary — dict of frames (game/goals/penalties/shots_by_period/three_stars).
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
game_id | int |
bchl_leaders
bchl_leaders(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'
BCHL statistical leaders for a given season.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
season | Optional[int] | None | |
season_id | Optional[int] | None | |
return_as_pandas | bool | False |
bchl_pbp
bchl_pbp(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'
BCHL play-by-play — one row per event, fully enriched.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
game_id | int | ||
return_as_pandas | bool | False |
bchl_player_stats
bchl_player_stats(player_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'
BCHL player season stats across all seasons.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
player_id | int | ||
return_as_pandas | bool | False |
bchl_player_toi
bchl_player_toi(game_id: 'int', return_as_pandas: 'bool' = False) -> 'Any'
Per-player time-on-ice totals for a single BCHL game.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
game_id | int | ||
return_as_pandas | bool | False |
bchl_schedule
bchl_schedule(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'
BCHL schedule — one row per game.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
season | Optional[int] | None | |
season_id | Optional[int] | None | |
return_as_pandas | bool | False |
Returns
| col_name | type | description |
|---|---|---|
game_id | character | Unique game identifier. |
game_date | character | Game date (YYYY-MM-DD). |
game_status | character | Game status label. |
home_team | character | Home team name. |
home_team_id | character | Unique identifier for the home team. |
home_score | character | Home team score at the time of the play. |
away_team | character | Away team name. |
away_team_id | character | Unique identifier for the away team. |
away_score | character | Away team score at the time of the play. |
venue | character | Venue name. |
season_id | character | Unique season identifier. |
game_type | character | The most recent game type of that season that a player appeared on the roster. |
bchl_season_id
bchl_season_id(return_as_pandas: 'bool' = False) -> 'Any'
All BCHL seasons with end-year + game-type labels.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
return_as_pandas | bool | False |
Returns
| col_name | type | description |
|---|---|---|
season_id | integer | Unique season identifier. |
season_name | character | Full season name (e.g., "2024-25 Regular Season"). |
season_short | character | Short season name. |
career | character | Whether this is a career-stats season. |
playoff | character | Whether the row is playoff statistics. |
start_date | character | Start date (YYYY-MM-DD). |
end_date | character | End date (YYYY-MM-DD). |
season_yr | integer | Year derived from the season name (concluding year). |
game_type_label | character | Game type: "preseason", "regular", or "playoffs". |
bchl_standings
bchl_standings(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'
BCHL standings — one row per team.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
season | Optional[int] | None | |
season_id | Optional[int] | None | |
return_as_pandas | bool | False |
Returns
| col_name | type | description |
|---|---|---|
team_code | character | Internal team code. |
wins | character | Total wins. |
losses | character | Total losses. |
ties | character | Number of ties in the series. |
ot_losses | character | Overtime losses. |
ot_wins | character | Overtime wins. |
shootout_losses | character | Shootout losses. |
points | integer | Points scored. |
penalty_minutes | character | Penalty minutes. |
goals_for | character | Goals for. |
goals_against | character | Goals against. |
goals_diff | character | Goal differential, goals_for minus goals_against (feed header 'Goal Differential'), as a signed integer string such as '14' or '-10'. |
percentage | character | Points percentage (feed header 'Percentage'): points earned divided by the maximum points available from games played, as a three-decimal string, e.g. '0.833' for 5 of 6 possible points; '0.000' before a team has played. |
games_played | character | Games played. |
team_rank | integer | Team rank in the standings. |
team | character | Team-side label or team identifier. |
bchl_team_roster
bchl_team_roster(team_id: 'int', season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'
BCHL team roster for a given team + season.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
team_id | int | ||
season | Optional[int] | None | |
season_id | Optional[int] | None | |
return_as_pandas | bool | False |
bchl_teams
bchl_teams(season: 'Optional[int]' = None, season_id: 'Optional[int]' = None, return_as_pandas: 'bool' = False) -> 'Any'
BCHL teams for a given season.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
season | Optional[int] | None | |
season_id | Optional[int] | None | |
return_as_pandas | bool | False |
Returns
| col_name | type | description |
|---|---|---|
team_name | character | Full team display name (e.g. 'Las Vegas Aces'). |
team_id | character | Unique team identifier. |
team_code | character | Internal team code. |
team_nickname | character | Team nickname. |
team_label | character | Short city label. |
division | character | Team division. |
team_logo | character | Team logo image URL. |
build_family
build_family(league: 'str') -> 'dict[str, Any]'
Return a dict of public callables for league.
All callables are fully independent closures over the single league
string; none share mutable state. The dict is ready to be spread into
a module namespace via globals().update(...).
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
league | str | HockeyTech league code: "ahl", "ohl", "whl", or "qmjhl". |
Returns
Keys are the public function names (e.g. "ahl_schedule").