tt_download_file: Reads in TidyTuesday datasets from Github repo

Description Usage Arguments Value PAT Examples

View source: R/tt_download_file.R

Description

Reads in the actual data from the TidyTuesday github

Usage

1
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

1
2
3
4
5
6
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")
}

tidytuesdayR documentation built on Feb. 1, 2022, 9:07 a.m.