Code Monkey home page Code Monkey logo

projmgmt's Introduction

Sitrep

Lifecycle: maturing CRAN status Codecov test coverage R build status

The goal of {sitrep} is provide report templates for common epidemiological surveys and outbreak reports. The package further contains helper function that standardize certain analyses.

While templates are primarily for MSF analyses - they have been setup to be as generic as possible for use by the general applied epidemiology community.

Detailed information about the project and the templates can be found at https://r4epis.netlify.com.
A reference website for the functions in {sitrep} can be found at https://r4epi.github.io/sitrep.

{sitrep} includes a number of other R packages which facilitate specific analysis:
{epitabulate}: Tables for epidemiological analysis
{epidict}: Epidemiology data dictionaries and random data generators
{epikit}: Miscellaneous helper tools for epidemiologists
{apyramid}: Age pyramid construction and plotting

Installation

The {sitrep} package, is currently stored in a GitHub repository. Therefore, the procedure to install these packages have one extra step required.

To install sitrep from GitHub you must first install the remotes package.

# install.packages("remotes")
remotes::install_github("r4epi/sitrep")

If you are getting errors, check the frequently asked questions.

Available templates

Sitrep has four outbreak templates and four survey templates available. These templates will generate the following:

  1. A word document with the situation report
  2. A plain text markdown document (for conversion to other formats such as HTML or PDF)
  3. A directory with all of the figures produced

You can access the list of templates in R Studio by clicking (see example below): file > New file > R Markdown… > From Template

Example of how to open and save the cholera template

You can generate an example template by using the check_sitrep_templates() function:

library("sitrep")
output_dir <- file.path(tempdir(), "sitrep_example")
dir.create(output_dir)

# view the available templates, categorized by type
available_sitrep_templates(categorise = TRUE)
#> $outbreak
#> [1] "ajs_outbreak"        "cholera_outbreak"    "measles_outbreak"   
#> [4] "meningitis_outbreak"
#> 
#> $survey
#> [1] "mortality"         "nutrition"         "vaccination_long" 
#> [4] "vaccination_short"

# generate the measles outbreak template in the output directory
check_sitrep_templates("measles_outbreak", path = output_dir)
#> [1] "C:\\Users\\alexf\\AppData\\Local\\Temp\\Rtmpcv1H8d/sitrep_example"

# view the contents
list.files(output_dir, recursive = TRUE)
#> [1] "measles_outbreak.Rmd"

Please note that the ‘sitrep’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

projmgmt's People

Contributors

dirkschumacher avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

projmgmt's Issues

Outbreak Work Package

Expected output:

  • Descriptive epi package
  • Design function interfaces (time, place, person) (see epiet case studies)
  • 1 rmarkdown document (word document as target)
  • (Bonus) case studies and walkthroughs

Descriptive Epi. package features:

In general epidemiological analyses are structured around Time, Place and Person. Within these categories certain routine analyses are performed and the aim of the package is to make these analyses as easy as possible.

Time

  • Draw various kinds of epicurves
    • Stacked barcharts (by e.g. case definition)
    • Normal barcharts
    • Incidence vs counts
    • Low vs high case load. "For small datasets cases are shown as rectangles" reconhub/incidence#68
  • Investigate what additional features are needed or if we can just use incidence

Place

  • Various support for maps
  • Choropleth maps, point maps
  • Incidence vs counts
  • Support getting base data from Open Streetmap
  • Get "official" shapefiles
  • Relevant packages: sf, tmap, osmdata, osmplotr

Person

  • Make it easy to get and combine population data
  • Attack-rate
  • Incidence vs counts
  • 2x2 tables
  • Multivariate analysis using logistic regression (e.g. glm)
  • CFR plots and estimation (consider risk adjustment)
  • Epi. trees vis.
  • R0 estimation and various other basic epi. indicators
  • Age pyramid. Or at least some visualization by age group
  • Make it easy to report on OR and RR including CIs in reports

Data Input Work Package

Currently identified as a separate work package as it will be useful to both the outbreak analysis as well as the surveys. Also useful in other settings

