#' data_source
#'
#' \code{data_source} provides the options for the sources reporting the shootings.
#'
#' @param \code{add_token}: add the user's token to access the API.
#' @usage data_source(add_token=xxxx)
#' @return it returns a dataframe of with the options for the source reporting the shooting. The values
#' can be used to filter the cases in the function \code{get_occurrences}
#' #' @examples
#' data_source()
#' @import httr
#' @import rvest
#' @import purrr
#' @import jsonlite
#' @import tibble
#' @importFrom magrittr "%>%"
#' @export
data_source <- function(add_token){
endpoint <- "/occurrence-source"
response <- httr::GET(paste0(base, endpoint),
add_headers('Authorization' = paste("Bearer", add_token, sep = " ")))
jsonlite::fromJSON(httr::content(response, as="text")) %>% tibble::as_tibble()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.