andrewRowlinson / mplsoccer

Football pitch plotting library for matplotlib
MIT License
391 stars 80 forks source link

What way is attack direction? [StatsBomb Event Data] #89

Closed yyusufcoskun closed 1 year ago

yyusufcoskun commented 1 year ago

Hello, I've seen an issue where somebody else has also asked this, and the answer was that it is left to right. Is this also the case for StatsBomb event data?

Sorry for not knowing and disturbing you, it's only that I'm scared of creating a heatmap that is distorted due to attacking direction.

andrewRowlinson commented 1 year ago

It's always standardized so players attack left to right in event data at least for the providers included in mplsoccer. So if the goalkeeper is on the right hand side of the pitch in real life and taking a goal kick the x coordinate is inverted.

If the ball switches teams you can see that the x coordinates typically invert too