Expected output:

  • The linelist package is ready
  • Bonus: Merging of missing datasets is somehow supported (be it code or walkthroughs)

Linelist package

  • Could be the basis for all analyses
  • Can handle meta data (in particular a variable mapping to concepts (i.e. data dictionary))
  • Can handle messy data
  • Maybe support HXL as language to map columns to concepts (Advantage: connection to OCHA et al. and potentially not a new wheel)

Logo discussion

We need a logo. Bonus: tshirts. We have some drafts in logo by @thibautjombart.

Would be nice to have a

  • Logo to be used for Github, Project website and other material
  • Some cool tshirt design using that logo

Survey Work Package

Expected output: one rmarkdown per survey (word document as target)

Templates:

  • Mortality survey
  • Nutritional status survey
  • Vaccination coverage survey

General

  • Data quality is usual higher than in an outbreak setting
  • Time frame for analyses is longer (~3 months)

Surveys

Mortality survey

Potential artefacts to support in a survey

  • TODO Sampling strategy
  • Population pyramid
  • Table of Proportions with CIs (Wilson?)
  • CFR over time
  • CFR per 100,000 persons
  • Line graph
  • Maps (just for context or with data points)

Nutritional status survey

  • TODO Sampling strategy
  • Computation of WHO indicators (z-score based)
  • Plots to compare expected z-score vs observed

Vaccination coverage survey

  • TODO Sampling strategy
  • Simple summary tables
  • Maps of households

Improve epi. curves for low case setting

Epi. curves from incidence could be improved for a low case setting:

The other nice thing that dan has done is adapt the recon incidence package, to make an epicurve function (I know, he should have pulled and then recontributed...) to plot single cases quite nicely, the current solution in recon doesnt come out quite as neatly (i feel...). @aspina7

cc @zkamvar

Related R packages for descriptive data analyses

