get_season_data: Function which gives access to higher level data about each...

View source: R/get_season_data.R

get_season_dataR Documentation

Function which gives access to higher level data about each player, aggregated at a season level.

Description

Function which gives access to higher level data about each player, aggregated at a season level.

Usage

get_season_data(players)

Arguments

players

Either a character vector of player names or a numeric vector of player ID's which can be obtained from the 'id_lookup' table

Value

A data frame with one row for each player chosen and 27 variables as follows:

player_name, team_name

Information about the player

start_cost

Cost (in £m) at the start of the season (or when introduced to the game)

now_cost

Cost at the time of calling the function (in £m)

dreamteam_count

How many times this player has appeared in the dreamteam (team of the gameweek)

form

As calculated by pls based on games in the last 30 days

points_per_game

Average points per Gameweek participated in

selected_by_percent

Percent of managers who's team this player is selected in (at the time of running the function)

status

One of: Available, Injured - won't play, Injured - may play, Suspended or Unavailable

total_points

Total fpl points acrued by this player over the season to date

goals_scored, assists, clean_sheets, goals_conceded, own_goals, penalties_saved, penalties_missed, yellow_cards, red_cards, saves

Statistics relating to the players performance over the whole season

bonus

Total fpl bonus points earned over the whole season

bps

Points awarded to this player by the fpl bonus point system over the season

influence, creativity, threat, ict_index

Current values from fpl algorithms

Examples

# Don't run as will fail for missing players in the future
#get_season_data(301)

#get_season_data('John Fleck')

#get_season_data(350:352)

jtalboys/fplR documentation built on July 31, 2022, 11:35 p.m.