Closed Zakgas closed 1 year ago
hi @Zakgas - sorry for the late response.
it seems that there is a problem not with ggshakeR but rather the scraping.
can you confirm if the dataframe single_player
has a size and has data?
Hi @abhiamishra,
I can confirm that the dataframe single_player
has a size and has data
hey @Zakgas - sorry for the late response again; i will try to run and see what the issue is
Hey @abhiamishra,
I know the reason for this bug...
I pushed an update to worldfootballR
to fix a bug that was introduced when FBRef switched providers from StatsBomb to Opta. This led to them changing the format of the scouting data, more variables, time periods to com[are, etc. See this GH issue in worldfootballR
:
https://github.com/JaseZiv/worldfootballR/issues/242
and the PR that resolved it: https://github.com/JaseZiv/worldfootballR/pull/245.
I believe the issue in ggshakeR::plot_pizza()
stems from the manual indexing of rows here:
https://github.com/abhiamishra/ggshakeR/blob/main/R/plot_pizza.R#L108-L112
This would also need to be replicated in the if statement based on whether type == "comparison"
...
I would raise a PR to fix myself, just need to know what columns you wanted returned. Let me know if you want me to help.
Jase
hey @JaseZiv - you can raise a PR. I'll ask @harshkrishna17 what columns he wants to return
I'll have a look at this as soon as I can. Thanks!
Someone asked me to help with this function a while ago and I found most of the bugs that FBRef changes had introduced. So I've done the last bit and written a PR to fix them. https://github.com/abhiamishra/ggshakeR/pull/122
|
-statements with %in%
.All tested for single player and comparison plots with outfield and goalkeeper templates. The Guide to Pizza Plots page should still work without any changes. https://abhiamishra.github.io/ggshakeR/articles/Guide_to_PizzaPlots.html
hi @sfzh - great work; LGTM and I will merge this!
What happened?
Hi,
When trying to run your code on the ggShakeR website for Tammy Abraham:
I get the following error:
Any help would be much appreciated.
Best, Zakariah