isopleth: Draw an isopleth on selected regions

Description Usage Arguments Value Author(s) Examples

View source: R/42_isopleth.R

Description

Drawing an isopleth (also known as heat maps) with GADMTools is straightforward. You just have to select your shape(s) file(s) with gadm_loadcountries, load your data from a csv file for example, and call the isoopleth function with the right arguments.

Usage

1
isopleth(x, data, palette=NULL, title="", subtitle = "", caption = "")

Arguments

x

Object gadm_sp

data

data.frame - data to plot

palette

String - An RColorBrewer palette name or a String vector vector of colors. Default NULL.

title

String - Plot title. Default is an empty string.

subtitle

String - Plot subtitle. Default is an empty string.

caption

String - Plot caption. Default is an empty string.

Value

Object ggplot2

Author(s)

Jean Pierre Decorps <jp.decorps@epiconcept.fr>

Examples

1
2
3
4
5
6
7
8
9
library(GADMTools)
data(Corsica)

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

isopleth(Corsica, data = DAT, palette = "Blues")

GADMTools documentation built on Aug. 5, 2021, 1:06 a.m.