Learn R Programming

RgoogleMaps (version 1.2.0.2)

bubbleMap: Create a bubble plot of spatial data on Google Maps

Description

This function creates a bubble plot of spatial data, with options for bicolour residual plots.

Usage

bubbleMap(SP, map, filename = "", zcol = 1, max.radius = 100, 

    key.entries = quantile(SP@data[, zcol], (1:5)/5), do.sqrt = TRUE, 

    colPalette = NULL, strokeColor = "#FFAA00", alpha = 0.7, 

    strokeWeight = 1, LEGEND = TRUE, verbose = 0)

Arguments

SP
object of SpatialPointsDataFrame-class with associated coordinate reference systems
map
map object
filename
filename to save the map under, IF map object not given
zcol
variable column name, or column number after removing spatial coordinates from x@data: 1 refers to the first non-coordinate column
max.radius
value for largest circle (the plotting symbols) in metre, circumcircle of triange or quadrangle (square)
key.entries
value for largest circle (the plotting symbols) in metre, circumcircle of triange or quadrangle (square)
do.sqrt
logical; if TRUE the plotting symbol area (sqrt(diameter)) is proportional to the value of the z-variable; if FALSE, the symbol size (diameter) is proportional to the z-variable
colPalette
colours to be used to fill plotting symbols; numeric vector of same size like key.entries colours to be used to fill features depending on attribute
strokeColor
the color to draw the border of circle (the plotting symbols)
alpha
the fill opacity between 0.0 and 1.0
strokeWeight
the stroke width in pixels
LEGEND
logical; if TRUE add bubbleLegend
verbose
level of verbosity

Value

  • ################################################################## map structure or URL used to download the tile.

Examples

Run this code
library(sp)

data("meuse", package = "sp", envir = environment())

m<-bubbleMap(meuse,zcol='zinc');

Run the code above in your browser using DataLab