Skip to content

Simulate Fantasy Football Seasons

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

mrcaseb/ffsimulator

 
 

Repository files navigation

ffsimulator

Dev status Lifecycle: experimental R build status Codecov test coverage nflverse discord

The {ffsimulator} package helps simulate fantasy football seasons. By leveraging historical weekly finishes, current expert consensus rankings, and your league’s data, this package can quickly run your league through hundreds of seasons and may help you study:

  • expected season finishes and range of outcomes
  • player contributions to season wins
  • effects of potential trades
  • and more!

This package is part of the ffverse family of R packages for fantasy football analysis.

Installation

Install the stable version of this package from the ffverse r-universe repository:

install.packages("ffsimulator", repos = "https://ffverse.r-universe.dev")

Install the development version with either DynastyProcess’s r-universe or remotes + GitHub:

# ffverse's r-universe
install.packages("ffsimulator", repos = "https://dynastyprocess.r-universe.dev")

# or via GitHub c/o remotes/devtools: # install.packages('remotes')
remotes::install_github("dynastyprocess/ffsimulator")

The dev version has a separate documentation site here.

Roadmap

  • Create logic in ADP outcomes to bin together nearby ranks (nearest one above/below) ✅ (binning +1 and -1 together)
  • Scrape more historical ranks to include in package so that we can use 2010-2020 ✅ (2012-2020 is close enough!)
  • Patch data inconsistency for IDs (2012:2015)
  • Create join functions for each of the remaining ff_connect classes :white_check_mark:
  • Create summary function (season-level H2H wins/winpct, AP wins/winpct, total PF + PP) ✅
  • Create simulation summary table ✅
  • Write function documentation ✅
  • Write tests ✅
  • Add test cache infrastructure
  • Write basic usage vignette
  • Write custom usage vignette
  • Add autoplot
  • Clean up README
  • CRAN prep

Usage

This package shares many conventions with the ffverse, including all main functions being prefixed with ff_ for ease of autocomplete.

library(ffsimulate)

conn <- mfl_connect(2021,22627)

sims <- ff_simulate(conn, n_seasons = 100, weeks_per_season = 14, best_ball = FALSE)

sims$summary

Please also see the basic usage and manual simulation vignettes for a detailed introduction.

Getting help

The best places to get help on this package are:

Contributing

Many hands make light work! Here are some ways you can contribute to this project:

Terms of Use

The R code for this package is released as open source under the MIT License.

Fantasy football and NFL data accessed by this package belong to their respective owners, and are governed by their terms of use.

About

Simulate Fantasy Football Seasons

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%