This function downloads or updates data from the nflverse-data repository releases, creating subfolders that match the release structure.
Arguments
- ...
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
nflverse_releases()
- folder_path
a folder in which subfolders will be created for each release - defaults to path specified in
options(nflreadr.download_path)
or "." (the current working directory)- file_type
one of
c("rds","parquet", "csv", "qs")
- defaults to file type specified inoptions(nflreadr.prefer)
or "rds"- use_hive
whether to create hive-style partition folders for each season, e.g.
"~/pbp/.season=2021/pbp.csv"
- .token
a GitHub API token,
"default"
usesgh::gh_token()
Examples
# \donttest{
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!
})
#> ℹ Now downloading 2 files to /tmp/Rtmpat4wcf.
#> ✔ Downloaded 2 files to /tmp/Rtmpat4wcf.
#> character(0)
# }