Function: hockeytechEnrichedPbp()
hockeytechEnrichedPbp(
league,gameId):Promise<Row[]>
Defined in: src/analytics/hockeytech_family.ts:171
<lg>_pbp (public in py): one row per event with clock, coordinate, shot-geometry and
on-ice columns.
Parameters
league
string
HockeyTech league slug from HOCKEYTECH_LEAGUES; also selects the
pbpStyle dialect passed to parse_pbp (hockeytech_a ≈ 850x400 for PWHL / AHL,
hockeytech_b ≈ 600x300 for the junior leagues).
gameId
GameId
The league's game id (number or string).
Returns
Promise<Row[]>
The enrich_pbp rows: the parse_pbp event columns plus game_date,
game_season, game_season_id, home_team / home_team_id, away_team /
away_team_id, the ten x_coord_* / y_coord_* transforms, minute_start,
second_start, clock, sec_from_start, back-filled power_play / short_handed,
shot_distance, shot_angle, scoring_chance, on_ice_home / on_ice_away. Every id
column is a decimal string. [] when the play-by-play feed is empty.
Throws
AssetFetchError when any of the three fetches fails or a 200 body lacks its
envelope (the pbp event list, GC.Gamesummary, SiteKit.Gameshifts) (propagated).
Throws
NoDataError on a 404 (propagated from the getter).
Example
import sdv from "sportsdataverse";
const pbp = await sdv.hockeytech.hockeytech_enriched_pbp({ league: "pwhl", game_id: 42 });
pbp.filter((r) => r.event === "goal").map((r) => r.on_ice_home);
Remarks
Three sequential requests: statviewfeed/gameCenterPlayByPlay, gc/gamesummary,
modulekit/gameshifts. A league whose gamesummary / shifts feed is access-denied (e.g. no
shift chart) yields blank meta columns and null on-ice columns rather than an error.