Sonars: a rose for each zone

The bars are the mean length of the passes in each direction.

Soccer pitchDrawn as: a soccer pitch, 105 by 68 metres, with the halfway line, the centre circle, both penalty areas, goal areas, penalty marks and arcs, the corner arcs and the goals. Data: Direction roses of 400 movements: 3 roses of 8 directions. Most common direction: 0 degrees, 47. 0 degrees points to the right end of the surface as drawn wide and 90 degrees to the top.Direction roses of 400 movements: 3 roses of 8 directionsMost common direction: 0 degrees, 47. 0 degrees points to the right end of the surface as drawn wide and 90 degrees to the top.Defensive third: 131 movements, most toward 0 degrees338 to 23 degrees: 37.423 to 68 degrees: 33.8293 to 338 degrees: 34.2Middle third: 147 movements, most toward 0 degrees338 to 23 degrees: 44.923 to 68 degrees: 35.2293 to 338 degrees: 34.2Attacking third: 122 movements, most toward 0 degrees338 to 23 degrees: 47.323 to 68 degrees: 41.6

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 moves = Array.from({ length: 400 }, (_, i) => { const x = 5 + ((i * 13) % 90); const y = 5 + ((i * 29) % 90); return { x, y, x2: x + 8 + (i % 5) + (x > 50 ? 4 : 0), y2: y + ((i % 7) - 3) * 2.2, id: (i % 5) + 1 }; });
const svg = drawKyogijo({ sport: "soccer", layers: [{ kind: "sonar", from: "opta", data: moves, by: "zone", zones: "soccer-thirds", angles: 8, statistic: "mean" }] });

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.