epitool: R4VN EpiTool Studio

View source: R/epitool_app.R

epitoolR Documentation

R4VN EpiTool Studio

Description

Opens an interactive field epidemiology workspace for FETP-style work. EpiTool combines epidemiologic calculators, outbreak workflows, surveillance, universal file templates and validation, and optional spatial epidemiology.

Usage

epitool(
  data = NULL,
  mode = c("field", "teaching"),
  level = c("frontline", "advanced"),
  launch.browser = interactive(),
  host = "127.0.0.1",
  port = NULL
)

Arguments

data

Optional data frame. If NULL, EpiTool attempts to use the active R4VN data set selected with usedf().

mode

Initial interface mode: "field" or "teaching".

level

Initial complexity level: "frontline" or "advanced".

launch.browser

Passed to shiny::runApp().

host

Host passed to shiny::runApp().

port

Optional Shiny port.

Details

File-first usability

Every EpiTool workflow that needs external tabular data is paired with a downloadable Excel template containing DATA, DICTIONARY and INSTRUCTIONS sheets. Exact column names are not mandatory because EpiTool includes a column mapper and validation layer.

Spatial epidemiology

Spatial functions are optional. When sf and leaflet are installed, EpiTool supports case maps, source buffers, nearest-source distance, density grids, DBSCAN point clusters, point-to-area spatial joins, population-based area rates, Local Moran's I and Getis-Ord G* analysis.

Density, rate and hotspot outputs are deliberately separated because they answer different epidemiologic questions. A density concentration or statistical hotspot should not be interpreted automatically as a causal source or confirmed outbreak.

Privacy

Presentation mode can jitter displayed case coordinates. Analysis should continue to use the original coordinates.

Value

Invisibly returns the Shiny app after it exits.

Examples

if (interactive()) {
epitool()

outbreak <- data.frame(
  case_id = 1:20,
  onset_date = as.Date("2026-08-01") + sample(0:7,20,TRUE),
  latitude = 10.76 + rnorm(20,0,.005),
  longitude = 106.66 + rnorm(20,0,.005)
)
usedf(outbreak, quiet = TRUE)
epitool(mode = "teaching")
}

R4VN documentation built on Sept. 30, 2026, 5:13 p.m.