available: Listing all available TidyTuesdays

Description Usage Arguments Details Value PAT Examples

Description

The TidyTuesday project is a constantly growing repository of data sets. Knowing what type of data is available for each week requires going to the source. However, one of the hallmarks of 'tidytuesdayR' is that you never have to leave your R console. These functions were created to help maintain this philosophy.

Usage

1
2
3
tt_available(auth = github_pat())

tt_datasets(year, auth = github_pat())

Arguments

auth

github Personal Access Token. See PAT section for more information

year

numeric entry representing the year of TidyTuesday you want the list of datasets for. Leave empty for most recent year.

Details

To find out the available datasets for a specific year, the user can use the function 'tt_datasets()'. This function will either populate the Viewer or print to console all the available data sets and the week/date they are associated with.

To get the whole list of all the data sets ever released by TidyTuesday, the function 'tt_available()' was created. This function will either populate the Viewer or print to console all the available data sets ever made for TidyTuesday.

Value

‘tt_available()' returns a ’tt_dataset_table_list', which is a list of 'tt_dataset_table'. This class has special printing methods to show the available data sets.

‘tt_datasets()' returns a ’tt_dataset_table' object. This class has special printing methods to show the available datasets for the year.

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 your PAT.

Examples

1
2
3
4
5
6
7
8
# check to make sure there are requests still available
if(rate_limit_check(quiet = TRUE) > 10){
 ## show data available from 2018
 tt_datasets(2018)

 ## show all data available ever
 tt_available()
}

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