View source: R/do_simulate_standings.R
Combine generate_schedules and scrape_espn_ff_scores results to come up
with final standing frequencies
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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()
)
|
league_id |
Number for ESPN league. Probably 6 digits. Can be set globally
in the options. See |
league_size |
Number of teams in the league. Can be set globally
in the options. See |
season |
Season for which to scrape. Can be set globally in the options.
See |
weeks |
How many weeks are in schedule. Presently, this function requires
that |
sims |
How many unique simulations to generate. |
tries |
How many times to re-try. |
overwrite |
Whether to overwrite existing file at |
export |
Whether to export. |
dir |
Directory to use to generate |
file |
Filename (without extension) to generate |
ext |
File extension to use to generate |
path |
Path to export to. |
f_import |
Function to import with if file exists and |
f_export |
Function to export with if |
params.schedules, params.scores |
List of named arguments that share
names with arguments intended for this function (e.g. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.