Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,090 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xG-Prediction Model

Idea is to calculate xG of each shot taken, given is the location of each shot taken from in x,y coordinates, and also by calculating angles of each shot towards the goal post.

The Field is divided to 120 x 80 units, and hence locating each shot from the Statsbomb open data. the xG model her predicts from the data of 58k+ shots and draw some conclusions over it.

Setup

To download the data and mounted in drive/MyDrive locattion. Then create a directory /MyDrive/xg-model and here storing the data in the ./data/raw/ directory. also creating a new directory in the /data/processed to store the processed data (csv) files, and then using these to access for further process.

method

shot distance and angles are calculated from the goal post, and then scaling the data and on further caliberating it for realistic results.

conclusion

The data model here predicts the xG model as seen in the following charts: image

drawing shot map

I was very interested in the shot map as we see in the Fotmob, Sofascore and more such apps, so using this data I decided to build that too! here are the results; this is the shot map of all the data in events section (by the date it was formed): image

here is one highlighting those which were shots on target (goals marked as blue): image

ps: what a freak messi was!

this is the data for xG overperformers: image

About

Free football data from StatsBomb, Creating xG prediction model

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages