Nothing
#' Load TidyTuesday data from Github
#'
#' @inheritParams shared-params
#' @inheritParams tt_download
#'
#' @returns `tt_data` object, which contains data that can be accessed via `$`,
#' and the readme for the week's TidyTuesday, which can be viewed by printing
#' the object or calling [readme()].
#'
#' @examplesIf interactive()
#' tt_output <- tt_load("2019-01-15")
#' tt_output
#' agencies <- tt_output$agencies
#'
#' @export
tt_load <- function(x,
week = NULL,
files = "All",
...,
auth = gh::gh_token()) {
# download readme and identify files
tt <- tt_load_gh(x, week, auth = auth)
# download files
tt_data <- tt_download(tt, files = files, ..., auth = auth)
## return tt_data object
structure(
tt_data,
".tt" = tt,
class = "tt_data"
)
}
#' @rdname printing
#' @export
print.tt_data <- function(x, ...) {
readme(x)
message(
"Available datasets:\n\t",
paste(tools::file_path_sans_ext(names(x)), "\n\t", collapse = "")
)
invisible(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.