nhl-api

NHL API play-by-play (xCoord, yCoord). The right end-zone face-off dot is (69, 22) in feet; the arrows show which way x (blue) and y (orange) grow.

NHL hockey rinkDrawn as: an ice hockey rink, 200 by 85 feet with rounded corners, with its red and blue lines, face-off circles, creases and goal nets. Data: 1 x grows. 1 y grows. 1 the right end-zone face-off dot. 2 axes.1 x grows1 y grows1 the right end-zone face-off dotthe right end-zone face-off dot: 69, 222 axesxy

The picture above was drawn when the docs were built. The script below draws it again with the published package.

import { drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";

const svg = drawKyogijo({
  sport: "nhl",
  layers: [
    {
      kind: "arrows",
      name: "x grows",
      from: "nhl-api",
      data: [{ x: 69, y: 22, x2: 93, y2: 22 }],
      style: { width: 1.2, color: "var(--ky-layer-home)" },
    },
    {
      kind: "arrows",
      name: "y grows",
      from: "nhl-api",
      data: [{ x: 69, y: 22, x2: 69, y2: 32.2 }],
      style: { width: 1.2, color: "var(--ky-layer-away)" },
    },
    {
      kind: "points",
      name: "the right end-zone face-off dot",
      from: "nhl-api",
      data: [{ x: 69, y: 22, title: "the right end-zone face-off dot: 69, 22" }],
      style: { size: 4, shape: "star" },
    },
    {
      kind: "text",
      name: "axes",
      from: "nhl-api",
      data: [{ x: 100.2, y: 22, text: "x" }, { x: 69, y: 36.28, text: "y" }],
      style: { size: 4 },
    },
  ],
});

This page imports the package from jsDelivr (major version 0), which serves only versions that have been published to npm. A feature added after the last release is not in it: the page then keeps the picture above and says why. The docs were built from version 0.6.1.