geraMapa: Plot the alert map for any state.

Description Usage Arguments Value Examples

View source: R/alert_functions.R

Description

Function to plot a map of the alert.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
geraMapa(
  alerta,
  subset,
  se,
  cores = c("green", "yellow", "orange", "red"),
  legpos = "bottomright",
  titulo = "",
  filename,
  dir = "",
  shapefile,
  varid,
  varname,
  caption = TRUE,
  resol = 200
)

Arguments

alerta

object created by update.alerta.

subset

nomes das cidades que serão mostradas no mapa.

se

epidemiological week (format = 201610).

cores

colors corresponding to the levels 1, 2, 3, 4.

legpos

legend position. Default is bottomright. Check the other options in the function legend.

titulo

title of the map

filename

if present, the map is saved.

dir

directory where map will be saved

shapefile

shapefile containing polygons for the municipalities

varid

shapefile variable indicating the geocode of the municipalities

varname

name of the variable to be plotted

caption

Default is TRUE

resol

dpi png resolution, default is 200

Value

a map

Examples

1
2
3
4
5
6
# Parameters for the model
cidades <- getCidades(regional = "Norte",uf = "Rio de Janeiro",datasource = con)
res <- pipe_infodengue(cities = cidades$municipio_geocodigo, cid10 = "A90", 
finalday= "2018-08-12",nowcasting="none")
geraMapa(alerta=res, subset = c(3300936, 3302403), se=201804, 
shapefile="shape/33MUE250GC_SIR.shp", varid="CD_GEOCMU", titulo="RJ-Norte")

claudia-codeco/AlertTools documentation built on Aug. 12, 2021, 9:58 a.m.