gb_get_max_adm_lvl: Find the highest available ADM level

View source: R/gb-get-max-lvl.R

gb_get_max_adm_lvlR Documentation

Find the highest available ADM level

Description

Returns a summary of selected country codes and their highest available ADM level in geoBoundaries.

Usage

gb_get_max_adm_lvl(
  country = "all",
  release_type = c("gbOpen", "gbHumanitarian", "gbAuthoritative")
)

Arguments

country

A character vector of country names or ISO 3166-1 alpha-3 country codes. Use "all" to return boundaries for all countries. See also countrycode::countrycode() from countrycode.

release_type

A character string, one of "gbOpen", "gbHumanitarian" or "gbAuthoritative". For most users, use "gbOpen" (the default), which contains openly licensed boundaries suitable for most purposes when their individual license terms are followed. "gbHumanitarian" boundaries are mirrored from UN OCHA and may have additional conditions. "gbAuthoritative" boundaries are mirrored from UN SALB, verified through in-country processes and cannot be used for commercial purposes.

Value

A tibble from tibble containing ISO 3166-1 alpha-3 country codes and their highest available ADM levels.

Source

geoBoundaries API.

See Also

gb_get() downloads boundaries for the available ADM levels. The ADM wrappers request a single administrative level.

Metadata and licensing functions: gb_get_metadata()

Examples


all <- gb_get_max_adm_lvl()
library(dplyr)

# Countries whose highest available level is ADM1.
all |>
  filter(maxBoundaryType == 1)

# Countries with ADM4 available.
all |>
  filter(maxBoundaryType == 4)


geobounds documentation built on Sept. 6, 2026, 1:06 a.m.