Skip to content

A Python library to analyse rugby matches using Opta's Superscout XML files. Build timelines of matches along with calculating descriptive statistics.

License

Notifications You must be signed in to change notification settings

jlondal/pyrugga

Repository files navigation

Pyrugga

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.

Why use Pyrugga

  • 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

Install

I am new to all of this

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.

I know what I am doing

pip install pyrugga

For the development version

!pip install --upgrade --force-reinstal --no-deps git+https://github.com/jlondal/pyrugga.git

Quick Start

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')

License

See LICENSE

About

A Python library to analyse rugby matches using Opta's Superscout XML files. Build timelines of matches along with calculating descriptive statistics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published