getCaseslist: Get Case Data

View source: R/get_timeseries.R

getCaseslistR Documentation

Get Case Data

Description

Get case data from server.

Usage

getCaseslist(
  cities,
  lastday = Sys.Date(),
  firstday = as.Date("2022-01-01"),
  cid10 = "A90",
  datasource = con
)

Arguments

cities

cities' geocode.

lastday

last day. Default is the last available. Format: "yyyy-mm-dd"

firstday

is the first date of the time series to be produced. Format: "yyyy-mm-dd"

cid10

cid 10 code. Dengue = "A90" (default), Chik = "A92.0", Zika = "A92.8",

datasource

PostgreSQLConnection to project database.

dataini

"notific" if data aggregated by notification date or "sinpri" if data aggregated if aggregated by date of first symptoms

type

case definition. Default = "notified". Other options: "probable", "lab_confirmed", "all". All means returning the three counts.

Value

data.frame with the data aggregated per week according to disease onset date. Notice that the names of the columns and the number of columns will change according to type. To recover the original function behavior, use the default type.

Examples

NOT USE: con <- dbConnect(RSQLite::SQLite(), "../../AlertaDengueAnalise/mydengue.sqlite")
d <- getCaseslist(cities = c(4209102, 3304557),firstday = as.Date("2024-01-01")) # dengue
d <- getCaseslist(cities = 3304557, cid10="A92.0") # chikungunya, until last day available
cid <- getCidades(regional = "Norte",uf = "Rio de Janeiro")
d <- getCaseslist(cities = 3304557, firstday = as.Date("2023-01-01"),dataini) 
tail(d)

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