fhi::DashboardInitialiseOpinionated("sykdomspuls", PACKAGE_DIR=params$package_dir, FORCE_DEV_PACKAGE_LOAD = params$dev, SILENT=TRUE) suppressMessages(library(data.table)) suppressMessages(library(ggplot2)) suppressMessages(library(kableExtra)) conn <- DBI::dbConnect(odbc::odbc(), driver = fd::config$db_config$driver, server = fd::config$db_config$server, port = fd::config$db_config$port, user = fd::config$db_config$user, password = fd::config$db_config$password ) fd::use_db(conn, fd::config$db_config$db) db <- dplyr::tbl(conn, "spuls_standard_results") d <- db %>% dplyr::filter(location_code =="Norge" & tag=="skabb" & granularity_time=="weekly") %>% dplyr::select(location_code, age, date, n) %>% dplyr::collect() setDT(d) d <- d[,age:=factor(age,levels=names(CONFIG$AGES))]
\newpage
r tufte::margin_note(glue::glue('
Skabb at the national level.
'))
q <- ggplot(d, aes(x=date,y=n)) q <- q + geom_line() q <- q + facet_wrap(~age,ncol=1) q
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.