The ‘Epidemiological Report’ Package

European Centre for Disease Prevention and Control (ECDC)

Description

The EpiReport package allows the user to draft an epidemiological report similar to the ECDC Annual Epidemiological Report (AER) (see https://www.ecdc.europa.eu/en/all-topics-z/surveillance-and-disease-data/annual-epidemiological-reports-aers) in Microsoft Word format for a given disease.

Through standalone functions, the package is specifically designed to generate each disease-specific output presented in these reports, using ECDC Atlas export data.

Package details below:

Package Description
Version 1.0.2
Published 2021-07-02
Authors Lore Merdrignac ,
Author of the package and original code

Tommi Karki ,


Esther Kissling ,


Joana Gomes Dias ,
Project manager
Maintainer Lore Merdrignac
License EUPL
Link to the ECDC AER reports https://www.ecdc.europa.eu/en/all-topics-z/surveillance-and-disease-data/annual-epidemiological-reports-aers

Background

ECDC’s annual epidemiological report is available as a series of individual epidemiological disease reports. Reports are published on the ECDC website https://www.ecdc.europa.eu/en/all-topics-z/surveillance-and-disease-data/annual-epidemiological-reports-aers as they become available.

The year given in the title of the report (i.e. ‘Annual epidemiological report for 2016’) refers to the year the data were collected. Reports are usually available for publication one year after data collection is complete.

All reports are based on data collected through The European Surveillance System (TESSy)1 and exported from the ECDC Atlas. Countries participating in disease surveillance submit their data electronically.

The communicable diseases and related health issues covered by the reports are under European Union and European Economic Area disease surveillance2 3 4 5.

ECDC’s annual surveillance reports provide a wealth of epidemiological data to support decision-making at the national level. They are mainly intended for public health professionals and policymakers involved in disease prevention and control programmes.

1. Datasets to be used in the Epidemiological Report package

1.1. Disease dataset specification

Two types of datasets can be used:

Description of each variable required in the disease dataset (naming and format):

Tab.1 Example of Salmonellosis data 2012-2016
HealthTopicCode MeasurePopulation MeasureCode TimeUnit TimeCode GeoCode XLabel YLabel ZValue YValue N
SALM Confirmed cases CONFIRMED.AGE.COUNT M 2012-01 SE 0-4 NA NA 31.0000000 294
SALM Confirmed cases CONFIRMED.AGE.RATE M 2014-09 EU_EEA31 15-24 NA NA NA 9961
SALM Confirmed cases CONFIRMED.COUNT M 2013-05 EL NA NA NA 24.0000000 24
SALM Confirmed cases CONFIRMED.GENDER.COUNT Y 2012 ES Female NA NA 2029.0000000 4224
SALM Confirmed cases CONFIRMED.AGE.COUNT M 2013-04 ES 0-4 NA NA 176.0000000 450
SALM Confirmed cases CONFIRMED.AGE.RATE M 2013-04 FI 25-44 NA NA 3.4242343 147
SALM Confirmed cases CONFIRMED.AGE.RATE M 2013-12 IT 25-44 NA NA 0.1295678 355
SALM Confirmed cases CONFIRMED.AGE.RATE M 2016-12 LV 5-14 NA NA 3.5598771 16
SALM Confirmed cases CONFIRMED.MALETOFEMALE.RATIO Y 2015 RO NA NA NA 0.9587629 1330
SALM Confirmed cases CONFIRMED.AGE_GENDER.RATE Y 2014 ES 5-14 Male NA 1.0000000 6633

1.2. Report parameters dataset specification

The internal dataset EpiReport::AERparams describes the parameters to be used for each output of each disease report.

If the user wishes to set different parameters for one of the 53 covered health topics, or if the user wishes to analyse an additional disease not covered by the default parameter table, it is possible to use an external dataset as long as it is specified as described below and in the help page ?EpiReport::AERparams. All functions of the EpiReport package can then be fed with this specific parameter table.

List of the main parameters included:

Tab.2 Example of the main columns of the parameter dataset
HealthTopic MeasurePopulation TableUse AgeGenderUse TSTrendGraphUse TSSeasonalityGraphUse MapNumbersUse MapRatesUse MapASRUse
DENGUE ALL ASR AG-RATE Y Y Y N N
ANTH CONFIRMED COUNT NO N N N N N
YELF CONFIRMED NO NO N N N N N
HAEINF CONFIRMED ASR AG-RATE Y Y Y Y N
DIPH ALL COUNT AG-RATE Y Y Y N N

1.3. Member States correspondence table dataset

The internal dataset EpiReport::MSCode provides the correspondence table of the geographical code GeoCode used in the disease dataset, and the geographical label Country to use throughout the report. Additional information on the EU/EEA affiliation is also available in column EUEEA.

Tab.3 Example of geographical codes and associated labels
Country GeoCode EUEEA TheCountry
United Kingdom UK EU the United Kingdom
Romania RO EU Romania
Cyprus CY EU Cyprus
Italy IT EU Italy
Estonia EE EU Estonia

2. How to generate the Epidemiological Report in Microsoft Word format

To generate a similar report to the Annual Epidemiological Report, we can use the default dataset included in the EpiReport package presenting Salmonellosis data 2012-2016.

Calling the function getAER(), the Salmonellosis 2016 report will be generated and stored in your working directory (see getwd()) by default.

getAER()

Please specify the full path to the output folder if necessary:

output <- "C:/EpiReport/doc/"
getAER(outputPath = output)

2.1. External disease dataset

To generate the report using an external dataset, please use the syntax below.

In the following example, Pertussis 2016 TESSy data (in csv format, in the /data folder) is used to produce the corresponding report.

Pertussis PNG maps have previously been created and stored in a specific folder /maps.

# --- Importing the dataset
PERT2016 <- read.table("data/PERT2016.csv", 
                       sep = ",", 
                       header = TRUE, 
                       stringsAsFactors = FALSE)

# --- Specifying the folder containing pertussis maps
pathMap <- paste(getwd(), "/maps", sep = "")


# --- (optional) Setting the local language in English for month label
Sys.setlocale("LC_TIME", "C")
#> [1] "C"

# --- Producing the report
EpiReport::getAER(disease = "PERT", 
       year = 2016, 
       x = PERT2016, 
       pathPNG = pathMap)

Please note that the font Tahoma is used in the plot axis and legend. It is advised to import this font using the extrafont package and the command font_import and loadfonts.

However, if the users prefer the use of the default Arial in plots, it is optional. In that case, warnings will appear in the console for each plot.

2.2. Word template

By default, an empty ECDC template (Microsoft Word) is used to produce the report. In order to modify this template, please first download the default template using the function getTemplate().

You can store this Microsoft Word template in a specific folder /template.

getTemplate(output_path = "C:/EpiReport/template")

Then, apply the modifications required, save it and use it as a new Microsoft Word template when producing the epidemiological report as described below.

getAER(template = "C:/EpiReport/template/New_AER_Template.docx",
       outputPath = "C:/EpiReport/doc/")

Please make sure that the Microsoft Word bookmarks are preserved throughout the modifications to the template. The bookmarks specify the location where to include each output.

2.3. Word bookmarks

Each epidemiological output will be included in the Word template in the corresponding report chapter. The EpiReport package relies on Microsoft Word bookmarks to specify the exact location where to include each output.

The list of bookmarks recognised by the EpiReport package are:

3. How to generate each epidemiological outputs independently

The EpiReport package allows the user to generate each epidemiological output independently of the Microsoft Word report.

The ECDC annual epidemiological Report includes five types of outputs:

3.1. Table: distribution of cases by Member State

The function getTableByMS() generates a flextable object (see package flextable) presenting the number of cases by Member State over the last five years.

By default, the function will use the internal Salmonellosis 2012-2016 data and present the number of confirmed cases and the corresponding rate for each year, with a focus on 2016 and age-standardised rates.

EpiReport::getTableByMS()
Table. Distribution of confirmed salmonellosis cases, EU/EEA, 2012-2016

This table can be drafted using external data, and specifying the disease code and the year to use as reference in the report.

In the example below, we use Zika virus data. According to the report parameters, the table for this disease should present the number of reported cases over the last five years and by Member State.

ZIKV2016 <- read.table("data/ZIKV2016.csv", 
                       sep = ",", 
                       header = TRUE, 
                       stringsAsFactors = FALSE)
EpiReport::getTableByMS(x = ZIKV2016, 
             disease = "ZIKV", 
             year = 2016)
Table. Distribution of Zika virus infection cases, EU/EEA, 2012-2016

3.2. Seasonality plot: distribution of cases by month

The function getSeason() generates a ggplot (see package ggplot2) presenting the distribution of cases at EU/EEA level, by month, over the past five years.

The plot includes:

By default, the function will use the internal Salmonellosis 2012-2016 data.

# --- Salmonellosis 2016 plot
EpiReport::getSeason()

Figure. Distribution of confirmed salmonellosis cases by month, EU/EEA, 2016 and 2012-2015

The plot can also be drafted using external data, and specifying the disease dataset, the disease code and the year to use as reference in the report.

In the example below, we use Pertussis 2012-2016 data.

# --- Pertussis 2016 plot
EpiReport::getSeason(x = PERT2016,
                     disease = "PERT",
                     year = 2016)

Figure. Distribution of pertussis cases by month, EU/EEA, 2016 and 2012-2015

3.3. Trend plot: trend and number of cases by month

The function getTrend() generates a ggplot (see package ggplot2) presenting the trend and the number of cases at EU/EEA level, by month, over the past five years.

The plot includes:

By default, the function will use the internal Salmonellosis 2012-2016 data.

# --- Salmonellosis 2016 plot
EpiReport::getTrend()

Figure. Trend and number of confirmed salmonellosis cases, EU/EEA by month, 2012-2016

The plot can also be drafted using external data, and specifying the disease dataset, the disease code and the year to use as reference in the report.

In the example below, we use again Pertussis 2012-2016 data.

# --- Pertussis 2016 plot
EpiReport::getTrend(x = PERT2016,
                    disease = "PERT",
                    year = 2016)

Figure. Trend and number of pertussis cases, EU/EEA by month, 2012-2016

3.4. Maps: distribution of cases by Member State

The function getMap() provides with a preview of the PNG map associated with the disease.

By default, the function will use the internal Salmonellosis 2016 PNG maps. According to the report parameters, the corresponding map should present the notification rate of confirmed salmonellosis cases.

# --- Salmonellosis 2016 map
EpiReport::getMap()

Figure. Distribution of confirmed salmonellosis cases per 100 000 population by country, EU/EEA, 2016

The map can also be included using external PNG files, and specifying the disease code and the year to use as reference in the report. The corresponding syntax is described below (pertussis map not available).

# --- Pertussis 2016 map
EpiReport::getMap(disease = "PERT", 
                  year = 2016, 
                  pathPNG = "C:/EpiReport/maps/")

3.5. Age and gender bar graph

The function getAgeGender() generates a ggplot (see package ggplot2) presenting in a bar graph the distribution of cases at EU/EEA level by age and gender.

The bar graph uses either:

By default, the function will use the internal Salmonellosis 2012-2016 data with the rate of confirmed cases per 100 000 population.

# --- Salmonellosis 2016 bar graph
EpiReport::getAgeGender()

Figure. Distribution of confirmed salmonellosis cases per 100 000 population, by age and gender, EU/EEA, 2016

The bar graph can also be drafted using external data, and specifying the disease dataset, the disease code and the year to use as reference in the report.

In the example below, we use Zika 2012-2016 data.

# --- Zika 2016 bar graph
EpiReport::getAgeGender(x = ZIKV2016, 
                        disease = "ZIKV", 
                        year = 2016)

Figure. Distribution of Zika virus infection proportion (%), by age and gender, EU/EEA, 2016


  1. The European Surveillance System (TESSy) is a system for the collection, analysis and dissemination of data on communicable diseases. EU Member States and EEA countries contribute to the system by uploading their infectious disease surveillance data at regular intervals.↩︎

  2. 2000/96/EC: Commission Decision of 22 December 1999 on the communicable diseases to be progressively covered by the Community network under Decision No 2119/98/EC of the European Parliament and of the Council. Official Journal, OJ L 28, 03.02.2000, p. 50-53.↩︎

  3. 2003/534/EC: Commission Decision of 17 July 2003 amending Decision No 2119/98/EC of the European Parliament and of the Council and Decision 2000/96/EC as regards communicable diseases listed in those decisions and amending Decision 2002/253/EC as regards the case definitions for communicable diseases. Official Journal, OJ L 184, 23.07.2003, p. 35-39.↩︎

  4. 2007/875/EC: Commission Decision of 18 December 2007 amending Decision No 2119/98/EC of the European Parliament and of the Council and Decision 2000/96/EC as regards communicable diseases listed in those decisions. Official Journal, OJ L 344, 28.12.2007, p. 48-49.↩︎

  5. Commission Decision 2119/98/EC of the Parliament and of the Council of 24 September 1998 setting up a network for the epidemiological surveillance and control of communicable diseases in the Community. Official Journal, OJ L 268, 03/10/1998 p. 1-7.↩︎