get_map: Get map of a specific country from GADM.

Description Usage Arguments Value Examples

View source: R/get_map.R

Description

Get map of a specific country from GADM.

Usage

1
get_map(format = c("gpkg", "shp"), country, version = "gadm3.6", layer)

Arguments

format

Either gpkg for Geopackage format or shp for Shapefile format.

country

Three-letter ISO country code. Corresponding three-letter ISO code for each country can be found in the list_countries dataset.

version

A character vector specifying the GADM version from which to get the geopackage download from. Default is gadm3.6 for current version of GADM.

layer

A numeric value specifying which layer from geopackage to get. A layer corresponds to the different administrative units of the specific country where 1 is country-level.

Value

SpatialPolygonsDataFrame of the specified country map layer.

Examples

1
get_map(format = "gpkg", country = "AFG", layer = 1)

SpatialWorks/gadmr documentation built on Sept. 1, 2019, 12:11 a.m.