Package 'nflversedata'

Title: nflverse data storage functions
Description: This repository holds automated data releases for nflverse projects and helper functions for managing the uploads.
Authors: Tan Ho [aut, cre] (ORCID: <https://orcid.org/0000-0001-8388-5155>), Sebastian Carl [aut]
Maintainer: Tan Ho <[email protected]>
License: CC BY 4.0
Version: 0.0.16
Built: 2026-06-01 10:44:52 UTC
Source: https://github.com/nflverse/nflverse-data

Help Index


Download nflverse archive assets with gh cli

Description

Download nflverse archive assets with gh cli

Usage

.nflverse_download_assets(
  release_tag,
  file_type = ".rds",
  download_dir = tempdir(),
  repo = "nflverse/nflverse-data"
)

This functions tries the gh command in a terminal. If it errors, the gh cli isn't available on the machine or at least not on the PATH variable

Description

This functions tries the gh command in a terminal. If it errors, the gh cli isn't available on the machine or at least not on the PATH variable

Usage

gh_cli_available()

Archive nflverse

Description

Archive nflverse

Usage

nflverse_archive(
  release_name,
  archive_tag,
  ...,
  file_type = ".rds",
  repo = "nflverse/nflverse-data"
)

Arguments

release_name

Name of the release. Must be available in repo

archive_tag

The release tag to which data from release_name should be uploaded

...

Currently not in use

file_type

The file type that should be archived. In most cases this should be ".rds"

repo

The repo we want to download assets from.

Value

invisible TRUE after archiving


Save files to nflverse release

Description

This functions attaches nflverse attributes like type and timestamp, saves data to a temporary directory in all of csv, rds, and parquet formats, and then uploads to nflverse-data repository for a specified release tag.

Usage

nflverse_save(
  data_frame,
  file_name,
  nflverse_type,
  release_tag,
  file_types = c("rds", "csv", "parquet", "csv.gz"),
  repo = "nflverse/nflverse-data"
)

Arguments

data_frame

data_frame to save

file_name

file_name to upload as, without the file extension

nflverse_type

metadata: name/information to add to data

release_tag

name of release to upload to

file_types

one or more of ⁠"rds", "csv", "parquet", "csv.gz"⁠

repo

repository to upload to, default: "nflverse/nflverse-data"


Upload to nflverse release

Description

Upload to nflverse release

Usage

nflverse_upload(...)

Arguments

...

currently not used

files

vector of filepaths to upload

tag

release name

repo

repository to upload to, default: "nflverse/nflverse-data"

overwrite

If TRUE (the default) existing files will be overwritten