get_gw_data | R Documentation |
Function to extract data for a specific player(s) from a certain gameweek or weeks.
get_gw_data(players, gw = 1:38)
players |
a vector of players, referred to either using their ID's (numerical vector) or names (character vector). as they are written in the id_lookup data frame. I would reccomend using the players ID's due to potential issues with special characters. |
gw |
The FPL Gameweek to pull data for, a vector of integers between 1 and 38. Note that if gameweeks chosen haven't been played yet then data won't be displayed for them. Defaults to all gameweeks. |
A data frame, with one row of data for each chosen player for each chosen gameweek. The data has 29 variables:
Player name
Team played against in this round
Total fpl points earned in this gameweek
Boolean - did the player play at home?
Number of goals scored by the home or away team
The Gameweek
Minutes played by the player in this gameweek
Statistics related to the players performance in this gameweek
fpl bonus points awarded to the player in this gameweek
Points allocated to the player by the fpl bonus points system - used to determine how many bonus point player should be awarded
Values calculated by fpl algorithms
The cost of the player in this gameweek (£m)
Figures relating to how many managers transferred this player in/out for this gameweek
Number of fpl managers selected by
# Not run since it's hard to pick a player who'll be around # forever # get_gw_data('Simon Mignolet') # get_gw_data(190, 1:2) # get_gw_data(1:10, 3) # get_gw_data(c('Simon Mignolet', 'Laurent Koscielny'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.