Description Usage Arguments Value Examples
returns a mapview (or potentially later sf plot object), most arguments take a vector allowing two layers to be specified
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | compareadmin(
country,
level = c(1, 1),
datasource = c("geoboundaries", "gadm"),
type = c("simple", "simple"),
version = c(NULL, NULL),
quiet = FALSE,
colors = c("red", "blue"),
lwds = c(2, 2),
col.regions = list(RColorBrewer::brewer.pal(9, "YlGn"), RColorBrewer::brewer.pal(9,
"BuPu")),
alpha = c(0.9, 0.9),
layer.names = NULL,
plotlegend = TRUE,
alpha.regions = c(0.1, 0.1),
plot = "mapview",
plotshow = TRUE
)
|
country |
a character vector of country names or iso3c character codes. |
level |
1 |
datasource |
c('geoboundaries','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. |
quiet |
for geoboundaries, if TRUE no message while downloading and reading the data. Default to FALSE |
colors |
for the 2 sources of polygon boundaries default red,blue |
lwds |
line widths for the 2 sources of boundaries default 2,2 |
col.regions |
colour palettes for polygon fills |
alpha |
transparency for the two source boundaries default 0.9,0.9 |
layer.names |
optional names for the two source layers |
plotlegend |
whether to add legend |
alpha.regions |
transparency for the two source fills default 0.9,0.9 |
plot |
option to display map 'mapview' for interactive, 'namestable' for a table of names, 'sf' for static |
plotshow |
whether to display plot |
sf
1 2 3 4 5 | compareadmin("togo", level=2)
#comparing different types from geoboundaries
compareadmin("togo", level=2,
datasource=c('geoboundaries','geoboundaries'),
type=c('sscu','hpscu') )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.