afriadmin: Get admin polygons

Description Usage Arguments Value Examples

View source: R/afriadmin.r

Description

returns admin polygons for specified countries and optionally plots map

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
afriadmin(
  country,
  level = 1,
  datasource = "geoboundaries",
  type = "simple",
  version = NULL,
  path = tempdir(),
  quiet = FALSE,
  plot = "mapview"
)

Arguments

country

a character vector of country names or iso3c character codes.

level

which admin level to return

datasource

data source, 'geoboundaries' or 'gadm'

type

for geoboundaries, boundary type defaults to 'simple' One of 'HPSCU', 'HPSCGS', 'SSCGS', 'SSCU', or 'precise' 'simple' 'precise standard' 'simple standard' Determines the type of boundary link you receive. More on details

version

for geoboundaries defaults to the most recent version of geoBoundaries available. The geoboundaries version requested, with underscores. For example, 3_0_0 would return data from version 3.0.0 of geoBoundaries.

path

where to save downloaded data for gadm, defaults to tempdir()

quiet

for geoboundaries, if TRUE no message while downloading and reading the data. Default to FALSE

plot

option to display map 'mapview' for interactive, 'sf' for static

Value

sf

Examples

1
sfnga2 <- afriadmin("nigeria", level=2)

afrimapr/afriadmin documentation built on Dec. 15, 2021, 2:35 p.m.