Skip to content

Commit

Permalink
Fix goal mouth coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
probberechts committed Nov 19, 2023
1 parent 61b137e commit f41c9f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kloppy/infra/serializers/event/statsbomb/deserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,13 @@ def _parse_coordinates(
y=coordinates[1] - cell_relative_center,
)
elif len(coordinates) == 3:
# A coordinate in the goal frame, only used for the end location of
# Shot events. The y-coordinates and z-coordinates are always detailed
# to a tenth of a yard.
return Point3D(
x=coordinates[0] - cell_relative_center,
y=coordinates[1] - cell_relative_center,
z=coordinates[2] - cell_relative_center,
y=coordinates[1] - .05,
z=coordinates[2] - .05,
)
else:
raise DeserializationError(
Expand Down

0 comments on commit f41c9f2

Please sign in to comment.