Sonars: a rose for each player
Soccer pitch Drawn 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: 5 roses of 10 directions. Most common direction: 0 degrees, 62. 0 degrees points to the right end of the surface as drawn wide and 90 degrees to the top. Direction roses of 400 movements: 5 roses of 10 directions Most common direction: 0 degrees, 62. 0 degrees points to the right end of the surface as drawn wide and 90 degrees to the top. 1: 80 movements, most toward 0 degrees 342 to 18 degrees: 43 18 to 54 degrees: 18 306 to 342 degrees: 19 2: 80 movements, most toward 0 degrees 342 to 18 degrees: 56 18 to 54 degrees: 13 306 to 342 degrees: 11 3: 80 movements, most toward 0 degrees 342 to 18 degrees: 61 18 to 54 degrees: 10 306 to 342 degrees: 9 4: 80 movements, most toward 0 degrees 342 to 18 degrees: 60 18 to 54 degrees: 11 306 to 342 degrees: 9 5: 80 movements, most toward 0 degrees 342 to 18 degrees: 62 18 to 54 degrees: 9 306 to 342 degrees: 9
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: "player", angles: 10 }] });
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.