Learn R Programming

GADMTools (version 3.9-1)

propDots: Plot proportionnal circles (dots) on a map

Description

Plot values as proportionnal circles on a map.

Usage

propDots(x, data, value, breaks=NULL, range=NULL,
         labels=NULL, color="red", title="", 
         subtitle = "", caption = "", note=NULL)

Arguments

x

Object gadm_sf or gadm_sp

data

Object data.frame with columns 'latitude' and 'longitude'

value

Character Name of a column of the data.frame.

breaks

a vector of breaks

range

vector min, max

labels

vector of labels

color

a valid color

title

Character title of the plot

subtitle

Character subtitle of the plot

caption

Character caption of the plot

note

Character A note associated with the plot

Value

Object ggplot2

See Also

classDots

Examples

Run this code
# NOT RUN {
library(GADMTools)
data("Corsica")

longitude <- runif(7, min=8.74, max = 9.25)
latitude  <- runif(7, min=41.7, max = 42.6)
Cases <- runif(7, 25, 100)
DAT <- data.frame(longitude, latitude, Cases)

propDots(Corsica, data = DAT, value="Cases",
         breaks=c(0, 25, 50, 75, 100), range = c(25, 100))
# }

Run the code above in your browser using DataLab