Skip to content

Commit

Permalink
wip(docs): event data model
Browse files Browse the repository at this point in the history
  • Loading branch information
probberechts committed Aug 24, 2024
1 parent fabad6a commit 1a55a91
Show file tree
Hide file tree
Showing 24 changed files with 523 additions and 111 deletions.
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/ball_out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.BallOutEvent}

{{ render_event_type("kloppy.domain.BallOutEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.CardEvent}

{{ render_event_type("kloppy.domain.CardEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.CarryEvent}

{{ render_event_type("kloppy.domain.CarryEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/clearance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.ClearanceEvent}

{{ render_event_type("kloppy.domain.ClearanceEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/duel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.DuelEvent}

{{ render_event_type("kloppy.domain.DuelEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/formation_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.FormationChangeEvent}

{{ render_event_type("kloppy.domain.FormationChangeEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/foul_committed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.FoulCommittedEvent}

{{ render_event_type("kloppy.domain.FoulCommittedEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/generic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.GenericEvent}

{{ render_event_type("kloppy.domain.GenericEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/goalkeeper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.GoalkeeperEvent}

{{ render_event_type("kloppy.domain.GoalkeeperEvent") }}
67 changes: 3 additions & 64 deletions docs/reference/event-data/event-types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,6 @@

Each event has a type that classifies the general category to which the event belongs. This classification depends on the data provider of the original data. By default, each event in the data provider’s original data is deserialized as a GENERIC event.

<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
overflow:hidden;padding:10px 5px;word-break:normal;}
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg .tg-473x{border-color:inherit;color:#15C;text-align:left;text-decoration:underline;vertical-align:top}
.tg .tg-c01b{background-color:#C27BA0;border-color:inherit;color:#FFF;font-weight:bold;text-align:left;vertical-align:top}
.tg .tg-8xak{background-color:#C27BA0;color:#FFF;font-weight:bold;text-align:left;vertical-align:top}
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
.tg .tg-0lax{text-align:left;vertical-align:top}
.parsed {
background-color: #50C878;
opacity: 0.8;
border: none;
color: white;
padding: 5px 10px;
text-align: center;
text-decoration: none;
font-size: 0.8em;
display: inline-block;
margin: 2px 1px;
cursor: pointer;
border-radius: 4px;
}
</style>
<table class="tg">
<thead>
<tr>
<th class="tg-c01b"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Value</span></th>
<th class="tg-c01b"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Value Description</span></th>
<th class="tg-c01b"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">StatsBomb</span></th>
<th class="tg-8xak"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Opta</span></th>
<th class="tg-8xak"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Wyscout v2</span></th>
<th class="tg-8xak"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Wyscout v3</span></th>
<th class="tg-8xak"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">DataFactory</span></th>
<th class="tg-8xak"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Sportec</span></th>
<th class="tg-8xak"><span style="font-weight:700;font-style:normal;text-decoration:none;color:#FFF;background-color:transparent">Metrica (JSON)</span></th>
</tr>
</thead>
<tbody>
<tr>
<td class="tg-0pky"><span style="">GENERIC</span></td>
<td class="tg-0pky"><span style="font-weight:400;font-style:normal;text-decoration:none;color:#000;background-color:transparent">Unrecognised event type</span></td>
<td class="tg-0pky"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
</tr>
<tr>
<td class="tg-473x"><a href="/reference/event-data/event-types/pass/"><span style="font-weight:400;font-style:normal;text-decoration:underline;color:#15C;background-color:transparent">PASS</span></a></td>
<td class="tg-0pky"><span style="font-weight:400;font-style:normal;text-decoration:none;color:#000;background-color:transparent" aria-describedby="__tooltip2_11">The attempted delivery of the ball from one player to another player on the same team. </span></td>
<td class="tg-0pky"><span class="parsed" title="StatsBomb event type 30/'Pass'">Parsed</span></td>
<td class="tg-0lax"><span class="parsed" title="Opta event type 1/”Pass” or 2/”Offside pass”">Parsed</span></td>
<td class="tg-0lax"><span class="parsed" title="Wysout event type 8/”Pass” or subtype 30/”Corner”, 31/”Free kick”, 32/”Free kick (cross)”, 34/”Goal kick”, 36/”Throw in”">Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
<td class="tg-0lax"><span class="parsed"> Parsed</span></td>
</tr>
</tbody></table>
[](){#kloppy.domain.EventType}

{{ render_event_types() }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/interception.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.InterceptionEvent}

{{ render_event_type("kloppy.domain.InterceptionEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/miscontrol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.MiscontrolEvent}

{{ render_event_type("kloppy.domain.MiscontrolEvent") }}
7 changes: 4 additions & 3 deletions docs/reference/event-data/event-types/pass.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
::: kloppy.domain.PassEvent
options:
inherited_members: false
[](){#kloppy.domain.PassEvent}

{{ render_event_type("kloppy.domain.PassEvent") }}

[](){#kloppy.domain.PassResult}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/player_off.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.PlayerOffEvent}

{{ render_event_type("kloppy.domain.PlayerOffEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/player_on.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.PlayerOnEvent}

{{ render_event_type("kloppy.domain.PlayerOnEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/recovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.RecoveryEvent}

{{ render_event_type("kloppy.domain.RecoveryEvent") }}
2 changes: 2 additions & 0 deletions docs/reference/event-data/event-types/shot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[](){#kloppy.domain.ShotEvent}
{{ render_event_type("kloppy.domain.ShotEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/substitution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.SubstitutionEvent}

{{ render_event_type("kloppy.domain.SubstitutionEvent") }}
3 changes: 3 additions & 0 deletions docs/reference/event-data/event-types/take_on.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[](){#kloppy.domain.TakeOnEvent}

{{ render_event_type("kloppy.domain.TakeOnEvent") }}
10 changes: 10 additions & 0 deletions docs/reference/event-data/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Event Data

## Event

::: kloppy.domain.Event
options:
show_bases: false
inherited_members: false
show_source: false

## Event Qualifier

::: kloppy.domain.Qualifier
options:
show_bases: false
inherited_members: false
show_source: false
218 changes: 218 additions & 0 deletions docs/reference/providers/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
event_types:
kloppy.domain.GenericEvent:
providers:
statsbomb:
status: parsed
statsperform:
status: parsed
wyscout_v2:
status: parsed
wyscout_v3:
status: parsed
datafactory:
status: parsed
sportec:
status: parsed
metrica_json:
status: parsed
kloppy.domain.PassEvent:
providers:
statsbomb:
status: parsed
implementation: event type 30/"Pass"
statsperform:
status: parsed
implementation: event type 1/”Pass” or 2/”Offside pass”
wyscout_v2:
status: parsed
implementation: "event type 8/”Pass” or subtype 30/”Corner”, 31/”Free kick”, 32/”Free kick (cross)”, 34/”Goal kick”, 36/”Throw in” "
attributes:
receive_timestamp:
providers:
statsbomb:
status: parsed
implementation: null
receiver_coordinates:
statsbomb:
status: parsed
implementation: null
receiver_player:
statsbomb:
status: parsed
implementation: null
kloppy.domain.ShotEvent:
providers:
statsbomb:
status: parsed
implementation: event type 16/"Shot" or 20/"Own goal against"
statsperform:
status: parsed
implementation: event type 13/”Shot (miss)” or 14/”Shot (post)” or 15/”Shot (saved)” or 16/”Shot (goal)”
wyscout_v2:
status: parsed
implementation: event type 10/”Shot” or subtype 33/”Free kick (shot)”, 35/”Penalty”
kloppy.domain.TakeOnEvent:
providers:
statsbomb:
status: parsed
implementation: event type 14/”Dribble”
statsperform:
status: parsed
implementation: event type 3/”Take on”
wyscout_v2:
status: not implemented
implementation: null
kloppy.domain.CarryEvent:
providers:
statsbomb:
status: parsed
implementation: event type 43/”Carry”
statsperform:
status: not supported
implementation: null
wyscout_v2:
status: unknown
implementation: null
kloppy.domain.ClearanceEvent:
providers:
statsbomb:
status: parsed
implementation: "event type 9/”Clearance” or a keeper sweeper clearance event (23/”Goalkeeper” event with type 27/”Keeper sweeper” and outcome 48/”Clear”) in which the goalkeeper uses their head or feet"
statsperform:
status: parsed
implementation: event type 12/”Clearance”
wyscout_v2:
status: parsed
implementation: subevent type 71/”Clearance”
kloppy.domain.InterceptionEvent:
providers:
statsbomb:
status: parsed
implementation: event type 10/” Interception” or event type 30/”Pass” with type 64/”One touch interception”
statsperform:
status: parsed
implementation: event type 8/”Interception” or 74/”Blocked pass”
wyscout_v2:
status: parsed
implementation: null
kloppy.domain.DuelEvent:
providers:
statsbomb:
status: parsed
implementation: event type 4/”Duel” or 33/”Fifty-Fifty” or events with attribute “aerial_won”
statsperform:
status: parsed
implementation: event type 7/”Tackle” or 44/”Aerial” or 67/”Fifty-fifty”
wyscout_v2:
status: parsed
implementation: event type 1/”Duel”
kloppy.domain.SubstitutionEvent:
providers:
statsbomb:
status: parsed
implementation: event type 19/”Substition”
statsperform:
status: not implemented
implementation: event type 18/”Player off” and 19/”Player on”
wyscout_v2:
status: not implemented
implementation: null
kloppy.domain.CardEvent:
providers:
statsbomb:
status: parsed
implementation: event type 24/”Bad behaviour” or 22/”Foul committed”
statsperform:
status: parsed
implementation: event type 17/”Card”
wyscout_v2:
status: parsed
implementation: event type 2/”Foul” with tag 1701, 1702 or 1703
kloppy.domain.PlayerOnEvent:
providers:
statsbomb:
status: parsed
implementation: event type 26/”Player On”
statsperform:
status: not implemented
implementation: event type 21/”Player returns”
wyscout_v2:
status: not implemented
implementation:
kloppy.domain.PlayerOffEvent:
providers:
statsbomb:
status: parsed
implementation: event type 27/”Player Off”
statsperform:
status: not implemented
implementation: event type 20/”Player retired”
wyscout_v2:
status: not implemented
implementation:
kloppy.domain.RecoveryEvent:
providers:
statsbomb:
status: parsed
implementation: "event type 2/”Ball Recovery” or a keeper sweeper claim event (23/”Goalkeeper” event with with type 27/”Keeper sweeper” and outcome 47/”Claim”) in which the goalkeeper does not use their hands "
statsperform:
status: parsed
implementation: event type 49/”Recovery”
wyscout_v2:
status: parsed
implementation: subevent 70/”Acceleration” or 72/”Touch” without tag 1302
kloppy.domain.MiscontrolEvent:
providers:
statsbomb:
status: parsed
implementation: event type 38/”Miscontrol”
statsperform:
status: parsed
implementation: event type 61/”Ball touch” with outcome 0.
wyscout_v2:
status: parsed
implementation: subevent 72/”Touch” with tag 1302
kloppy.domain.BallOutEvent:
providers:
statsbomb:
status: parsed
implementation: "events with attribute “out” or StatsBomb event type 30/”Pass”, 16/”Shot”, 10/” Interception”, 4/”Duel” or 23/”Goalkeeper” with an outcome corresponding to ball going out "
statsperform:
status: parsed
implementation: even type 5/”Ball out” or 6/”Corner awarded”
wyscout_v2:
status: parsed
implementation: event type 5/”Interruption”
kloppy.domain.FoulCommittedEvent:
providers:
statsbomb:
status: parsed
implementation: event type 22/”Foul committed”
statsperform:
status: parsed
implementation: event type 4/”Foul committed” with outcome 0
wyscout_v2:
status: parsed
implementation: event type 2/”Foul”
kloppy.domain.GoalkeeperEvent:
providers:
statsbomb:
status: parsed
implementation: "event type 23/”Goalkeeper”. Some goalkeeper events are parsed as a clearance and recovery. See CLEARANCE and RECOVERY for details. "
statsperform:
status: parsed
implementation: event type 10/”Save” or 11/”Claim” or 41/”Punch” or 52/”Keeper pick-up” or 54/”Smother”
wyscout_v2:
status: parsed
implementation: event type 9/”Save”
kloppy.domain.FormationChangeEvent:
providers:
statsbomb:
status: parsed
implementation: event type 36/”Tactical Shift”
statsperform:
status: parsed
implementation: event type 40/”Formation change”
wyscout_v2:
status: not implemented
implementation: null
Loading

0 comments on commit 1a55a91

Please sign in to comment.