Description Usage Arguments See Also
View source: R/scrape_espn_ff_scores.R
Scrape ESPN fantasy football scores
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | scrape_espn_ff_scores(
league_id = .get_league_id(),
league_size = .get_league_size(),
season = .get_season(),
weeks = .get_weeks_cutoff(),
local = FALSE,
path_teams = NULL,
path_scores = NULL,
...,
overwrite = FALSE,
export = TRUE,
dir = .get_dir_data(),
file = .generate_espn_ff_scores_file(league_id, league_size, season, weeks),
ext = "csv",
path = file.path(dir, sprintf("%s.%s", file, ext)),
f_import = readr::read_csv,
f_export = readr::write_csv
)
|
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 |
local, path_teams, path_scores |
If your league is not public, you will have
to download the appropriate JSON files, set |
... |
Additional parameters passed to |
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 |
https://gist.github.com/lbenz730/ea7d5bce0a36fe66c4241c8facd6c153
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.