Skip to content

Commit

Permalink
Add Wyscout dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvossen committed Mar 12, 2021
1 parent 34ce674 commit c54b4cd
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Find out all changes between different kloppy versions

## 1.5.2 (2021-03-12)



## 1.5.1 (2020-12-23):

Pull request merged:
Expand Down
2 changes: 1 addition & 1 deletion kloppy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
)
from .domain.services.state_builder import add_state

__version__ = "1.5.1"
__version__ = "1.5.2"
1 change: 1 addition & 0 deletions kloppy/infra/datasets/event/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .statsbomb import Statsbomb
from .wyscout import Wyscout
15 changes: 15 additions & 0 deletions kloppy/infra/datasets/event/wyscout.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from typing import Dict, Type

from ..core.builder import DatasetBuilder
from ...serializers.event import EventDataSerializer, WyscoutSerializer


class Wyscout(DatasetBuilder):
def get_dataset_urls(self, **kwargs) -> Dict[str, str]:
match_id = kwargs.get("match_id", "2499841")
return {
"event_data": f"https://raw.githubusercontent.com/koenvo/wyscout-soccer-match-event-dataset/main/processed/files/{match_id}.json",
}

def get_serializer_cls(self) -> Type[EventDataSerializer]:
return WyscoutSerializer
2 changes: 1 addition & 1 deletion kloppy/infra/serializers/event/wyscout/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
INVALID_PLAYER = "0"


def _parse_team(raw_events: List[Dict], wyId: str, ground: Ground) -> Team:
def _parse_team(raw_events, wyId: str, ground: Ground) -> Team:
team = Team(
team_id=wyId,
name=raw_events["teams"][wyId]["officialName"],
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: kloppy 1.5.1
site_name: kloppy 1.5.2
site_url: https://kloppy.pysport.org
repo_url: https://github.com/PySport/kloppy
repo_name: 'GitHub'
Expand Down

0 comments on commit c54b4cd

Please sign in to comment.