knitr::opts_chunk$set(echo = TRUE)
Loading necessary packages:
library(devtools) library(roxygen2)
Loading the nowcaster R package:
library(nowcaster)
Loading the data from Belo Horizonte city:
data<-sragBH
And we take a look on the data:
head(data)
It is a data.frame with 7 variables and 65,404 observations. We will make use of only the first two columns, "DT_SIN_PRI" and "DT_DIGITA" as well the column "Idade" to make age structured nowcasting.
nowcasting_bh<-nowcasting_inla(dataset = data, bins_age = "10 years", data.by.week = T, return.age = T, age_col = Idade)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.