plotBubbleMap | R Documentation |
Plots scalar nonegative quantities associated with an area code, as bubbles on a map.
plotBubbleMap(
data,
areaCol,
quantityCol,
areaDef,
areaNameCol = "StratumName",
legendTitle = quantityCol,
areaLabels = T,
xlim = NULL,
ylim = NULL,
areaLabelSize = 2,
bubbleColor = "darkred",
bubbleSize = 10,
bubbleShape = 21,
title = "",
projection = NULL
)
data |
data.frame with quantities to be plotted |
areaCol |
character() identifing column in 'data' that specify area codes, must correspond to 'areaNameCol' |
quantityCol |
character() identifing column in 'data' that specify quantities to be plotted |
areaDef |
|
areaNameCol |
identifies column in 'areaDef' with label names for the areas, must correspond to 'areaCol' |
legendTitle |
title for the legend (explains what the quantities are) |
areaLabels |
logical whether to plot area labels |
xlim |
x axis limits in degrees longitude |
ylim |
y axis limits in degrees latitude |
areaLabelSize |
size for any area labels |
bubbleColor |
color of the bubbles |
bubbleSize |
size for the bubbles |
bubbleShape |
shape of the "bubbles". Default to circle (21). Use e.g. 22 for squares (consult list of pch values) |
title |
plot title |
projection |
proj4string or EPSG code specifying the desired projection, see |
The quantities (quantityCol) is aggregated (summed, ignoring NAs) over combinations of area and group ('areaCol' and 'groupCol') (if given) Bubble areas are proportional to the quantities.
data(landings)
data(ICESareas)
plotBubbleMap(landings, "Area", "LiveWeightKG",
areaDef = ICESareas, areaNameCol = "Area_Full",
bubbleSize = 20, title="Landings on ICES areas")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.