Summary and Setup

Epiverse-TRACE tutorials


The Epiverse-TRACE tutorials are training materials for Outbreak Analysis tasks aimed at learners who are willing to achieve basic competence in modelling and analytics.

The tutorials are built around the workflow of outbreak analysis split into three stages : early tasks, middle tasks and late tasks.

An overview of the tutorial topics
An overview of the tutorial topics

Task topics consist of one or more episodes. You can navigate to different episodes using the menu on the left hand side. Alternatively, you may find the topic you are interested in the key points of each episode.

Each episode contains:

  • Overview : describes what questions will be answered and what are the objectives of the episode.
  • Prerequisites: describes what episodes/packages need to be covered before the current episode.
  • Example R code : work through the episodes on your own computer using the example R code.
  • Challenges : complete challenges to test your understanding.
  • Explainers : add to your understanding of mathematical and modelling concepts with the explainer boxes.

Also check out the glossary for any terms you may be unfamiliar with.

Software Setup


Install R and RStudio

R and RStudio are two separate pieces of software:

  • R is a programming language and software used to run code written in R.
  • RStudio is an integrated development environment (IDE) that makes using R easier. In this tutorial, we use RStudio to interact with R.

If you don’t already have R and RStudio installed, follow the instructions for your operating system at https://posit.co/download/rstudio-desktop/.

Update R and RStudio

This tutorial requires R version 4.0.0 or later.

If you already have R and RStudio installed, first check if your R version is up to date:

  • When you open RStudio your R version will be printed in the console on the console window. Alternatively, you can type sessionInfo() into the console.

  • If your version of R is older than the one required, download and install the latest version of R from the R project website for your operating system.

  • After installing a new version of R, you will have to reinstall all your packages with the new version. For Windows, there is a package called installr that can help you with upgrading your R version and migrating your package library.

  • To update RStudio to the latest version, open RStudio and click on Help > Check for Updates. If a new version is available follow the instructions on the screen. By default, RStudio will also automatically notify you of new versions every once in a while.

Callout

While this may sound scary, it is far more common to run into issues due to using out-of-date versions of R or R packages. Keeping up with the latest versions of R, RStudio, and any packages you regularly use is a good practice.

Install required R packages

During the tutorial, we will need a number of R packages. Packages contain useful R code written by other people. We will use packages from the Epiverse-TRACE.

To try to install these packages, open RStudio and copy and paste the following code chunk into the console window, then press the Enter (Windows and Linux) or Return (MacOS) to execute the command.

R

if(!require("pak")) install.packages("pak")

new_packages <- c(
  "EpiNow2",
  "epiverse-trace/epiparameter",
  "socialmixr",
  "epiverse-trace/epidemics",
  "tidyverse"
)

pak::pak(new_packages)

You should update all of the packages required for the tutorial, even if you installed them relatively recently. New versions bring improvements and important bug fixes.

When the installation has finished, you can try to load the packages by pasting the following code into the console:

R

library(EpiNow2)
library(epiparameter)
library(socialmixr)
library(epidemics)
library(tidyverse)

If you do NOT see an error like there is no package called ‘...’ you are good to go! If you do, contact us!

Data sets


Download the data

We will download the data directly from R during the tutorial. However, if you are expecting problems with the network, it may be better to download the data beforehand and store it on your machine.

The data files for the tutorial can be downloaded manually here:

Your Questions


If you need any assistance installing the software or have any other questions about this tutorial, please send an email to