Skip to content

Instantly share code, notes, and snippets.

@klpn
klpn / pdfa2a.diff
Created June 22, 2019 06:47
Change to Pandoc 2.7.2 ConTeXt template to produce PDF/A-2a.
*** default.context 2019-06-22 08:40:19.015364224 +0200
--- default-pdfa2a.context 2019-06-22 08:43:07.763916183 +0200
***************
*** 27,33 ****
% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
\setupinteractionscreen[option=bookmark]
- \setuptagging[state=start]
$if(papersize)$
@klpn
klpn / tagged-pres.diff
Created February 13, 2020 10:54
Change to Pandoc 2.8 beamer template to create PDF/A-2a
*** default.beamer 2020-02-13 11:50:17.541486784 +0100
--- tagged-pres.beamer 2020-02-13 11:32:29.142235033 +0100
***************
*** 10,15 ****
--- 10,20 ----
$endif$
$endif$
%
+ \begin{filecontents*}{\jobname.xmpdata}
+ \Title{$title$}
@klpn
klpn / restim.R
Last active February 28, 2021 18:39
Plot regional or national Rt for COVID-19 based on FHM data to reproduce FHM reports
# Plot regional or national Rt for COVID-19 based on FHM data, to reproduce the
# results published on https://www.folkhalsomyndigheten.se/smittskydd-beredskap/utbrott/aktuella-utbrott/covid-19/statistik-och-analyser/analys-och-prognoser/
# Adapted from:
# Churches (2020, Feb. 18). Tim Churches Health Data Science Blog: Analysing COVID-19 (2019-nCoV) outbreak data with R - part 1. Retrieved from https://timchurches.github.io/blog/posts/2020-02-18-analysing-covid-19-2019-ncov-outbreak-data-with-r-part-1/, CC BY-SA
library(readxl)
library(EpiEstim)
# path to latest FHM Excel file
secov <- read_excel("data/FHM/FHM_latest.xlsx")
secov$Statistikdatum <- as.Date(secov$Statistikdatum)