Nothing
#' Check if the given ONS json is available
#' @inheritParams map
#' @return \code{TRUE} if the API is available, otherwise \code{stop()} is called.
ensure_ons_api_available <- function(ons_api) {
code <- FALSE
try({
code <- httr::status_code(httr::GET(ons_api))
}, silent = TRUE)
if (code == 200) return(TRUE)
errtext <- paste('The ons_api provided is currently unavailable')
stop(errtext, call. = FALSE)
}
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.