An R Client for Fantasy Football League APIs
Helps access various Fantasy Football APIs (currently MFL, Sleeper, Fleaflicker, and ESPN - eventually Yahoo, potentially others) by handling authentication/rate-limiting/caching, forming appropriate calls, and returning tidy dataframes which can be easily connected to other data sources.
Install the stable version of this package from CRAN or the ffverse r-universe repository:
install.packages("ffscrapr") # CRAN install.packages("ffscrapr", repos = "https://ffverse.r-universe.dev")
Install the development version from GitHub with:
remotes::install_github("ffverse/ffscrapr", ref = "dev")
The dev version has a separate documentation site here.
ffscrapr functions start with a connection object created by
ff_connect(), which stores connection, authentication, and other
user-defined parameters. This object is used by all other functions to
help return the correct data.
library(ffscrapr) ssb <- ff_connect(platform = "mfl", league_id = "54040", season = 2020) # Get a summary of league settings ff_league(ssb) %>% str() # Get rosters ff_rosters(ssb) # Get transactions ff_transactions(ssb)
Platform-specific guides on getting started with ffscrapr are here:
The best places to get help on this package are:
Many hands make light work! Here are some ways you can contribute to this project:
You can open an issue if you’d like to request specific data or report a bug/error.
You can sponsor this project with donations!
If you’d like to contribute code, please check out the contribution guidelines.
The R code for this package is released as open source under the MIT license.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.