#API
#'@title meteroitesapi
#'@description
#'meteroitesapi is a function to downlaod the meteroites data from the NASA SODA API.
#'It returns a data frame.
#'@usage
#'meteroitesapi()
#'@return
#'Returns a data frame with the meteroites data.
#'@export
meteroitesapi <- function(){
weburl <- "https://data.nasa.gov/resource/gh4g-9sfh.csv"
access <- httr::GET(weburl)
meteroitesData <- readr::read_csv(httr::content(access, as = "text", type = "csv", encoding = "UTF-8"))
check <- httr::status_code(access)
if(check!=200){
print("Please refresh the page or check your internet connection")
}
return(meteroitesData)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.