PySport/kloppy

[Wyscout V3] Estimate shot end location

fubininho opened this issue · 0 comments

Discussed in #316

Originally posted by fubininho May 21, 2024
#Wyscout V3 doesn't specify where the shot end in (x,y) terms, but it's possible to aproximate based on the zones of the goal they define.

wy_shot_def

Though it's not 100% accurate, when the shot is on target is possible to direct the y coordinate to me in the middle of the third zones. When it's off target, it's possible to set a bit more far away from the goal.

This means that:

  • gl = (68/2)+(7.32/3) = 36,44
  • gc = 34
  • gr = (68/2)-(7.32/3) = 31,56
  • ol ~= (68/2)+7.32 = 41,32
  • or ~= (68/2)-7.32 = 26,68

Currently all shots are located to the corner, which IMHO is less accurate.

Is my thinking correct, or am I missing something? Is it worth it to make this change?

See: https://github.com/PySport/kloppy/blob/master/kloppy/infra/serializers/event/wyscout/deserializer_v3.py#L135