PySport / kloppy

kloppy: standardizing soccer tracking- and event data
https://kloppy.pysport.org
BSD 3-Clause "New" or "Revised" License
362 stars 59 forks source link

Fix receiver_coordinates of passes for Wyscout v2 #259

Closed probberechts closed 9 months ago

probberechts commented 9 months ago

Wyscout v2 does not define the end coordinates of blocked passes: positions[1] defaults to (0,0). This commit fills in the receiver_coordinates attribute with the start location. This is a good approximation since passes are by definition blocked near their start location.

probberechts commented 9 months ago

As a side note: receiver_coordinates might not be the best name. This attribute is actually filled in with the result coordinates / end coordinates of the pass in (almost?) all serializers, not with the location of the intended receiver as the name suggests.

koenvo commented 9 months ago

Agree on the possibility to improve the the receiver_coordinates name to reflect what it is.