View source: R/utils_download_nflverse.R
nflverse_download | R Documentation |
This function downloads or updates data from the nflverse-data repository releases, creating subfolders that match the release structure.
nflverse_download(
...,
folder_path = getOption("nflreadr.download_path", default = "."),
file_type = getOption("nflreadr.prefer", default = "rds"),
use_hive = file_type %in% c("parquet", "csv"),
.token = "default"
)
... |
releases to download, provided in either unquoted or character format
(i.e. pbp or "pbp" are both fine). Available release names can be listed with
|
folder_path |
a folder in which subfolders will be created for each release -
defaults to path specified in |
file_type |
one of |
use_hive |
whether to create hive-style partition folders for each season, e.g. |
.token |
a GitHub API token, |
try({
## could also set options like
# options(nflreadr.download_path = tempdir(), nflreadr.prefer = "parquet")
nflverse_download(combine, contracts, folder_path = tempdir(), file_type = "parquet")
list.files(tempdir(),pattern = ".parquet$") # check that files were downloaded!
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.