Description Usage Arguments Value Examples
View source: R/alert_functions.R
Function to plot the output of tabela_historico.
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
)
|
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") |
a plot for each city
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.