mapCirclesTypo(shpFile, shpId, df, dfId, var, var2,
fixedNorm = FALSE, shareOfCircles = 0.02,
radiusMax = 0.5, valueMax = max(df[, var], na.rm = TRUE),
lgdRndCircles = 0, posLegCircles = "topright",
circleCol = "grey", baseCol = "#FFEDA0",
posLegTypo = "bottomleft", palCol = "Paired", NACol = "grey",
title = paste(var, var2, sep = " & "),
legendCircles = var, legendTypo = var2,
author = "author", sources = "sources",
scalebar = FALSE, scalebarSize, scalebarText,
northArrow = FALSE, northArrowSize,
width = NULL, height = NULL, txtCex = NULL)
dfId
.shpId
.FALSE
(default) : the sum of the surfaces occupied by circles is proportional to the size of the map and is declared by the shareOfCircles
argument, radiusMax
and valueMax
are not used.
TRUE
RColorBrewer
, to be used in the map.
Use display.brewer.all()
to see the available color ramps. For a more detailed overview : RColorBrewer.NA
).author
and sources
) at the bottom of the map are available to display additional information. It is recommended to display the name of the author and the sources of the data and the base map.author
and sources
) at the bottom of the map are available to display additional information. It is recommended to display the name of the author and the sources of the data and the base map.FALSE
(default): don't draw a scale bar.
TRUE
: draws a scale bar. The choice of the scale bar location is interactive.FALSE
(default) : don't draw a North arrow.
TRUE
: draws a North arrow. The choice of the North arrow location is interactive.library(rCarto)
data(mtq)
# minimal example
mtq[c(1,12,18,23,33,8,24),"beach"] <- "No access to the beach"
mtq[c(2,4,5,6,9,13,17,20,21,25,26,29,31,34,11,27,7,19),"beach"] <- "Caribbean Sea"
mtq[c(14,15,16,22,28,30,32,10,3),"beach"] <- "Atlantic Ocean"
mapCirclesTypo(shpFile=file.path(path.package("rCarto"), "shapes/COMMUNE"),
shpId="INSEE_COM",df=mtq,dfId="ID",var="P09_POP",var2="beach")
Run the code above in your browser using DataLab