plot_alerta: Plot the time series of infodengue's alert levels for one or...

Description Usage Arguments Value Examples

View source: R/alert_functions.R

Description

Function to plot the output of tabela_historico.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_alerta(
  obj,
  geocodigo,
  var = "casos",
  cores = c("#0D6B0D", "#C8D20F", "orange", "red"),
  ini = 201001,
  fim = 202001,
  ylab = var,
  yrange,
  salvar = FALSE,
  nome.fig = "grafico",
  datasource = con
)

Arguments

obj

object created by tabela_historico() or from the pipeline.

geocodigo

city's geocode. If missing, plots for all cities will be created.

var

variable to be plotted, usually "cases", or "inc".

cores

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

ini

first epidemiological week. If not stated, use the first one available

fim

last epidemiological week. If not stated, use the last one available

ylab

y axis label

yrange

y axis range

salvar

TRUE to save the figure (default is FALSE)

nome.fig

figure name (default is "grafico")

Value

a plot for each city

Examples

1
2
3
4
5
6
# Parameters for the model
cidades <- getCidades(regional = "Norte",uf = "Rio de Janeiro")
res <- pipe_infodengue(cities = cidades$municipio_geocodigo, cid10 = "A90", 
finalday= "2018-08-12",nowcasting="none")
restab <- tabela_historico(res)
plot_alerta(restab, geocodigo = cidades$municipio_geocodigo, var="casos")

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