Skip to contents

Returns a user-specified map in a either sf or tibble format.

Usage

load_map(
  country,
  level = c("zone", "reg", "nat"),
  as = c("sf", "sp", "tibble", "data.table")
)

Arguments

country

str Country to load.

level

str Level of geographic resolution to use, either : zone, reg (regional), nat (national). If a multicountry map is requested (such as 'world' or 'africa'), level is ignored. Default is 'zone'.

as

str Type of output desired, either : 'sf', sp', or 'tibble', Default is 'sf'`.

Examples

drc <- load_map('drc')
plot(drc)


drc <- load_map(country = 'drc',
                level = 'reg',
                as = 'data.table')
head(drc)
#> NULL