Kyogijo Stadiums競技場

Guides, the reference, a gallery of every picture it can draw, and how it compares: the pages are made from the package's own files when the site is built.

About the name

The pages are in English; this contents, the search and the buttons are in Japanese.

Gallery: display ranges and zoom

A drawing cropped to a named part of its surface (range), at either end, wide and tall, to a box of your own, with data, annotations and a score. Every picture is drawn by the build from the code under it.

51 pictures, each drawn by the build from the code under it, which the Copy button copies. They are drawn as they come near the screen. Open in a page loads the published package from jsDelivr, which serves only released versions.

The named ranges#

RANGES lists them for each sport; range: "offensive-zone" is the name, and each has the end it is at by default.

NFL field: red-zone

At the right end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nfl", range: "red-zone" });

NFL field: end-zone

At the right end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nfl", range: "end-zone" });

NFL field: between-the-20s

A range with no end.

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

const svg = drawKyogijo({ sport: "nfl", range: "between-the-20s" });

NFL field: field-of-play

A range with no end.

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

const svg = drawKyogijo({ sport: "nfl", range: "field-of-play" });

NFL field: own-half

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nfl", range: "own-half" });

NFL field: opponent-half

At the right end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nfl", range: "opponent-half" });

NHL rink: offensive-zone

At the right end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nhl", range: "offensive-zone" });

NHL rink: defensive-zone

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nhl", range: "defensive-zone" });

NHL rink: neutral-zone

A range with no end.

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

const svg = drawKyogijo({ sport: "nhl", range: "neutral-zone" });

NHL rink: half

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nhl", range: "half" });

NBA court: half-court

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nba", range: "half-court" });

NBA court: paint

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "nba", range: "paint" });

Soccer pitch: half

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "soccer", range: "half" });

Soccer pitch: final-third

At the right end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "soccer", range: "final-third" });

Soccer pitch: defensive-third

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "soccer", range: "defensive-third" });

Soccer pitch: middle-third

A range with no end.

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

const svg = drawKyogijo({ sport: "soccer", range: "middle-third" });

Soccer pitch: penalty-area

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "soccer", range: "penalty-area" });

Baseball field: infield

A range with no end.

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

const svg = drawKyogijo({ sport: "mlb", range: "infield" });

Baseball field: outfield

A range with no end.

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

const svg = drawKyogijo({ sport: "mlb", range: "outfield" });

Curling sheet: sheet

A range with no end.

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

const svg = drawKyogijo({ sport: "curling", range: "sheet", orientation: "landscape" });

Curling sheet: half

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "curling", range: "half", orientation: "landscape" });

Curling sheet: house

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "curling", range: "house", orientation: "landscape" });

Curling sheet: folded

A range with no end.

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

const svg = drawKyogijo({ sport: "curling", range: "folded", orientation: "landscape" });

Tennis court: half-court

At the left end unless `end` says the other.

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

const svg = drawKyogijo({ sport: "tennis", range: "half-court" });

The other end, and tall#

range: { name, end } puts a range at the other end; a tall drawing shows the same part on its side, with the left end at the top.

The offensive zone at the left end

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

const svg = drawKyogijo({ sport: "nhl", range: { name: "offensive-zone", end: "left" } });

The red zone at the left end

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

const svg = drawKyogijo({ sport: "nfl", range: { name: "red-zone", end: "left" } });

The offensive zone, tall

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

const svg = drawKyogijo({ sport: "nhl", range: "offensive-zone", orientation: "portrait" });

The half court, tall

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

const svg = drawKyogijo({ sport: "nba", range: "half-court", orientation: "portrait" });

The penalty area, tall

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

const svg = drawKyogijo({ sport: "soccer", range: { name: "penalty-area", end: "right" }, orientation: "portrait" });

The outfield, tall

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

const svg = drawKyogijo({ sport: "mlb", range: "outfield", orientation: "portrait" });

A curling house, wide, at the right end

The same as `sheet: { show: "house", end: "right" }`.

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

const svg = drawKyogijo({ sport: "curling", range: { name: "house", end: "right" }, orientation: "landscape" });

The CFL's red zone

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

const svg = drawKyogijo({ sport: "cfl", range: "red-zone" });

A box of your own#

{ x0, x1, y0, y1 } in the drawing's feet, in units, or in a frame's own numbers.

A box in feet

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

const svg = drawKyogijo({ sport: "nhl", range: { x0: 100, x1: 160, y0: 10, y1: 60 } });

The same box in yards

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

const svg = drawKyogijo({
  sport: "nhl",
  units: "yd",
  range: { x0: 33.333333333333336, x1: 53.333333333333336, y0: 3.3333333333333335, y1: 20 },
});

