Description Usage Arguments Details Value Examples
Get proportional circles and with polygons indide using a compact layout.
1 |
x |
an sf POLYGON or MULTIPOLYGON object |
var |
name of the numeric field in x to get proportionalities. |
Polygons are not proportional, they are rescaled to fit the circles.
A list of length 2 of circles and shapes sf objects.
1 2 3 4 5 6 7 8 9 10 11 12 | library(sf)
library(popcircle)
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="popcircle"))
res <- popcircle(x = mtq, var = "POP")
circles <- res$circles
shapes <- res$shapes
par(mar = c(0,0,0,0))
plot(st_geometry(circles), col = "darkseagreen", border = "darkseagreen1")
plot(st_geometry(shapes), col = "red", add = TRUE, lwd = 1, border = "red4")
if(require(cartography)){
labelLayer(x = circles[1:10,], txt = "LIBGEO", halo = TRUE, overlap = FALSE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.