Description Usage Arguments Value PAT Examples
Pulls the readme and URLs of the data from the TidyTuesday github folder based on the date provided
1 | tt_load_gh(x, week, auth = github_pat())
|
x |
string representation of the date of data to pull, in YYYY-MM-dd format, or just numeric entry for year |
week |
left empty unless x is a numeric year entry, in which case the week of interest should be entered |
auth |
github Personal Access Token. See PAT section for more information |
a 'tt' object. This contains the files available for the week, readme html, and the date of the TidyTuesday.
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 from <https://happygitwithr.com/github-pat.html> to set the PAT.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # check to make sure there are requests still available
if(rate_limit_check(quiet = TRUE) > 10 & interactive()){
tt_gh <- tt_load_gh("2019-01-15")
## readme attempts to open the readme for the weekly dataset
readme(tt_gh)
agencies <- tt_download(
tt_gh,
files = "agencies.csv"
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.