pipe_infodengue: pipeline used by infodengue

View source: R/alert_functions.R

pipe_infodengueR Documentation

pipeline used by infodengue

Description

wrap of functions used by Infodengue.

Usage

pipe_infodengue(
  cities,
  cid10 = "A90",
  datarelatorio,
  finalday = Sys.Date(),
  iniSE = 201001,
  nowcasting = "none",
  narule = NULL,
  writedb = FALSE,
  datasource = con,
  completetail = NA,
  dataini = "notific"
)

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.

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"

"bayesian"

for the dynamic model, "none" for not doing nowcast (default)

Value

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

Examples

cidades <- getCidades(uf = "Rio de Janeiro",datasource = con)
t1 <- Sys.time()
res <- pipe_infodengue(cities = 3304557, cid10 = "A90",
nowcasting="bayesian", dataini= "sinpri", completetail = 0, datarelatorio = 202419)
tail(tabela_historico(res))
t2 <- Sys.time()
message(paste("total time was", t2-t1))
tail(tabela_historico(res))
res <- pipe_infodengue(cities = 4209102 , cid10 = "A90",
nowcasting="none", dataini= "sinpri", completetail = 0,
datarelatorio = 202408)

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