
Function to pull region code using region name and viceversa
Source:R/get_region_id.R
get_region_id.Rd
Function to pull region code using region name and viceversa
Usage
get_region_id(region_name = NULL, region_source = "EEZ", key = gfw_auth())
Arguments
- region_name
Character or numeric EEZ MPA or RFMO name or id.
- region_source
Character, source of region data,
"EEZ"
,"MPA"
or"RFMO"
.- key
Character, API token. Defaults to
gfw_auth()
.
Value
For get_region_id()
, the corresponding code, region names or iso code
for the EEZ, MPA or RFMO label
Examples
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")
} # }