Skip to content

Commit

Permalink
[presentation] polish
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccBarker committed Oct 13, 2024
1 parent 2332d86 commit ee1a932
Show file tree
Hide file tree
Showing 124 changed files with 43 additions and 20,633 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ compile_commands.json
*.html
*.ipynb
.nocheck/

*_files
!README_files
63 changes: 40 additions & 23 deletions interactives/Presentation.qmd
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: "Frameworks for Epidemiologic Agent-Based Modeling"
subtitle: "Epiworld and it's various wrappers"
subtitle: "Epiworld and its various wrappers"
format:
revealjs:
revealjs:
slide-number: true
footer: "??? - <https://milobanks.com/whatever-goes-here>"
footer: "Epiworld and its various wrappers - <https://milobanks.com/slides/2024-10-14>"
code-annotations: below
chalkboard:
chalkboard:
buttons: false
preview-links: auto
incremental: true
include-in-header:
include-in-header:
text: |
<style>
.v-center-container {
Expand All @@ -24,7 +24,7 @@ format:
# author: # Unsure
institute:
- The University of Utah
date: 2024-09-03
date: 2024-10-14
aspectratio: 169
fig-format: svg
---
Expand Down Expand Up @@ -75,11 +75,21 @@ fig-format: svg

- **EpiworldR**: R wrapper that makes it easy to run simulations in the R environment, favored by data scientistss.
- **EpiworldPy *(In Progress)***: Python wrapper, enabling the use of Epiworld in Python, which is also favored in data science and machine learning spheres.
- **EpiworldShiny**: A non-programatic of interacting with Epiworld.
- **EpiworldRShiny**: A non-programatic of interacting with Epiworld.
- **EpiworldWeb *(In Progress)*** : A port of Epiworld to WebAssembly, allowing serverless simulations.

---

## A Look at EpiworldRShiny

::: {.v-center-container}

![](fig/epiworldrshiny.png){width="100%" fig-align="center"}

:::

---

## Preview of EpiworldWeb

::: {.v-center-container}
Expand All @@ -93,9 +103,7 @@ fig-format: svg
## Comparison of Wrappers

- What does **EpiworldPy** exist over **EpiworldR**?
- **EpiworldShiny** must be run locally on a computer despite being packaged as a website, whereas **EpiworldWeb** needs no prerequisites.

---
- **EpiworldRShiny** must be run locally on a computer despite being packaged as a website, whereas **EpiworldWeb** needs no prerequisites.

# Example {background-color="black"}

Expand All @@ -107,7 +115,7 @@ fig-format: svg

```c++
/* Creating the model. */ // <1>
epimodels::ModelSEIRCONN<> model(
epimodels::ModelSEIRCONN<> model(
"Influenza", /* Name of the virus. */
50000, /* Population. */
0.01, /* Initial prevalence. */
Expand Down Expand Up @@ -205,7 +213,7 @@ model.print()

---

## Demo: Influenza Outbreak in SLC (EpiworldShiny)
<!-- ## Demo: Influenza Outbreak in SLC (EpiworldRShiny)
::: {.v-center-container}
Expand All @@ -223,7 +231,7 @@ model.print()
:::
---
--- -->

## Demo: Graphing Model Compartments

Expand Down Expand Up @@ -304,14 +312,14 @@ plt.figure(figsize=(10, 6))
for virus_id, virus_data in enumerate(reproductive_data):
average_rts = list()
for date_data in virus_data:
if not date_data:
continue
keys_array = np.array(list(date_data.values()), dtype=np.float64)
average_rts.append(np.mean(keys_array))
plt.plot(range(0, len(average_rts)), average_rts, label=f"Virus {virus_id}")
plt.xlabel('Date')
Expand Down Expand Up @@ -427,10 +435,10 @@ fig, ax = plt.subplots(figsize=(6,4))
to_track = { source[0] }
def update(frame):
ax.clear()
agents_involved_today = set()
agents_relationships_we_care_about = []
# Get only the agents involved in the current frame.
for i in range(len(start)):
if start[i] <= frame <= end[i]:
Expand Down Expand Up @@ -545,7 +553,7 @@ vaccine = epiworld.Tool(
as_proportion = True,
susceptibility_reduction = 0.9,
transmission_reduction = 0.5,
recovery_enhancer = 0.5,
recovery_enhancer = 0.5,
death_reduction = 0.9
)
Expand Down Expand Up @@ -602,14 +610,14 @@ plt.figure(figsize=(10, 6))
for virus_id, virus_data in enumerate(reproductive_data):
average_rts = list()
for date_data in virus_data:
if not date_data:
continue
keys_array = np.array(list(date_data.values()), dtype=np.float64)
average_rts.append(np.mean(keys_array))
plt.plot(range(0, len(average_rts)), average_rts, label=f"Virus {virus_id}")
plt.xlabel('Date')
Expand All @@ -620,16 +628,25 @@ plt.grid(True)
plt.show()
```

---

# Closing Thoughts {background-color="black"}

---

## Closing Thoughts

- Self, what do I say here so it's not a knockoff of `ccs2024`?
- `epiworld` is a high-performance C++ library designed for building agent-based epidemiological models.
- A flexible framework, allowing callers to define custom states and update dynamics for their models.
- It has as been utilized in numerous epidemiological agent-based modeling research projects and studies.
- Check it out at [github.com/UofUEpiBio/epiworld](https://github.com/UofUEpiBio/epiworld)!

---

## Closing Thoughts

::: {.v-center-container}

We are looking for **collaborators** and **contributors**!

:::

# Questions {background-color="black"}
Loading

0 comments on commit ee1a932

Please sign in to comment.