Library for visualizing soccer event stream data
This is a package to visualize soccer data
To install it simply
pip install matplotsoccer
The most important functions are
- Plotting a field with
- Plotting a heatmap with
- Plotting soccer event stream data. Here is an example of five actions in the SPADL format (see https://github.com/ML-KULeuven/socceraction) leading up to Belgium's second goal against England in the third place play-off in the 2018 FIFA world cup.
|8657||2||2181||Belgium||Kevin De Bruyne||53.8||48.2||70.6||42.2||dribble||success||foot|
|8657||2||2184||Belgium||Kevin De Bruyne||70.6||42.2||87.4||49.1||pass||success||foot|
Here is the phase visualized using
matplotsoccer.actions( location=actions[["start_x", "start_y", "end_x", "end_y"]], action_type=actions.type_name, team=actions.team_name, result= actions.result_name == "success", label=actions[["time_seconds", "type_name", "player_name", "team_name"]], labeltitle=["time","actiontype","player","team"], zoom=False )
(c) Tom Decroos 2019
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.