Description Usage Arguments Value Examples
View source: R/get_timeseries.R
Create weekly time series from case data from server. The source is the SINAN.
1 2 3 4 5 6 7 8 |
cities |
cities' geocode. |
lastday |
last day. Default is the last available. Format: "yyyy-mm-dd" |
cid10 |
cid 10 code. Dengue = "A90" (default), Chik = "A92.0", Zika = "A92.8", |
dataini |
"notific" if data aggregated by notification date or "sinpri" if data aggregated if aggregated by date of first symptoms |
completetail |
if sinan data is older than final_day, fill in the tail with NA (default) or 0. |
datasource |
PostgreSQLConnection to project database. |
data.frame with the data aggregated per week according to disease onset date.
1 2 3 4 5 6 7 | NOT USE: con <- dbConnect(RSQLite::SQLite(), "../../AlertaDengueAnalise/mydengue.sqlite")
d <- getCases(cities = 4314902, dataini = "sinpri") # dengue
d <- getCases(cities = 3300936, completetail = 0) # dengue
d <- getCases(cities = 3304557, cid10="A92.0") # chikungunya, until last day available
cid <- getCidades(regional = "Norte",uf = "Rio de Janeiro")
d <- getCases(cities = cid$municipio_geocodigo, datasource = con, dataini = "sinpri")
tail(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.