wiscostret / fplscrapR

This package enables those interested in Fantasy Premier League to perform detailed data analysis of the game, using the FPL's JSON API. The fplscrapR functions help R users collect and parse data from the Official Fantasy Premier League website.
Creative Commons Zero v1.0 Universal
76 stars 16 forks source link

Missing variables in get_player_details for season 19/20 #20

Closed Oscjor closed 3 years ago

Oscjor commented 3 years ago

Hi!

First of all, I just want to say that I really appreciate your work with the fplscrapR-package! :) I am trying to build an expected assist model for season 19/20 prior to the upcoming season, but when I load a data frame for season19/20 using the get_player_details function I do not find key_passes and open_play_crosses in order to make the vector "potential assists". Is there a way that I could access that?

Cheers!

wiscostret commented 3 years ago

Hi, thanks for the feedback! Unfortunately for the 19/20 FPL season, the FPL team have removed some of the detailed statistics that used to be available in the API, such as key passes and open play crosses. It´s simply not in the API anymore. There´s plenty of other fun things you can do with fplscrapR of course, but if you´re specifically interested in building an xA model, FBRef have a wonderful database, and there are guidelines for scraping their site out there, e.g. here and here.

Oscjor commented 3 years ago

Thank you so much! I managed to scrape what I was looking for.