The right end zone in the NHL API's numbers

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

const svg = drawKyogijo({ sport: "nhl", range: { x0: 25, x1: 100, y0: -42.5, y1: 42.5, frame: "nhl-api" } });

A pitch's final third in Opta's 0 to 100

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

const svg = drawKyogijo({ sport: "soccer", range: { x0: 66, x1: 100, y0: 0, y1: 100, frame: "opta" } });

The left-field corner of a ballpark

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

const svg = drawKyogijo({ sport: "mlb", range: { x0: -330, x1: -60, y0: -330, y1: -60 } });

Data on a range#

Layers are cut to the range, and a heat map has the cells of the zone, not of the whole surface.

Shots in the offensive zone

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

const shots = Array.from({ length: 48 }, (_, i) => ({ x: 6 + ((i * 53) % 190), y: 6 + ((i * 29) % 74), outcome: i % 6 === 0 ? "goal" : "shot" }));
const svg = drawKyogijo({ sport: "nhl", range: "offensive-zone", layers: [{ kind: "points", name: "shots", data: shots }] });

A heat map of the zone, with its legend

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

const shots = Array.from({ length: 48 }, (_, i) => ({ x: 6 + ((i * 53) % 190), y: 6 + ((i * 29) % 74), outcome: i % 6 === 0 ? "goal" : "shot" }));
const svg = drawKyogijo({ sport: "nhl", range: "offensive-zone", layers: [{ kind: "heatmap", name: "shots", data: shots, legend: true }] });

Hexagons over a half court

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

const svg = drawKyogijo({
  sport: "nba",
  range: "half-court",
  layers: [
    {
      kind: "hexbin",
      name: "shots",
      data: [
        { x: 4, y: 3 },
        { x: 21, y: 14 },
        { x: 38, y: 25 },
        { x: 11, y: 36 },
        { x: 28, y: 3 },
        { x: 45, y: 14 },
        { x: 18, y: 25 },
        { x: 35, y: 36 },
        { x: 8, y: 3 },
        { x: 25, y: 14 },
        { x: 42, y: 25 },
        { x: 15, y: 36 },
        { x: 32, y: 3 },
        { x: 5, y: 14 },
        { x: 22, y: 25 },
        { x: 39, y: 36 },
        { x: 12, y: 3 },
        { x: 29, y: 14 },
        { x: 46, y: 25 },
        { x: 19, y: 36 },
        { x: 36, y: 3 },
        { x: 9, y: 14 },
        { x: 26, y: 25 },
        { x: 43, y: 36 },
        { x: 16, y: 3 },
        { x: 33, y: 14 },
        { x: 6, y: 25 },
        { x: 23, y: 36 },
        { x: 40, y: 3 },
        { x: 13, y: 14 },
        { x: 30, y: 25 },
        { x: 47, y: 36 },
        { x: 20, y: 3 },
        { x: 37, y: 14 },
        { x: 10, y: 25 },
        { x: 27, y: 36 },
        { x: 44, y: 3 },
        { x: 17, y: 14 },
        { x: 34, y: 25 },
        { x: 7, y: 36 },
        { x: 24, y: 3 },
        { x: 41, y: 14 },
        { x: 14, y: 25 },
        { x: 31, y: 36 },
        { x: 4, y: 3 },
        { x: 21, y: 14 },
        { x: 38, y: 25 },
        { x: 11, y: 36 },
        { x: 28, y: 3 },
        { x: 45, y: 14 },
        { x: 18, y: 25 },
        { x: 35, y: 36 },
        { x: 8, y: 3 },
        { x: 25, y: 14 },
        { x: 42, y: 25 },
        { x: 15, y: 36 },
        { x: 32, y: 3 },
        { x: 5, y: 14 },
        { x: 22, y: 25 },
        { x: 39, y: 36 },
      ],
      legend: true,
    },
  ],
});

Zones of the half court

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

