write_alerta: Write historico_alerta into the database.

Description Usage Arguments Value Examples

View source: R/alert_functions.R

Description

Function to write the pipeline results into the database. Receives the object created by the function historico.alerta.

Usage

1
write_alerta(d, datasource = con)

Arguments

d

object created by tabela_historico()

datasource

posgreSQL conn to project's database

Value

the same data.frame from the input

Examples

1
2
3
4
5
6
7
8
9
# Parameters for the model 
cidades <- getCidades(regional = "Norte",uf = "Rio de Janeiro",datasource = con)
res <- pipe_infodengue(cities = cidades$municipio_geocodigo, cid10 = "A90", 
finalday= "2021-07-12",nowcasting="none")
restab <- tabela_historico(res)
# NOT RUN 
t1 <- Sys.time()
write_alerta(restab[1,])
t2 <- Sys.time() - t1

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