tt_download_file: Reads in TidyTuesday datasets from Github repo

View source: R/tt_download_file.R

tt_download_fileR Documentation

Reads in TidyTuesday datasets from Github repo

Description

Reads in the actual data from the TidyTuesday github

Usage

tt_download_file(tt, x, ..., auth = github_pat())

Arguments

tt

tt_gh object from tt_load_gh function

x

index or name of data object to read in. string or int

...

pass methods to the parsing functions. These will be passed to ALL files, so be careful.

auth

github Personal Access Token. See PAT section for more information

Value

tibble containing the contents of the file downloaded from git

PAT

A Github PAT is a personal Access Token. This allows for signed queries to the github api, and increases the limit on the number of requests allowed from 60 to 5000. Follow instructions at <https://happygitwithr.com/github-pat.html> to set the PAT.

Examples


if(interactive()){
tt_gh <- tt_load_gh("2019-01-15")

agencies <- tt_download_file(tt_gh, 1)
launches <- tt_download_file(tt_gh, "launches.csv")
}


thebioengineer/tidytuesdayR documentation built on Jan. 11, 2024, 4:42 a.m.