Combine generate_schedules and scrape_espn_ff_scores results to come up with final standing frequencies

do_simulate_standings(
  league_id = .get_league_id(),
  league_size = .get_league_size(),
  season = .get_season(),
  weeks = .get_weeks_cutoff(),
  sims = 10,
  tries = ceiling(log(sims)),
  overwrite = FALSE,
  export = TRUE,
  dir = .get_dir_data(),
  file = .generate_sims_file(league_id, league_size, season, weeks, sims),
  ext = "parquet",
  path = .generate_path(dir, file, ext),
  f_import = arrow::read_parquet,
  f_export = arrow::write_parquet,
  params.schedules = list(),
  params.scores = list()
)

Arguments

league_id

Number for ESPN league. Probably 6 digits. Can be set globally in the options. See ffsched.league_id.

league_size

Number of teams in the league. Can be set globally in the options. See ffsched.league_size.

season

Season for which to scrape. Can be set globally in the options. See ffsched.season.

weeks

How many weeks are in schedule. Presently, this function requires that (league_size - 1) <= weeks < (2 * (league_size - 2)).

sims

How many unique simulations to generate.

tries

How many times to re-try.

overwrite

Whether to overwrite existing file at path, if it exists.

export

Whether to export.

dir

Directory to use to generate path if path is not explicitly provided.

file

Filename (without extension) to generate path if path is not explicitly provided.

ext

File extension to use to generate path if path is not explicitly provided.

path

Path to export to.

f_import

Function to import with if file exists and overwrite = TRUE.

f_export

Function to export with if export = TRUE .

params.schedules, params.scores

List of named arguments that share names with arguments intended for this function (e.g. ext, file, path, etc.) that should be specific to the generate_schedules and scrape_espn_ff_scores. You probably don't want to use these arguments, unless you have a speficic use case (e.g re-run only 1 of the functions or name the output file in a certain, custom way).