Skip to content

This repository is for developing and maintaining R companion guides for the EPIET computer tools in outbreak investigation (CTOI) module.

License

Notifications You must be signed in to change notification settings

EPIET/OutbreakInvestigation

Repository files navigation

Outbreak Investigation in R

18 September 2023

Background:

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 study
  • Copenhagen: Copenhagen school dinner case study
  • Mapping: GIS mapping exercise based on UK raw milk outbreak
  • Network 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.

Acknowledgements:

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.

Requirements:

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.

How to download the code for testing:

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

How to download the code for updating:

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:

  1. Document the details of bugs or other requests for updates on the issues tab of this repository.
  2. On the code tab of this repository, click on the Master button and create a new branch by typing a name for your branch in the dialogue box, e.g. my_updates.
  3. Follow the on-screen instructions to complete creation of the branch.
  4. Switch to the new branch.
  5. Clone this branch to your computer.
  6. 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.
  7. To edit this README, open the .Rproj file in the root of the repository.
  8. After editing an R markdown, remember to knit it to HTML.
  9. Move the knit outputs (HTML guide and R script) to the guide and rscripts subfolders, respectively, within the relevant exercise folder.
  10. 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.
  11. First, copy and paste the updated HTML guide into the docs folder.
  12. 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.
  13. 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.
  14. Once done, push your changes back to your branch using git via RStudio or git bash as you prefer.
  15. 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.
  16. 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 select Knit to pdf
  • This will save a .pdf version of the document in your working directory, which can then be printed.

Maintenance:

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.

About

This repository is for developing and maintaining R companion guides for the EPIET computer tools in outbreak investigation (CTOI) module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages