Comments (4)
@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.
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.
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.
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)
- Add a SPADL action type for aerial duels
- WhoScored Parser Not Working DateTime Error HOT 3
- Handle games without actions
- Error with dribble after ball touch (Opta) HOT 5
- Problem xT Value HOT 1
- AttributeError: module 'numpy' has no attribute 'float'. HOT 3
- Pandas 2.0 Support HOT 1
- Support StatsBomb high fidelity x,y coordinates
- Support Opta -> kloppy -> SPADL
- Support Wyscout v2 -> kloppy -> SPADL
- Atomic SPADL - Mini dribbles added HOT 3
- "play_left_to_right" expected behaviour? HOT 4
- SPADL: Gamestate features with null result HOT 1
- SPADL: time_seconds_overall feature and periods
- Lack of compatibility with Wyscout Data: Event Data for one specific match HOT 1
- [Opta] Deflected non-goal shots should have result="fail" HOT 6
- VAEP Features - TIme delta
- Some improvement suggestions: Brasileirão loading from Soccerdata, and adding substitutions in the events HOT 2
- Brasileirão not loading
- Python 3.12 Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socceraction.