abhiamishra / ggshakeR

An analysis and visualization R package that works with publicly available soccer data
https://abhiamishra.github.io/ggshakeR/
MIT License
114 stars 14 forks source link

Change column names in StatsBomb data_type in plot_pass() #82

Closed harshkrishna17 closed 2 years ago

harshkrishna17 commented 2 years ago

Every other pitch plot function accepts column names as (x, y, finalX, finalY) for even statsbomb datasets, but plot_pass accepts the standard statsbomb names (location.x, location.y). This might be confusing so should be changed

harshkrishna17 commented 2 years ago

This isnt a change for the purpose of preference, Its an error in the code from the commit that added the new version of the function to the package

harshkrishna17 commented 2 years ago

Had to shift the theme colors to the beginning of the function as they weren't being registered for the Opta plot type

Ryo-N7 commented 2 years ago

Had to shift the theme colors to the beginning of the function as they weren't being registered for the Opta plot type

ooh that's why it was on top, that's my bad -- i didn't check .

and well, our tests also don't cover appearance, which is something we can do with https://github.com/r-lib/vdiffr but we can talk about that later

harshkrishna17 commented 2 years ago

Its a good thing we're expanding tests. Wouldn't have found an issue if I wasn't trying to include the opta data_type within the tests