knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

We create some fake data:

library(sykdomspuls)
library(data.table)
library(ggplot2)

# Load raw data
d <- GenFakeDataRaw()
print(d)

We format the data into panel data:

# Format the data into panel data
d <- CleanData(d,
    syndrome = "influensa",
    testIfHelligdagIndikatorFileIsOutdated = FALSE,
    removeMunicipsWithoutConsults = TRUE
  )
print(d)

We take out the total age, and change some names:

d <- d[age=="Totalt" & granularity_geo=="municip"]
print(d)

We run our analysis:

res <- sykdomspuls::QuasipoissonTrainPredictData(
  datasetTrain = d,
  datasetPredict = d,
  isDaily = F
)

print(res)


raubreywhite/dashboards_sykdomspuls documentation built on April 27, 2020, 6:11 p.m.