Pyrugga is a library to help analyse rugby matches using Opta's Super Scout files. To learn more have a look at Getting Started notebook.
-
Converts XML Super Scout files to three Pandas Dataframes providing: a summary of a match, a time line and list of all actions
-
Heatmaps
- Player Summary
The easest route is to use Docker. Download the Pyrugga repo as a zip file.Then unzip and open a terminal window in the folder then type
docker-compose up
This will launch a juypter server which you can access via http://127.0.0.1:8080/tree. If you dont know how to use Juypter read this tutorial.
pip install pyrugga
For the development version
!pip install --upgrade --force-reinstal --no-deps git+https://github.com/jlondal/pyrugga.git
import pyrugga as prg
df = prg.Match('918053_walvfra_new.xml')
#print summary of match
df.summary
#list all actions in a matches
df.events
#time line of a match
df.timeline
#prints a heatmap
df.heat_map(event='Carry', event_type='One Out Drive', description='Crossed Gainline')
#prints a summary of each players actions normalise by phases while pitch
df.player_summary(norm='phases')
See LICENSE