pipe: Fetch Player Data From The FPL API

%>%R Documentation

Fetch Player Data From The FPL API

Description

Fetches the historical data for each FPL player, including the current prices of those players.

Fetches the expected clean sheet data for each prem team. Uses shot data scraped from Understat.

Usage

fetch_player_data(reduce = TRUE)

fetch_xCS(year = 2020, match_id = "all", ungroup = F, ...)

Arguments

reduce

If TRUE, returns only select columns from the API for nicer display. If FALSE, will return all columns from the FPL API.

year

Season we want to download the xCS data for. For 2020/21 enter 2021.

match_id

Fetch xCS data for a single match, if you know the match ID. By default it is set to 'all'.

ungroup

Set this to TRUE if you want raw data for each game.

Value

a data.frame of the full player data and history.

a data.frame of the expected clean sheets, split by home/away.

Examples

df <- fetch_player_data()

df <- fetch_xCS()


Chrisjb/fploptimiser documentation built on Sept. 14, 2022, 8:50 a.m.