andrewRowlinson / mplsoccer

Football pitch plotting library for matplotlib
MIT License
396 stars 80 forks source link

Statsbomb location now includes x,y,z for some eventes like shots #18

Closed davidfombella closed 3 years ago

davidfombella commented 3 years ago

Hi Andrew:

Just checking this easy to fix problem, read_event(f'match_id.json', warn=False)

` 157 # split location info to x, y and (z for shot) columns and drop old columns --> 158 _split_location_cols(df, 'location', ['x', 'y'])

Error output

ValueError: 2 columns passed, passed data had 3 columns `

andrewRowlinson commented 3 years ago

Fixed with #19 - added extra 'z' coordinate for splitting the location.