tabela_historico: Convert the alert object into a data.frame and calculate...

View source: R/alert_functions.R

tabela_historicoR Documentation

Convert the alert object into a data.frame and calculate indicators

Description

Function to organize the alert results for easy reading and inserting in the database. Also computes receptivity, transmission and incidence levels.

Usage

tabela_historico(obj, iniSE, lastSE, type = "all", versao = Sys.Date())

Arguments

obj

object created by the pipeline.

type

"notified", if it should return total counts, disregarding the final classification. For compatibility reasons.

versao

Default is current's date

ini_se

first week of the table. Default is the first date in obj.

last_se

last week of the table. Default is the last date in obj. To do.

Value

data.frame with the data to be written.

Examples

# Several cities at once:
cidades <- getCidades(uf = "Mato Grosso", datasource = con)
res <- pipe_infodengue(cities = cidades$municipio_geocodigo[1:3], cid10 = "A90", 
finalday= "2018-01-10")
restab <- tabela_historico_comp(res, iniSE = 202301, type = "all") 
tail(restab)
# One city:
res <- pipe_infodengue(cities = 3304557, cid10 = "A90", 
finalday= "2015-01-10")
restab <- tabela_historico(res) 
tail(restab)

AlertaDengue/AlertTools documentation built on Nov. 27, 2024, 11:55 p.m.