Set-piece report card

The “hero” figure: one team’s corner delivery map, end-zone heatmap, and attempts/success-rate comparison against their opponent, combined into a single shareable image with plot_dashboard().

from pathlib import Path

from wa_setpieces import delivery_locations, load_matches
from wa_setpieces.viz.plots import plot_dashboard

try:
    _here = Path(__file__).resolve().parent
except NameError:
    _here = Path.cwd()
DATA = _here.parent / "tests" / "data" / "sample_match.json"

events = load_matches(DATA)
corners = delivery_locations(events, "corner")
team_id = corners["contestantId"].value_counts().idxmax()
fig = plot_dashboard(events, team_id, set_piece_type="corner")
f2yd0yzt… — corner deliveries, f2yd0yzt… — corner end zones, Attempts by set-piece type, Success rate by set-piece type

Gallery generated by Sphinx-Gallery