const svg = drawKyogijo({
  sport: "nba",
  range: "half-court",
  layers: [
    {
      kind: "zones",
      name: "shots",
      zones: "nba-shot",
      data: [
        { x: 4, y: 3 },
        { x: 21, y: 14 },
        { x: 38, y: 25 },
        { x: 11, y: 36 },
        { x: 28, y: 3 },
        { x: 45, y: 14 },
        { x: 18, y: 25 },
        { x: 35, y: 36 },
        { x: 8, y: 3 },
        { x: 25, y: 14 },
        { x: 42, y: 25 },
        { x: 15, y: 36 },
        { x: 32, y: 3 },
        { x: 5, y: 14 },
        { x: 22, y: 25 },
        { x: 39, y: 36 },
        { x: 12, y: 3 },
        { x: 29, y: 14 },
        { x: 46, y: 25 },
        { x: 19, y: 36 },
        { x: 36, y: 3 },
        { x: 9, y: 14 },
        { x: 26, y: 25 },
        { x: 43, y: 36 },
        { x: 16, y: 3 },
        { x: 33, y: 14 },
        { x: 6, y: 25 },
        { x: 23, y: 36 },
        { x: 40, y: 3 },
        { x: 13, y: 14 },
        { x: 30, y: 25 },
        { x: 47, y: 36 },
        { x: 20, y: 3 },
        { x: 37, y: 14 },
        { x: 10, y: 25 },
        { x: 27, y: 36 },
        { x: 44, y: 3 },
        { x: 17, y: 14 },
        { x: 34, y: 25 },
        { x: 7, y: 36 },
        { x: 24, y: 3 },
        { x: 41, y: 14 },
        { x: 14, y: 25 },
        { x: 31, y: 36 },
        { x: 4, y: 3 },
        { x: 21, y: 14 },
        { x: 38, y: 25 },
        { x: 11, y: 36 },
        { x: 28, y: 3 },
        { x: 45, y: 14 },
        { x: 18, y: 25 },
        { x: 35, y: 36 },
        { x: 8, y: 3 },
        { x: 25, y: 14 },
        { x: 42, y: 25 },
        { x: 15, y: 36 },
        { x: 32, y: 3 },
        { x: 5, y: 14 },
        { x: 22, y: 25 },
        { x: 39, y: 36 },
      ],
      labels: { show: ["count"] },
    },
  ],
});

Annotations on a range#

The ticks, the names of the parts and the arrows are of what is shown, on the apron beyond the cut.

The offensive zone, labelled

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

const svg = drawKyogijo({ sport: "nhl", range: "offensive-zone", landmarks: true });

The red zone, with axes

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

const svg = drawKyogijo({ sport: "nfl", range: "red-zone", axes: { ticks: 10, labels: { x: "yards", y: "yards" } } });

A half court on the chalkboard

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

const svg = drawKyogijo({
  sport: "nba",
  range: "half-court",
  look: "chalkboard",
  landmarks: true,
  direction: { home: "right" },
  axes: { ticks: 10 },
});

The penalty area, in Japanese

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

const svg = drawKyogijo({ sport: "soccer", range: "penalty-area", landmarks: true, language: "ja" });

A score on a range#

The panel is moved inside what is shown, or, when the range is too small for it, the score is a strip under the drawing.

The offensive zone, with a score

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

const svg = drawKyogijo({
  sport: "nhl",
  range: "offensive-zone",
  away: { name: "USA", abbr: "USA", score: 3, color: "#1c3f7a" },
  home: { name: "Canada", abbr: "CAN", score: 2, color: "#d52b1e" },
  status: "final-ot",
  competition: "Cup Final, Game 7",
});

The offensive zone with a score, tall

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

const svg = drawKyogijo({
  sport: "nhl",
  range: "offensive-zone",
  orientation: "portrait",
  away: { name: "USA", abbr: "USA", score: 3, color: "#1c3f7a" },
  home: { name: "Canada", abbr: "CAN", score: 2, color: "#d52b1e" },
  status: "final-ot",
  competition: "Cup Final, Game 7",
});

The half court, with a score

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

const svg = drawKyogijo({
  sport: "nba",
  range: "half-court",
  away: { name: "Australia", abbr: "AUS", score: 108, color: "#00843d" },
  home: { name: "Japan", abbr: "JPN", score: 112, color: "#bc002d" },
  status: "final",
  competition: "Finals, Game 6",
});

The paint: the score is a strip

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

const svg = drawKyogijo({
  sport: "nba",
  range: "paint",
  away: { name: "Australia", abbr: "AUS", score: 108, color: "#00843d" },
  home: { name: "Japan", abbr: "JPN", score: 112, color: "#bc002d" },
  status: "final",
  competition: "Finals, Game 6",
});

The infield, with a score

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

const svg = drawKyogijo({
  sport: "mlb",
  range: "infield",
  away: { name: "Japan", abbr: "JPN", score: 4, color: "#bc002d" },
  home: { name: "USA", abbr: "USA", score: 6, color: "#1c3f7a" },
  status: "Bottom 9th",
  competition: "Game 5",
  park: "fenway-park",
});

The red zone, with a score

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

const svg = drawKyogijo({
  sport: "nfl",
  range: "red-zone",
  away: { name: "Mexico", abbr: "MEX", score: 27, color: "#006847" },
  home: { name: "USA", abbr: "USA", score: 24, color: "#1c3f7a" },
  status: "final",
  competition: "Championship Game",
});