library(sf)
mtq <- st_read(system.file("gpkg/mtq.gpkg", package = "cartography"))
par(mar=c(0,0,0,0))
plot(st_geometry(mtq),
col = "white",
bg = "grey95",
border = NA)
wordcloudLayer(
x = mtq,
txt = "LIBGEO",
freq = "POP",
add = TRUE,
nclass = 5
)
legendChoro(
title.txt = "Population",
breaks = getBreaks(mtq$POP, nclass = 5, method = "quantile"),
col = carto.pal("blue.pal", 5),
nodata = FALSE
)
Run the code above in your browser using DataLab