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

Description Usage Arguments Value Author(s) Examples

Description

This function creates a bubble plot of spatial

data, with options for bicolour residual plots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
bubbleMap(SP, coords = c("x", "y"), crs = sp::CRS("+proj=longlat +datum=WGS84"), 


    map, filename = "", zcol = 1, max.radius = 100, key.entries, 


    do.sqrt = TRUE, colPalette = NULL, strokeColor = "#FFAA00", 


    alpha = 0.7, strokeWeight = 1, LEGEND = TRUE, legendLoc = "topleft", 


    verbose = 0)

Arguments

SP

object of class data.frame or SpatialPointsDataFrame-class with associated coordinate reference systems

coords

names of coordinate columns

crs

coordinate reference systems

map

map object; if missing map is downloaded from server

filename

filename to save the map under, IF map object not given

zcol

variable column name, or column number after removing spatial coordinates from [email protected]: 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

legendLoc

the x and y co-ordinates to be used to position the legend. They can be specified by keyword or in any way which is accepted by legend

verbose

level of verbosity

Value

##################################################################

map structure or URL used to download the tile.

Author(s)

Markus Loecher

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data(lat.lon.meuse, package="loa", envir = environment())





map <- GetMap(center=c(lat=50.97494,lon=5.743606), zoom=13,


       size=c(480,480),destfile = file.path(tempdir(),"meuse.png"),


        maptype="mobile", SCALE = 1);





par(cex=1.5)


bubbleMap(lat.lon.meuse, coords = c("longitude","latitude"), map=map,


      zcol='zinc', key.entries = 100+ 100 * 2^(0:4));

RgoogleMaps documentation built on May 2, 2019, 5:03 p.m.