R/place_types.R

Defines functions mr_place_types

Documented in mr_place_types

#' Get Marineregions place types
#'
#' @export
#' @param ... Curl options passed on to [httr::GET()]
#' @return A data.frame with the columns:
#' - type (character) the place type
#' - description (character) description of the place type
#'
#' @examples \dontrun{
#' res <- mr_place_types()
#' head(res)
#' res$type
#' }
mr_place_types <- function(...) {
  jsonlite::fromJSON(
    getter(
      file.path(mr_base(), 'getGazetteerTypes.json'),
      format = "application/json; charset=UTF-8;",
      ...
    )
  )
}

Try the mregions package in your browser

Any scripts or data that you put into this service are public.

mregions documentation built on April 12, 2022, 1:05 a.m.