Skip to content

An implementation of Karun Singh's Expected Threat with R. Data in the SPADL form is required.

Notifications You must be signed in to change notification settings

gkrhines/xThreatR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xThreatR

An implementation of Karun Singh's Expected Threat with R. Data in the SPADL form is required.

The RScripts included in this repository will allow you to implement the Expected Threat (xT) model laid out in Karun Singh's blog post here: https://karun.in/blog/expected-threat.html

The inspiration for the main script came from the following repository: https://github.com/ML-KULeuven/socceraction/tree/master/socceraction. Also, the included data was processed from Statsbomb's open data repository

How to Use

xThreat.R

To use this RScript effectively, simply take some data from the Statsbomb Data file and input it into the xThreat.R script. The xThreat Applied.R file showcases an example of this and can be used to be the basis of a project using the xT model.

Statsbomb Getter MkII.R

To get this RScript to work, all you have to first download event data from Statsbomb's open data repo: https://github.com/statsbomb/StatsBombR. Then change the path on line 361 to contain those files. Everything should go swimmingly after that.

SPADL Format

https://arxiv.org/pdf/1802.07127.pdf

About

An implementation of Karun Singh's Expected Threat with R. Data in the SPADL form is required.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages