View source: R/gb-get-metadata.R
| gb_get_metadata | R Documentation |
Returns boundary metadata from the geoBoundaries API.
gb_get_metadata(
country = "all",
adm_lvl = "all",
release_type = c("gbOpen", "gbHumanitarian", "gbAuthoritative")
)
country |
A character vector of country names or ISO 3166-1 alpha-3
country codes. Use |
adm_lvl |
ADM level. Accepted values are |
release_type |
A character string, one of |
The result is a tibble from tibble with the following columns:
boundaryID: The ID for this layer. It combines the ISO code, boundary
type and a unique identifier generated from the input metadata and
geometry. This only changes if the underlying boundary changes.
boundaryName: The name of the country represented by the layer.
boundaryISO: The ISO 3166-1 alpha-3 code for the country.
boundaryYearRepresented: The year or range of years in "START to END"
format that the boundary layers represent.
boundaryType: The type of boundary.
boundaryCanonical: The canonical name of the boundary.
boundarySource: A comma-separated list of the primary sources for the
boundary.
boundarySourceURL: The URL of the original boundary source.
boundaryLicense: The original license under which the primary source
released the boundary.
licenseDetail: Notes about the license.
licenseSource: The URL of the primary source.
sourceDataUpdateDate: The date the source information was integrated
into the geoBoundaries repository.
buildDate: The date the source boundary was most recently standardized
and built into a geoBoundaries release.
Continent: The continent the country is associated with.
UNSDG-region: The United Nations Sustainable Development Goals (SDG)
region the country is associated with.
UNSDG-subregion: The United Nations Sustainable Development Goals (SDG)
subregion the country is associated with.
worldBankIncomeGroup: The World Bank income group the country is
associated with.
admUnitCount: The number of administrative units in the boundary.
meanVertices: The mean number of vertices defining the boundaries of each
administrative unit in the layer.
minVertices: The minimum number of vertices defining a boundary.
maxVertices: The maximum number of vertices defining a boundary.
minPerimeterLengthKM: The minimum perimeter length of an administrative
unit in the layer, measured in kilometers and based on a World Equidistant
Cylindrical projection.
meanPerimeterLengthKM: The mean perimeter length of an administrative
unit in the layer, measured in kilometers and based on a World Equidistant
Cylindrical projection.
maxPerimeterLengthKM: The maximum perimeter length of an administrative
unit in the layer, measured in kilometers and based on a World Equidistant
Cylindrical projection.
meanAreaSqKM: The mean area of all administrative units in the layer,
measured in square kilometers and based on an EASE-GRID 2 projection.
minAreaSqKM: The minimum area of an administrative unit in the layer,
measured in square kilometers and based on an EASE-GRID 2 projection.
maxAreaSqKM: The maximum area of an administrative unit in the layer,
measured in square kilometers and based on an EASE-GRID 2 projection.
staticDownloadLink: The static download link for the aggregate ZIP file
containing all boundary information.
gjDownloadURL: The static download link for the GeoJSON.
tjDownloadURL: The static download link for the TopoJSON.
imagePreview: The static download link for an automatically rendered PNG
image of the layer.
simplifiedGeometryGeoJSON: The static download link for the
simplified GeoJSON.
A tibble from tibble with one row per matching boundary and the columns described in Details.
gb_get() downloads the boundaries described by the metadata. The
ADM wrappers request a single administrative level.
Metadata and licensing functions:
gb_get_max_adm_lvl()
# Get boundary metadata for ADM4.
library(dplyr)
gb_get_metadata(adm_lvl = "ADM4") |>
glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.