18 September 2023
This repository is for the development and maintenance of R teaching material for use in the EPIET (European Programme of Intervention Epidemiology Training) and the UK FETP (United Kingdom Field Epidemiology Training Programme) Outbreak Investigation (OI) module.
The module includes two computer-based outbreak investigation case studies and two more specialised practical exercises in GIS mapping and social network analysis, respectively. All case studies and practical exercises are intended to be carried out using the statistical software and programming language R. Where relevant, case study guides have been translated to R and adapted from earlier STATA versions.
This repository contains the resources for each exercise in the following folders:
Campy
: Campylobacter waterborne outbreak case studyCopenhagen
: Copenhagen school dinner case studyMapping
: GIS mapping exercise based on UK raw milk outbreakNetwork Analysis Practical
: Social network analysis practical
For each exercise, a HTML R case study guide has been provided, as well as a .zip folder containing all the required materials (data, scripts and a copy of the guide). The R guides and compressed folders of the associated materials can be accessed online and downloaded from the links on this web page.
This material is based on equivalent practical guides for STATA and ArcGIS, respectively. Each guide is presented as an R markdown document; please see the title pages for copyright details and a list of authors and contributors.
Each exercise requires the use of one or more teaching datasets, which are included in this repository.
To run the R markdown guides or R templates, participants and facilitators will need to install the following software:
- R (download and install the latest version from CRAN here)
- RStudio (download the latest version as an installer or ready-to-use
.zip
file here) - Rtools (download and install the latest version from CRAN here)
A list of required R packages and functions, as well as code to install them has been included in the guides and associated materials for each exercise.
After installing the above software, if you wish to just run / test the
code without making any changes, you can clone this repository either by
clicking on the green Clone or download
button on this page, or by
entering the following command into git bash on your computer:
git clone https://github.com/EPIET/OutbreakInvestigation.git
Note: code maintainers should be proficient in the use of Github. If you have not worked with Github before, please team up with someone that knows how to use Github for version control and is familiar with this repository. You can share the edits you wish to make with them via the issues tab, or alternatively ask them to help you with the steps below.
If you wish to update the code for any of these exercises, follow these steps:
- Document the details of bugs or other requests for updates on the issues tab of this repository.
- On the
code
tab of this repository, click on theMaster
button and create a new branch by typing a name for your branch in the dialogue box, e.g.my_updates
. - Follow the on-screen instructions to complete creation of the branch.
- Switch to the new branch.
- Clone this branch to your computer.
- To edit the guide or code for a specific exercise, open the
.Rproj
file inside the folder for that exercise and open the script or R markdown from within the R project. Note the file paths to access data etc are relative to these sub-folders. - To edit this README, open the
.Rproj
file in the root of the repository. - After editing an R markdown, remember to knit it to HTML.
- Move the knit outputs (HTML guide and R script) to the
guide
andrscripts
subfolders, respectively, within the relevant exercise folder. - In the
docs
folder in the root directory, you will find the old versions of the HTML guides and .zip folders of materials for each exercise. These need to be replaced every time you edit the material. - First, copy and paste the updated HTML guide into the
docs
folder. - Next, check the contents of the .zip folder for the exercise you
updated, go back into the relevant subfolder and create the .zip
folder again. When done, move the .zip folder to the
docs
folder. - It is important that the
docs
folder contains all the up to date guides and materials, as the web page that module participants will be working from and downloading the materials from depends on the contents of this folder. - Once done, push your changes back to your branch using git via RStudio or git bash as you prefer.
- Return to this (online) repository, make sure to switch to your branch if not already on it, and follow the on-screen instructions to make a pull request.
- Once the repository maintainer has accepted and merged your pull request to the main branch, you should check the Outbreak Investigation module web page to make sure that the guides displayed are the latest ones with your edits.
To provide a printed copy of the R markdown practical guide for participants:
- Open the relevant R markdown document in RStudio (as above)
- Click on the
Knit
button and selectKnit to pdf
- This will save a .pdf version of the document in your working directory, which can then be printed.
This project is currently being maintained by Amy Mikhail.
Contributions are welcome: please contact the maintainer to request access.
To report bugs or make feature requests, please post an issue here.