Skip to content

Commit

Permalink
Merge pull request #83 from koenvo/more-docs
Browse files Browse the repository at this point in the history
More docs
  • Loading branch information
koenvo authored Dec 28, 2020
2 parents 5484cc0 + 44ed967 commit 2c4ce19
Show file tree
Hide file tree
Showing 14 changed files with 749 additions and 28 deletions.
4 changes: 3 additions & 1 deletion docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
mkdocs
mkdocs-jupyter
mkdocs-material
jupyter
jupyter
mkdocstrings

31 changes: 31 additions & 0 deletions docs/api/domain/common.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Classes

::: kloppy.domain.models.common.Metadata
selection:
inherited_members: true

::: kloppy.domain.models.common.Player

::: kloppy.domain.models.common.Position

::: kloppy.domain.models.common.Team

::: kloppy.domain.models.common.Score

::: kloppy.domain.models.common.Period



## Enums

::: kloppy.domain.models.common.AttackingDirection

::: kloppy.domain.models.common.BallState

::: kloppy.domain.models.common.DatasetType

::: kloppy.domain.models.common.Ground

::: kloppy.domain.models.common.Orientation

::: kloppy.domain.models.common.Provider
67 changes: 67 additions & 0 deletions docs/api/domain/event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## Dataset

::: kloppy.domain.models.event.EventDataset
selection:
inherited_members: true
members:
- "to_pandas"
- "transform"
- "filter"
- "add_state"

## Events

### Event base class
::: kloppy.domain.models.event.Event

::: kloppy.domain.models.event.ShotEvent
::: kloppy.domain.models.event.PassEvent
::: kloppy.domain.models.event.TakeOnEvent
::: kloppy.domain.models.event.CarryEvent
::: kloppy.domain.models.event.RecoveryEvent

::: kloppy.domain.models.event.SubstitutionEvent
::: kloppy.domain.models.event.PlayerOnEvent
::: kloppy.domain.models.event.PlayerOffEvent

::: kloppy.domain.models.event.CardEvent
::: kloppy.domain.models.event.FoulCommittedEvent

::: kloppy.domain.models.event.BallOutEvent

::: kloppy.domain.models.event.GenericEvent


## Results

::: kloppy.domain.models.event.ShotResult
::: kloppy.domain.models.event.PassResult
::: kloppy.domain.models.event.CarryResult
::: kloppy.domain.models.event.TakeOnResult


## Types

::: kloppy.domain.models.event.EventType
::: kloppy.domain.models.event.CardType


## Qualifiers

Qualifier specify additional information about certain events. See [`get_qualifier_value`](kloppy.domain.models.event.Event.get_qualifier_value) for usage.

::: kloppy.domain.models.event.Qualifier

::: kloppy.domain.models.event.SetPieceQualifier
::: kloppy.domain.models.event.SetPieceType

::: kloppy.domain.models.event.BodyPartQualifier
::: kloppy.domain.models.event.BodyPart

::: kloppy.domain.models.event.PassQualifier
::: kloppy.domain.models.event.PassType





6 changes: 6 additions & 0 deletions docs/api/domain/pitch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:::kloppy.domain.models.pitch.Point

:::kloppy.domain.models.pitch.PitchDimensions

:::kloppy.domain.models.pitch.Dimension

1 change: 1 addition & 0 deletions docs/api/domain/tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Coming soon
36 changes: 36 additions & 0 deletions docs/api/helpers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Helpers

## Loading event data

All event load functions support [options](#options).

::: kloppy.load_statsbomb_event_data

::: kloppy.load_opta_event_data

::: kloppy.load_metrica_json_event_data

::: kloppy.load_sportec_event_data

::: kloppy.load_wyscout_event_data


### Options

Option | Type | Description | Default
------ | ---- | ----------- | -------
**`event_types`** | `List[str]` | Only load events of these types to the dataset. By default load all types. See [`EventTypes`][kloppy.domain.models.event.EventType]. Pass the name of the EventType. Example `["PASS", "SHOT"]` | None

## Loading tracking data

Coming soon

## Other helpers

::: kloppy.domain.services.state_builder.add_state

::: kloppy.helpers.to_pandas

::: kloppy.helpers.transform


22 changes: 11 additions & 11 deletions docs/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Please [open a ticket](https://github.com/PySport/kloppy/issues) when you like t
|-|-|:-:|:-:|:-:|:-:|:-:|
|**File format**||JSON|XML|XML|JSON|JSON|
|**Event types**|
||Pass||||||
||Shot||||||
||TakeOn|||||||
||Carry||||||
||Substitution||||||
||PlayerOn/Off||||||
||Card||||||
||Recovery||||||
||BallOut|[^2]||[^2]|||
||FoulCommitted||||||
||Generic[^1]|✓|✓|✓|✓|✓|s
||[Pass][kloppy.domain.models.event.PassEvent]||||||
||[Shot][kloppy.domain.models.event.ShotEvent]||||||
||[TakeOn][kloppy.domain.models.event.TakeOnEvent]|||||||
||[Carry][kloppy.domain.models.event.CarryEvent]||||||
||[Substitution][kloppy.domain.models.event.SubstitutionEvent]||||||
||[PlayerOn][kloppy.domain.models.event.PlayerOnEvent]/[Off][kloppy.domain.models.event.PlayerOffEvent]||||||
||[Card][kloppy.domain.models.event.CardEvent]||||||
||[Recovery][kloppy.domain.models.event.RecoveryEvent]||||||
||[BallOut][kloppy.domain.models.event.BallOutEvent]|||[^2]|||
||[FoulCommitted][kloppy.domain.models.event.FoulCommittedEvent]||||||
||[Generic][kloppy.domain.models.event.GenericEvent][^1]|✓|✓|✓|✓|✓|s
|**Qualifiers**|
||SetPiece|✓[^3]|✓[^3]|✓[^3]|✓[^3]|✓[^3]
||BodyPart|||||`RightFoot` `LeftFoot`
Expand Down
Loading

0 comments on commit 2c4ce19

Please sign in to comment.