Skip to content

Search Broadly Epi

Data & Code

Do the public-health analysis, step by step.

Reproducible tutorials for calculations, data management, surveillance, visualization, mapping, modeling, and reporting. Start with the task; choose the tool second.

Python · Epidemiologic Calculations

How to calculate an odds ratio in Python

Build a 2x2 contingency table in Python, calculate an odds ratio and 95% confidence interval by hand, and confirm the result with scipy.stats.fisher_exact. Uses a self-contained fictional case-control study with no external files required.

Start the tutorial

More workflows

Continue with another task

Python · Data Import & Management

Text data types for NLP in Python

Work through Python examples of strings, lists, dictionaries, DataFrames, tokens, sparse matrices and embeddings.

Python · Epidemiologic Calculations

Calculate prevalence in Python

Clean the tutorial data, calculate prevalence and visualize differences across years and regions in Python.

Python · Modeling & Simulation

Build an SEIR model in Python

Add an exposed compartment to a disease-transmission model and plot its simulated course in Python.

R · Modeling & Simulation

Build an SEIR model in R

Add an exposed compartment to a disease-transmission model and plot its simulated course in R.

Task-first navigation

What are you trying to do?

Choose the analytic task first. Each route can contain R, Python, SQL, GIS, or tool-neutral workflows.

  1. Getting Started & Environments2 tutorials
  2. Data Import & Management2 tutorials
  3. Epidemiologic Calculations6 tutorials
  4. Statistical Analysis5 tutorials
  5. Surveillance & Outbreak Analysis0 tutorials
  6. Time Series & Forecasting0 tutorials
  7. Visualization & Dashboards0 tutorials
  8. GIS & Mapping1 tutorial
  9. Modeling & Simulation5 tutorials
  10. Reproducible Reporting & Automation0 tutorials