pipe_infodengue: pipeline used by infodengue

Description Usage Arguments Value Examples

View source: R/alert_functions.R

Description

wrap of functions used by Infodengue.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
pipe_infodengue(
  cities,
  cid10 = "A90",
  datarelatorio,
  finalday = Sys.Date(),
  iniSE = 201001,
  nowcasting = "none",
  narule = NULL,
  writedb = FALSE,
  datasource = con,
  userinput = FALSE,
  completetail = NA,
  dataini = "notif"
)

Arguments

cities

In general, a vector of 7-digit geocodes. If it is a data.frame containing geocodes and all parameters, these will replace the database's parameters.

cid10

default is A90 (dengue). Chik = A92.0, Zika = A92.8

datarelatorio

epidemiological week

finalday

if provided, uses only disease data reported up to that day

iniSE

first date of the disease data. Default = 201501. Minimum = 201001.

nowcasting

"fixedprob" for static model, "bayesian" for the dynamic model. "none" for not doing nowcast (default)

narule

how to treat missing climate data. Do nothing (default), "zero" fills with zeros, "linear" for linear interpolation, "arima" for inter and extrapolation.

writedb

TRUE if it should write into the database, default is FALSE.

datasource

posgreSQL connection to project's database

completetail

if sinan data is older than final_day, fill in the tail with NA (default) or 0.

dataini

"notif" (default) or "sinpri"

Value

data.frame with the week condition and the number of weeks within the last lag weeks with conditions = TRUE.

Examples

1
2
3
4
5
6
7
8
9
cidades <- getCidades(uf = "Paraná",datasource = con)
res <- pipe_infodengue(cities = cidades$municipio_geocodigo, cid10 = "A90",
nowcasting="none", dataini= "sinpri", completetail = 0, datarelatorio = 202124)
tail(tabela_historico(res))
# User's parameters (not working)
dd <- read.parameters(cities = c(3200300)) %>% mutate(limiar_epidemico = 100)
res <- pipe_infodengue(cities = dd, cid10 = "A90", 
finalday= "2018-08-12",nowcasting="none")
restab <- tabela_historico(res)

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