-
Notifications
You must be signed in to change notification settings - Fork 67
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
Introduce a new event type for ball receipts #395
Comments
I would be happy to support this if there is a compelling use case but currently I also see a few reasons why we might not want to add it:
So, I have a few questions:
|
Hi,
Their implementation: class BallReceiptEvent(Event):
"""
BallReceiptEvent
Attributes:
event_type (EventType): `EventType.BALL_RECEIPT` (See [`EventType`][kloppy.domain.models.event.EventType])
event_name (str): `"ball_receipt"`
"""
event_type: EventType = EventType.BALL_RECEIPT
event_name: str = "ball_receipt"
result: BallReceiptResult
class BallReceiptResult(ResultType):
"""
BallReceiptResult
Attributes:
COMPLETE (BallReceiptResult): Complete ball receipt
INCOMPLETE (BallReceiptResult): Incomplete ball receipt (pass was incomplete, out or offside)
"""
COMPLETE = "COMPLETE"
INCOMPLETE = "INCOMPLETE"
@property
def is_success(self):
"""
Returns if the ball receipt was complete
"""
return self == self.COMPLETE
What do you think? |
Ok. I agree with adding support for "deducing" ball receipt events. I'm still unsure whether we need a "result" for these events. If a pass was out, there was actually no ball receipt. Hence, maybe we should not create a ball receipt event for incomplete receipts? I don't think we should blindly follow StatsBomb. I also don't think we will be able to deduce these incomplete pass receipts for the other providers so this will create inconsistencies. At least we should define it better what "complete" and "incomplete" means in this context. For example, if a player receives a pass but poorly controls it, is that a completed ball receipt? |
I agree with your reasoning. Maybe it makes more sense to define a completed ball receipt as a ball receipt after which the receiving player performed another on-the-ball action (that is not a miscontrol)? So when a player gives a failed pass after a receival, it would still be classified as a completed ball receipt. Do you think it is possible to deduce this in a consistent way for all providers? If not, it might be better to not have a "result" property for these events. |
We want to introduce a new event type for ball receipts.
Some providers (such as StatsBomb) already have ball_receipt events in their raw event data. For other providers that don't directly have ball_receipt events, we would have to deduce these events from the event stream.
This information is already present in the current data output, but for analytics purposes it would be cleaner to have this as a separate event. Generating these receival events could be optional during the deserialization, as it probably shouldn't be done by default.
The text was updated successfully, but these errors were encountered: