statsbomb/open-data

Identifying non-shot-derived goals

JoGall opened this issue · 3 comments

I'm trying to infer game state from goals scored, which I can do trivially for routine shot-derived goals by identifying events where shot.outcome.name == "Goal" but not for non-shot-derived goals (e.g. own goals, deflected passes, etc..).

For example, I can't find any way of identifying Aziz Bouhaddouz's own goal in the Morocco v Iran World Cup game (competition_id == 43, match_id == 7577, id == "8040ccd5-449c-4d0c-a557-e1e2ca4d2f18"). The event is classified as type.name == "Ball Receipt*" and ball_receipt.outcome.name == "Incomplete" but I can't find any information to identify it as leading to a goal.

Thanks for any suggestions!

Have you came across anything that may answer this in your porting of the code @ElSaico?

There were a few passes between that goal and the end of the match - what you got is the last one.

The own goal is registered as two events - one for Iran (id == abe6e2e7-be78-4590-b563-a1ea23543aa3) and another for Morocco (id == a3a081a3-2252-4d6d-a400-e8be4f367192), which includes information on both player and position.

For reference, the event types are type.id == 25, type.name == "Own Goal For" and type.id == 20, type.name == "Own Goal Against".

Ahh I've had a nightmare here! I even manually combed through an exported JSON of the match events without finding type.name == Own Goal For -- turns out I'd filtered a load of type.names from my dataset at some point upstream without realising 😩

Thanks again @ElSaico!