ff_playerscores {ffscrapr} | R Documentation |
Get Player Scoring History
Description
This function returns a tidy dataframe of player scores based on league rules.
Unfortunately, Sleeper has deprecated their player stats endpoint from their supported/open API.
Please see ff_scoringhistory()
for an alternative reconstruction.
Usage
ff_playerscores(conn, ...)
## S3 method for class 'espn_conn'
ff_playerscores(conn, limit = 1000, ...)
## S3 method for class 'flea_conn'
ff_playerscores(conn, page_limit = NULL, ...)
## S3 method for class 'mfl_conn'
ff_playerscores(conn, season, week, ...)
## S3 method for class 'sleeper_conn'
ff_playerscores(conn, ...)
Arguments
conn |
the list object created by |
... |
other arguments (currently unused) |
limit |
A numeric describing the number of players to return - default 1000 |
page_limit |
A numeric describing the number of pages to return - default NULL returns all available |
season |
the season of interest - generally only the most recent 2-3 seasons are available |
week |
a numeric vector (ie 1:17) or one of YTD (year-to-date) or AVG (average to date) |
Value
A tibble of historical player scoring
Methods (by class)
-
ff_playerscores(espn_conn)
: ESPN: returns total points for season and average per game, for both current and previous season. -
ff_playerscores(flea_conn)
: Fleaflicker: returns the season, season average, and standard deviation -
ff_playerscores(mfl_conn)
: MFL: returns the player fantasy scores for each week (not the actual stats) -
ff_playerscores(sleeper_conn)
: Sleeper: Deprecated their open API endpoint for player scores
See Also
ff_scoringhistory
Examples
try({ # try only shown here because sometimes CRAN checks are weird
conn <- espn_connect(season = 2020, league_id = 899513)
ff_playerscores(conn, limit = 5)
}) # end try
try({ # try only shown here because sometimes CRAN checks are weird
conn <- fleaflicker_connect(2020, 312861)
ff_playerscores(conn, page_limit = 2)
}) # end try
try({ # try only shown here because sometimes CRAN checks are weird
sfb_conn <- mfl_connect(2020, league_id = 65443)
ff_playerscores(conn = sfb_conn, season = 2019, week = "YTD")
}) # end try