Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
838 changes: 838 additions & 0 deletions .claude/plans/frolicking-humming-hanrahan-agent-a5d8d908c79213450.md

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main

name: Build and Deploy Website

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: quarto-dev/quarto-actions/setup@v2

- name: Render Quarto Website
uses: quarto-dev/quarto-actions/render@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ EpiModel-Gallery.Rproj

renv/
Rplots.pdf

# Quarto
_site/
.quarto/

/.quarto/

**/*.quarto_ipynb
49 changes: 20 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EpiModel-Gallery
# EpiModel Gallery

[![Test Gallery Models](https://github.com/EpiModel/EpiModel-Gallery/workflows/Test-Gallery-Models/badge.svg?branch=main)](https://github.com/EpiModel/EpiModel-Gallery/actions)

Expand All @@ -11,20 +11,20 @@ EpiModel provides built-in SIS/SIR models out of the box, but its module API sup

| Example | Description |
|---------|-------------|
| [AddingAnExposedState](2018-08-AddingAnExposedState/) | SEIR/SEIRS: adding an exposed (latent) compartment, with optional waning immunity |
| [ObservedNetworkData](2018-08-ObservedNetworkData/) | Epidemics over observed (census) dynamic networks without ERGM estimation |
| [SIwithVitalDynamics](2018-08-SIwithVitalDynamics/) | SI with aging, births, deaths, and age-specific mortality |
| [TestAndTreatIntervention](2018-08-TestAndTreatIntervention/) | SIS with screening and antibiotic treatment for bacterial STIs |
| [CompetingStrains](2018-09-CompetingStrains/) | SIS with two pathogen strains differing in infectiousness and duration |
| [SocialDiffusion](2018-09-SocialDiffusion/) | SI framework repurposed for social diffusion with threshold and dose-response contagion |
| [SEIRwithAONVax](2018-10-SEIRwithAONVax/) | SEIR with all-or-nothing vaccination, vital dynamics, and herd immunity |
| [Syphilis](2018-11-Syphilis/) | Multi-stage syphilis with diagnosis, treatment, and recovery |
| [SEIRSwithLeakyVax](2018-12-SEIRSwithLeakyVax/) | SEIRS with leaky vaccination (reduced transmission probability) and vital dynamics |
| [HIV](2019-03-HIV/) | HIV with acute/chronic/AIDS stages and antiretroviral therapy (ART) |
| [CostEffectivenessAnalysis](2021-10-CostEffectivenessAnalysis/) | SI with cost-effectiveness analysis: costs, QALYs, discounting, and ICERs |
| [Multinets](2022-12-Multinets/) | Multilayer networks with cross-layer dependency (e.g., main vs. casual partnerships) |

Each example contains three files: `README.md` (model explanation), `model.R` (network estimation and simulation), and `module-fx.R` (custom module functions).
| [SI with Vital Dynamics](examples/si-vital-dynamics/) | SI with aging, births, deaths, and age-specific mortality |
| [Adding an Exposed State](examples/seir-exposed-state/) | SEIR/SEIRS: adding an exposed (latent) compartment, with optional waning immunity |
| [Test and Treat](examples/sis-test-and-treat/) | SIS with screening and antibiotic treatment for bacterial STIs |
| [Competing Strains](examples/sis-competing-strains/) | SIS with two pathogen strains differing in infectiousness and duration |
| [Social Diffusion](examples/social-diffusion/) | SI framework repurposed for social diffusion with threshold and dose-response contagion |
| [Syphilis](examples/syphilis/) | Multi-stage syphilis with diagnosis, treatment, and recovery |
| [SEIR with AON Vaccination](examples/seir-aon-vaccination/) | SEIR with all-or-nothing vaccination, vital dynamics, and herd immunity |
| [SEIRS with Leaky Vaccination](examples/seirs-leaky-vaccination/) | SEIRS with leaky vaccination (reduced transmission probability) and vital dynamics |
| [HIV](examples/hiv/) | HIV with acute/chronic/AIDS stages and antiretroviral therapy (ART) |
| [Cost-Effectiveness](examples/cost-effectiveness/) | SI with cost-effectiveness analysis: costs, QALYs, discounting, and ICERs |
| [Observed Network Data](examples/observed-network-data/) | Epidemics over observed (census) dynamic networks without ERGM estimation |
| [Multinets](examples/multinets/) | Multilayer networks with cross-layer dependency (e.g., main vs. casual partnerships) |

Each example contains `model.R` (network estimation and simulation), `module-fx.R` (custom module functions), and `index.qmd` (annotated Quarto document).


## Getting Started
Expand All @@ -45,13 +45,13 @@ install.packages("EpiModel")
Clone the repository, then run any example from the project root:

```r
source("2018-08-AddingAnExposedState/model.R")
source("examples/si-vital-dynamics/model.R")
```

Or from the command line:

```bash
Rscript 2018-08-AddingAnExposedState/model.R
Rscript examples/si-vital-dynamics/model.R
```

### Running All Examples
Expand All @@ -63,27 +63,18 @@ bash test.sh
This runs each example's `model.R` and reports pass/fail with timing.


## How to Use

You may use and extend any of these examples in any way you want. We ask that if you publish a paper using EpiModel (with or without these gallery examples), you include a citation (see below).


## Contributing

Contributions of new gallery examples are welcome! To contribute:

1. Fork this repository on GitHub.
2. Create a new subdirectory named `YYYY-MM-Description/` containing three files:
- `README.md` -- explanation of the model, authors, and details
2. Create a new subdirectory under `examples/` containing:
- `model.R` -- main script for network estimation and simulation
- `module-fx.R` -- custom module functions plugged into `control.net()`
- `index.qmd` -- annotated Quarto document
3. Include the standard unit test lines near the top of `model.R` (see existing examples).
4. Verify your example passes: `bash test.sh`
5. Submit a Pull Request. We will review, request changes if needed, and merge.

### Requesting New Examples

If you'd like to ask "how would you build a network model in EpiModel that does X?", file a [GitHub Issue](https://github.com/EpiModel/EpiModel-Gallery/issues) with a detailed description. We may generalize specific requests so the example is broadly useful.
5. Submit a Pull Request.


## Citation
Expand Down

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions _freeze/examples/hiv/index/execute-results/html.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions _freeze/examples/multinets/index/execute-results/html.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions _freeze/examples/si-vital-dynamics/index/execute-results/html.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions _freeze/examples/social-diffusion/index/execute-results/html.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions _freeze/examples/syphilis/index/execute-results/html.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions _freeze/site_libs/clipboard/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions _freeze/site_libs/quarto-listing/list.min.js

Large diffs are not rendered by default.

Loading
Loading