# NOT RUN {
library(sf)
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="cartography"))
plot(st_geometry(mtq), col = "grey60",border = "white",
lwd=0.4, bg = "lightsteelblue1")
propSymbolsChoroLayer(x = mtq, var = "POP", var2 = "MED",
col = carto.pal(pal1 = "blue.pal", n1 = 3,
pal2 = "red.pal", n2 = 3),
inches = 0.2, method = "q6",
border = "grey50", lwd = 1,
legend.var.pos = "topright",
legend.var2.pos = "left",
legend.var2.values.rnd = -2,
legend.var2.title.txt = "Median Income\n(in euros)",
legend.var.title.txt = "Total Population",
legend.var.style = "e")
# First layout
layoutLayer(title="Population and Wealth in Martinique, 2015")
# }
Run the code above in your browser using DataLab