NEWS.md
release_questions
to help remind me to maintain test infrastructure (v1.4.0.01)mfl_starter_positions
now correctly calculates offensive starters (first via “iop_starters” if defined and then otherwise by subtracting idp starters) as well as kdst_starters (Resolves #264) (v1.4.0.02).ffscrapr_env
relocated from being a child of the base environment to being a child of the empty environment (Resolves #269) (v1.4.0.04)The main goal of v1.4.0 is to add preliminary support for connecting ffscrapr to nflfastR weekly data, and to clean up bugs from v1.3.0. Huge thanks goes to Joe Sydlowski for his contributions on scoring history (and everything else DynastyProcess!)
nflfastr_weekly()
imports weekly offensive statistics from nflfastR’s data repository.nflfastr_rosters()
imports team rosters from nflfastR’s roster repository.ff_scoringhistory()
connects your league’s scoring settings to the nflfastr data (c/o the functions above), and allows you to reconstruct historical scoring for your league!ff_starter_positions()
describes the starter rules for each player/position, including min and max starters at each position accounting for flex spots. This should be useful for calculating things like value over replacement!ff_scoring
for ESPN loses the “override_pos” which only had a value of 16 for D/ST specific rulesff_scoring
rules for ESPN and Sleeper have been expanded from one line per rule to one line per position per rulemfl_playerscores
to use season + league specific players call where possible (#239)flea_rosters
test to 200, which fixes an API check issue (#242)sleeper_transactions
now correctly handles multiple dropped players in one transaction. (#246).mfl_transactions
- adds numeric string parsing to fix bug in auction bid amount (#)mfl_draft
now calculates age as of timestamp and also adds an overall column. (#259, #260)The main goal of ffscrapr 1.3.0 is to add support for the ESPN platform. It also includes several bug fixes, code quality improvements, and a major refactor of tests to reduce overall package size.
A huge thank-you goes to Tony ElHabr for his contributions to the package for the ESPN methods.
custom_players
arguments are deprecated for MFL - it will now return them by default.ESPN is a tricky and undocumented API. Private leagues are accessible if you use the SWID/ESPN_S2 authentication arguments, which are a lot like API keys - see the ESPN authentication vignette.
Unsupported functions:
ff_draftpicks()
- this does not apply to ESPN primarily because it does not support draft pick trades.ff_userleagues()
- ESPN does not support looking up user’s leagues, even when authenticateddp_cleannames()
is a utility function for cleaning player names that removes common suffixes, periods, and apostrophes.espn_potentialpoints()
calculates the optimal lineup for each week. This ishttr::RETRY
instead - this adds some robustness for server-side issues. As suggested by Maelle Salmon’s blog post on not reinventing the wheel.ff_playerscores()
function so that it correctly pulls older names. (Resolves #196)ff_starters()
function - bad default arg, bad players call. (Fixes #202)ff_rosters()
by adding a week parameter (Fixes #215)ff_transactions()
bid_amount into a numeric (Fixes #210)ff_starters()
(Fixes #212)Minor patches to dp_import functions to address issues discovered by CRAN checks.
Also adds minor helper function, dp_cleannames()
, which is a utility function for cleaning player names that removes common suffixes, periods, and apostrophes.
Messed up the export here, whoops. Fixing for next release.
dp_values()
and dp_playerids()
functions to use httr backend for compat with httptest, preventing CRAN errors.The main goal of ffscrapr 1.2.0 is to add a full set of methods for Fleaflicker. This release also adds improved caching options, including writing to your filesystem for persistent caching (see the vignette!), and one hotfix for sleeper_getendpoint.
sleeper_getendpoint()
now behaves more like the other getendpoint functions - first argument is the endpoint and any further args are passed as query parameters.All functions now have Fleaflicker methods! Here are notes about what isn’t the same:
fleaflicker_players()
requires a connection/leagueID by default - acts a little oddly on game days as of right now.ff_playerscores()
- Fleaflicker’s API returns season level data easily, week-level is not readily available yet without some workarounds. Everything else seems to be okay.The main goal of ffscrapr 1.1.0 is to add a full set of methods for Sleeper. Also adds two new generics: ff_userleagues()
and ff_starters()
.
Here is a list of new functions available at the top level (ie for all platforms)
ff_userleagues()
returns a list of user leagues. This is deployed slightly differently for MFL and Sleeper - MFL requires authentication to access user’s leagues, while Sleeper doesn’t have authentication so you can look up any user you like.ff_starters()
returns a list of players started/not-started each week. MFL will return the actual score of each player each week and calculate whether they were optimal, while Sleeper just returns the player themselves.Almost all functions now have Sleeper methods - implemented in what hopes to be relatively familiar manner to MFL. Outlining the specifics of what isn’t the same:
sleeper_userleagues()
is a wrapper on ff_userleagues()
that makes it easier to look up user leagues without first creating a connection object.ff_playerscores()
is not available for Sleeper because Sleeper removed the player stats endpoint - it will generate a warning (rather than an error). Thinking about creating some functions to calculate scoring based on nflfastr.sleeper_getendpoint()
is a little more simple than MFL’s equivalent - just pass a string url (minus api.sleeper.app/v1) or pass in chunks of code, the function will automatically paste them together with “/”.ff_userleagues()
- Sleeper league IDs are more annoying than MFL to handle, so the more intuitive way is to look up the user’s league_ids by username first. MFL does have a parallel feature even if used for different purposes.ff_userleagues()
ff_standings()
(#69, nice.)ff_starters()
as requested by #76 (thanks, Mike!)httr::handle_reset()
call to fix login-caching bug.This is the first (major) version of ffscrapr and it is intended to build out the full set of functions for the first API platform: MFL.
Future versions will add more platforms via methods mapped to the same functions.
Functions include:
ff_connect
(and sibling mfl_connect
) to establish connection parameters and ratelimitingmfl_getendpoint
as a low-level function for making GET requests from MFLff_draft
gets draft resultsff_draftpicks
gets current and future draft picks that have not yet been selectedff_franchises
gets franchise-level identifiers and divisionsff_league
gets league-level summaries of rules, players, and franchisesff_playerscores
gets playerweek-level scoresff_rosters
gets franchise-level rosters complete with namingff_schedule
gets weekly fantasy schedulesff_scoring
gets scoring rulesff_standings
gets league-level season summariesff_transactions
gets a list of all transactions and cleans them into a data frame.