R/get_fo_landings.R

Defines functions get_fo_landings

Documented in get_fo_landings

#' Download fishing landings summaries
#'
#' Download a data.frame of total weight by country and year for a
#' given ICES ecoregion.
#'
#' @param ecoregion ICES ecoregion
#'
#' @return a data.frame
#'
#' @examples
#' \dontrun{
#' # requires authorization
#' ns_landings_data <- get_fo_landings("Greater North Sea")
#' }
#' 
#' @export
get_fo_landings <- function(ecoregion) {
  check_ecoregion(ecoregion)

  url <-
    vms_api(
      glue("fisheriesoverviews/landings/{URLencode(ecoregion)}")
    )

  vms_get(url, use_token = TRUE)
}
ices-tools-prod/icesVMS documentation built on April 24, 2023, 2:31 a.m.