mapCirclesChoro(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",
nclass = 6, style = "quantile", fixBrks = FALSE, listBrks = NULL,
diverg = FALSE, divergBrk = 0,
palCol = "Greens", palColPos = "Reds", palColNeg = "Blues",
NACol = "grey",
lgdRndDistr = 2, posLegDistr = "bottomleft",
title = paste(var, var2, sep = " & "),
legendCircles = var, legendDistr = 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
style
in the classIntervals
function from the classInt
package.FALSE
(default): the class intervals are computed through the style
argument.
TRUE
: the class intervals are provided through the listBrks
argument, nclass
and style
are not usefixBrks = TRUE
.FALSE
(default): there is no color break in the color palette.
TRUE
: a break is introduced in the color palette. Palettes are defined through the palColPos
and palColNeg
arguments, respectively for valudiverg=TRUE
.RColorBrewer
, to be used in the map.
Use display.brewer.all()
to see the available color ramps. For a more detailed overview : RColorBrewer.divergBrk
if diverg=TRUE
. See palCol
for details.divergBrk
if diverg=TRUE
. See palCol
for details.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$POPVAR <- (mtq$P09_POP-mtq$P99_POP) / mtq$P99_POP
mapCirclesChoro(shpFile=file.path(path.package("rCarto"), "shapes/COMMUNE"),
shpId="INSEE_COM",df=mtq,dfId="ID",var="P09_POP",var2="POPVAR")
Run the code above in your browser using DataLab