scrape_espn_ff_scores.Rd
Scrape ESPN fantasy football scores
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 |