-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Opta] add formation and lineup changes #333
[Opta] add formation and lineup changes #333
Conversation
I've resolved the |
@koenvo @JanVanHaaren any chance to get a review on this? :-) |
…period and not negative value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request looks good to me. Thank you!
Can you merge current master in? |
# Conflicts: # kloppy/tests/test_opta.py # kloppy/tests/test_statsperform.py
done |
I've put this in the kloppy development Slack channel too, and even though this has been merged, I think something is broken here. Namely:
|
Added recognition of player position changes in formation changes and introduced more detailed starting positions for players.
However, I'm still struggling on how to properly set the detailed starting positions for players. I want to use the qualifier information of the team setup events (ID 34) present in the F24 / MA3 files, since they contain more detailed information about the starting positions of the players in comparison with the starting positions present in the F7 / MA1 files.
In the draft implementation of my PR, I update the starting positions of the player based on the team setup events, but this results into a
dataclasses.FrozenInstanceError: cannot assign to field 'starting_position'
.Should we refactor the code so that the creation of teams (and players) doesn't rely only on F7 / MA1 files, but also on F24 / MA3 files? Thoughts e.g. @probberechts ?
Also, the position labels I've chosen in the
formation_mapping
are based on my best effort estimations of what the correct description of a position in the zone shown in the StatsPerform documentation appendix. Below, an example of how the positional information is described in the appendix.