Scope: pratical packages on CRAN that can be used in an outbreak setting. No pure research methods.

  • epiR Tools for the analysis of epidemiological data. Contains functions for directly and indirectly adjusting measures of disease frequency, quantifying measures of association on the basis of single or multiple strata of count data presented in a contingency table, and computing confidence intervals around incidence risk and incidence rate estimates. Miscellaneous functions for use in meta-analysis, diagnostic test interpretation, and sample size calculations.
  • EpiStatsProvides set of functions aimed at epidemiologists. They include commands for measures of association and impact for case control studies and cohort studies. They may be particularly useful for outbreak investigations and include univariate and stratified analyses. The functions for cohort studies include the CS(), CSTable() and CSInter() commands. The functions for case control studies include the CC(), CCTable() and CCInter() commands.
  • RSurveillance A range of functions for the design and analysis of disease surveillance activities. These functions were originally developed for animal health surveillance activities but can be equally applied to aquatic animal, wildlife, plant and human health surveillance activities. Utilities are included for sample size calculation and analysis of representative surveys for disease freedom, risk-based studies for disease freedom and for prevalence estimation.
  • pubh A toolbox for making R functions and capabilities more accessible to students and professionals from Epidemiology and Public Health related disciplines. Includes a function to report coefficients and confidence intervals from models using robust standard errors (when available), functions that expand lattice plots and functions relevant for introductory papers in Epidemiology or Public Health. Please note that use of the provided data sets is for educational purposes only.
  • Epi Functions for demographic and epidemiological analysis in the Lexis diagram, i.e. register and cohort follow-up data, in particular representation, manipulation and simulation of multistate data - the Lexis suite of functions, which includes interfaces to 'mstate', 'etm' and 'cmprsk' packages. Also contains functions for Age-Period-Cohort and Lee-Carter modeling and a function for interval censored data and some useful functions for tabulation and plotting, as well as a number of epidemiological data sets.
  • scanstatistics Detection of anomalous space-time clusters using the scan statistics methodology. Focuses on prospective surveillance of data streams, scanning for clusters with ongoing anomalies. Hypothesis testing is made possible by Monte Carlo simulation.
  • surveillanceStatistical methods for the modeling and monitoring of time series of counts, proportions and categorical data, as well as for the modeling of continuous-time point processes of epidemic phenomena. The monitoring methods focus on aberration detection in count data time series from public health surveillance of communicable diseases, but applications could just as well originate from environmetrics, reliability engineering, econometrics, or social sciences. The package implements many typical outbreak detection procedures such as the (improved) Farrington algorithm, or the negative binomial GLR-CUSUM method of Höhle and Paul (2008) doi:10.1016/j.csda.2008.02.015. A novel CUSUM approach combining logistic and multinomial logistic modeling is also included. The package contains several real-world data sets, the ability to simulate outbreak data, and to visualize the results of the monitoring in a temporal, spatial or spatio-temporal fashion. A recent overview of the available monitoring procedures is given by Salmon et al. (2016) doi:10.18637/jss.v070.i10. For the retrospective analysis of epidemic spread, the package provides three endemic-epidemic modeling frameworks with tools for visualization, likelihood inference, and simulation. 'hhh4' estimates models for (multivariate) count time series following Paul and Held (2011) doi:10.1002/sim.4177 and Meyer and Held (2014) doi:10.1214/14-AOAS743. 'twinSIR' models the susceptible-infectious-recovered (SIR) event history of a fixed population, e.g, epidemics across farms or networks, as a multivariate point process as proposed by Höhle (2009) doi:10.1002/bimj.200900050. 'twinstim' estimates self-exciting point process models for a spatio-temporal point pattern of infective events, e.g., time-stamped geo-referenced surveillance data, as proposed by Meyer et al. (2012) doi:10.1111/j.1541-0420.2011.01684.x. A recent overview of the implemented space-time modeling frameworks for epidemic phenomena is given by Meyer et al. (2017) doi:10.18637/jss.v077.i11.
  • epitrix A collection of small functions useful for epidemics analysis and infectious disease modelling. This includes computation of basic reproduction numbers from growth rates, generation of hashed labels to anonymise data, and fitting discretised Gamma distributions.
  • epitools Tools for training and practicing epidemiologists including methods for two-way and multi-way contingency tables.
  • epitab Builds contingency tables that cross-tabulate multiple categorical variables and also calculates various summary measures. Export to a variety of formats is supported, including: 'HTML', 'LaTeX', and 'Excel'.
  • epinet A collection of epidemic/network-related tools. Simulates transmission of diseases through contact networks. Performs Bayesian inference on network and epidemic parameters, given epidemic data.
  • epiflows Provides functions and classes designed to handle and visualise epidemiological flows between locations. Also contains a statistical method for predicting disease spread from flow data initially described in Dorigatti et al. (2017) doi:10.2807/1560-7917.ES.2017.22.28.30572. This package is part of the RECON (http://www.repidemicsconsortium.org/) toolkit for outbreak analysis.
  • EpiEstim This package provides tools to quantify transmissibility throughout an epidemic from the analysis of time series of incidence.
  • epiDisplay Package for data exploration and result presentation. Full 'epicalc' package with data management functions is available at 'http://medipe.psu.ac.th/epicalc'.
  • EpiCurve Creates simple or stacked epidemic curves for hourly, daily, weekly or monthly outcome data.
  • EpiContactTrace Routines for epidemiological contact tracing and visualisation of network of contacts.
  • epicontacts A collection of tools for representing epidemiological contact data, composed of case line lists and contacts between cases. Also contains procedures for data handling, interactive graphics, and statistics.
  • epibasix This package contains elementary tools for analysis of common epidemiological problems, ranging from sample size estimation, through 2x2 contingency table analysis and basic measures of agreement (kappa, sensitivity/specificity). Appropriate print and summary statements are also written to facilitate interpretation wherever possible. Source code is commented throughout to facilitate modification. The target audience includes advanced undergraduate and graduate students in epidemiology or biostatistics courses, and clinical researchers.
  • incidence Provides functions and classes to compute, handle and visualise incidence from dated events for a defined time interval. Dates can be provided in various standard formats. The class 'incidence' is used to store computed incidence and can be easily manipulated, subsetted, and plotted. In addition, log-linear models can be fitted to 'incidence' objects using 'fit'. This package is part of the RECON (http://www.repidemicsconsortium.org/) toolkit for outbreak analysis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.