R/get_region_id.R
get_region_id.Rd
Function to pull region code using region name and viceversa
get_region_id(region_name = NULL, region_source = "EEZ", key = gfw_auth())
Character or numeric EEZ MPA or RFMO name or id.
Character, source of region data, "EEZ"
, "MPA"
or "RFMO"
.
Character, API token. Defaults to gfw_auth()
.
For get_region_id()
, the corresponding code, region names or iso code
for the EEZ, MPA or RFMO label
if (FALSE) { # \dontrun{
get_region_id(region_name = "COL", region_source = "EEZ")
get_region_id(region_name = "Colombia", region_source = "EEZ")
get_region_id(region_name = "Nazca", region_source = "MPA")
get_region_id(region_name = "IOTC", region_source = "RFMO")
get_region_id(region_name = 8456, region_source = "EEZ")
# Handling empty strings (high-seas)
get_region_id(region_name = "", region_source = "EEZ")
get_region_id(region_name = NA, region_source = "EEZ")
get_region_id(region_name = NA, region_source = "MPA")
} # }