Frame: the HockeyTech 600x300 canvas
{
"hockeytech": "HockeyTech 600x300 canvas, top-left origin -> 200x85 ft centre origin (fastRhockey hockeytech_analytics: x/3-100, 42.5-y*85/300). The canvas is stylised rather than true to scale: converted end-zone faceoff dots land at about ±67 ft and ±52 ft against regulation ±69 ft, so the converted feet are approximate",
"PWHL Boston at Montreal, 2024-03-02 (game 42): goals": [
"MTL Marie-Philip Poulin, P1 3:51: (90, 123) -> (-70.0, 7.7) ft",
"MTL Mélodie Daoust, P2 4:50: (57, 105) -> (-81.0, 12.8) ft",
"BOS Hilary Knight, P2 14:55: (470, 117) -> (56.7, 9.3) ft",
"MTL Erin Ambrose, P3 2:29: (196, 61) -> (-34.7, 25.2) ft"
]
}import { PWHL_GOALS } from "@sportsdataverse/examples/data";
import { FRAMES, toSurfaceFrame } from "@sportsdataverse/sporty";
// HockeyTech leagues report events on a 600 x 300 pixel canvas (top-left origin, y down); the hockeytech frame maps
// it onto a 200 x 85 ft rink with its centre at 0, 0. PWHL game 42's shots span x 31-573 and y 11-292.
const goals = toSurfaceFrame(PWHL_GOALS, { from: "hockeytech" });
{
hockeytech: FRAMES.hockeytech.description,
"PWHL Boston at Montreal, 2024-03-02 (game 42): goals": goals.map(
(r) =>
`${r.team} ${r.scorer}, P${r.period} ${r.time}: (${r.x}, ${r.y}) -> (${r.surface_x?.toFixed(1)}, ${r.surface_y?.toFixed(1)}) ft`,
),
};
Tags: frames · toSurfaceFrame · hockeytech · hockey. All sporty examples.