Closed ejlamarque closed 4 years ago
Thanks for pointing this out!
The issue in get_player_details() is due to FPL having added a number of January signings (e.g. Takumi Minamino) to the game without detailed histories. This might be a new practice, or I just haven't noticed it before. This would only be a problem until the next gameweek starts (tonight), when the player histories would be automatically updated, and the function shouldn't produce an error after that.
In any case, I have pushed a fix to the package so the function will now work always. This produces a full list of players, including newly added ones, with 'NA' data points for their histories. You can update the package by re-installing using the 'install_github' function from the remotes or devtools libraries.
Once you have updated the package, the second issue - related to the vignette for identifying the top 20 players by FPL goal involvement - is fixed by adding a filter to remove the newly added players. You can, for instance, add "filter(!is.na(element))" to the pipe. Again, however, I note that this will only be a problem until the next gameweek starts.
Hope this helps.
Amazing as usually!!!! Everything is working perfect again. Thank you so much for the quick answer. By the way, I will install the package and update the vignette just in case. Thank you again.
Hi everybody. Just contacting you by the error from get_player_details() from gplscrapR
When I run it
library(fplscrapR)
df <- get_player_details()
give me the following error:
Sometimes manage to pass this step clearly
df 589 obs. of 54 variables
and when I run the next step
df %>% filter(round %in% 1:20) %>% # filtering for the GWs we are interested in select(playername,goals_scored,assists) %>% # selecting the relevant columns group_by(playername) %>% # transformation to group and summarize the performance at the 'playername' variable level summarize_all(sum) %>% mutate("involvements"=goals_scored+assists) %>% # adding a new variable that sums the goals scored and assists arrange(-involvements) %>% # ordering (arranging) the table by top involvements slice(1:20) # showing the top20 only
give me the following error message
And before didn't happen and run properly.
If you could take a look I appreciate it. For any further information or details don't hesitate to contact me.
Thank you. Enrique