GithubHelp home page GithubHelp logo

Comments (4)

probberechts avatar probberechts commented on June 15, 2024 2

@agdhruv I've added a notebook which downloads and converts the Wyscout dataset to the SPADL format in the wyscout_support branch. If you use it, you should be aware that there are still some bugs in the wyscout converter (see other issues).

from socceraction.

TomDecroos avatar TomDecroos commented on June 15, 2024

Hi kkoripl,

Thanks for flagging this. The core problem seems indeed to be that the soccerlog event data made available by Papalardo et al. is in a different format (i.e., matches.json, teams.json, event.json, players.json, ...) than how Wyscout usually provides their data through one self-contained file per match (match-1.json, match-2.json, match-3.json, ...)

Seeing how the soccerlog data set is probably going to be pretty important for many future soccer analytics researchers, I will try to add a converter to socceraction as soon as possible.

from socceraction.

kkoripl avatar kkoripl commented on June 15, 2024

I came up with something like this and it seems working for me. Of course, there should be possibility to get seperate paths for matches, events, (you name it) files as arguments of function, but as I use only particular set in particular place that's how I did it.

def jsonfiles_to_h5(country, h5_file):
  with pd.HDFStore(h5_file) as store:
    events = load_events_as_df(country)
    match_ids = events[MATCH_ID].unique()
    for match_id in match_ids:
      store[f"events/match_{match_id}"] = events[events[MATCH_ID]==match_id]

    store["matches"] = load_matches_as_df(country).drop_duplicates(WY_ID)
    store["players"] = load_players_as_df().drop_duplicates(WY_ID)

    teams = load_teams_as_df()
    teams = teams[teams['type'] == 'club']
    teams = teams[teams['area'].apply(lambda area: area['name'] == country)]
    store["teams"] = teams

from socceraction.

agdhruv avatar agdhruv commented on June 15, 2024

Seeing how the soccerlog data set is probably going to be pretty important for many future soccer analytics researchers, I will try to add a converter to socceraction as soon as possible.

Hi @TomDecroos is there any update on this? I'd like to use the Wyscout open dataset to convert data to SPADL.

@kkoripl Where can I find the code that worked for you?

from socceraction.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.