## code to prepare `seirdage_structure` dataset goes here
library(DiagrammeR)
library(DiagrammeRsvg)
# seird -------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
S [fillcolor=deepskyblue]
E [fillcolor=orange]
I [fillcolor=coral]
R [fillcolor=turquoise]
D [fillcolor=tomato]
S -> E [label = 'β S I']
E -> I [label = 'k E']
I -> R [label = 'γ I']
I -> D [label = 'μ I']
}")
seird_structure <- DiagrammeRsvg::export_svg(g)
# seirdage --------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
S_1[label = 'S₁', fillcolor=deepskyblue]
E_1[label = 'E₁', fillcolor=orange]
I_1[label = 'I₁', fillcolor=coral]
R_1[label = 'R₁', fillcolor=turquoise]
D_1[label = 'D₁', fillcolor=tomato]
S_2[label = 'S₂', fillcolor=deepskyblue]
E_2[label = 'E₂', fillcolor=orange]
I_2[label = 'I₂', fillcolor=coral]
R_2[label = 'R₂', fillcolor=turquoise]
D_2[label = 'D₂', fillcolor=tomato]
S_1 -> E_1 [label = 'β S₁ (C₁₁ I₁ + C₁₂ I₂)']
E_1 -> I_1 [label = 'k E₁']
I_1 -> R_1 [label = 'γ₁ I₁']
I_1 -> D_1 [label = 'μ₁ I₁']
S_2 -> E_2 [label = 'β S₂ (C₂₁ I₁ + C₂₂ I₂)']
E_2 -> I_2 [label = 'k E₂']
I_2 -> R_2 [label = 'γ₂ I₂']
I_2 -> D_2 [label = 'μ₂ I₂']
}")
seirdage_structure <- DiagrammeRsvg::export_svg(g)
# seird_bd ----------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
S [fillcolor=deepskyblue]
E [fillcolor=orange]
I [fillcolor=coral]
R [fillcolor=turquoise]
D [fillcolor=tomato]
nowhere [style=invis,shape=point]
nowhere -> S [label = 'λ']
S -> E [label = 'β S I']
S -> D [label = 'ν S']
E -> I [label = 'k E']
E -> D [label = 'ν E']
I -> R [label = 'γ I']
I -> D [label = '(ν + μ) I']
R -> S [label = 'δ R']
R -> D [label = 'ν R']
}")
seird_bd_structure <- DiagrammeRsvg::export_svg(g)
# seird_ru ---------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
S_U[label = 'Sᵤ', fillcolor=deepskyblue]
E_U[label = 'Eᵤ', fillcolor=orange]
I_U[label = 'Iᵤ', fillcolor=coral]
R_U[label = 'Rᵤ', fillcolor=turquoise]
D_U[label = 'Dᵤ', fillcolor=tomato]
S_Y[label = 'Sᵧ', fillcolor=deepskyblue]
E_Y[label = 'Eᵧ', fillcolor=orange]
I_Y[label = 'Iᵧ', fillcolor=coral]
R_Y[label = 'Rᵧ', fillcolor=turquoise]
D_Y[label = 'Dᵧ', fillcolor=tomato]
S_U -> E_U [label = 'β Sᵤ ((Iᵤ + Iᵧ)(φᵤ Nᵤ + φᵧ Nᵧ)C + Iᵤ∕φᵤNᵤ(1-C))']
E_U -> I_U [label = 'k Eᵤ']
I_U -> R_U [label = 'γ Iᵤ']
I_U -> D_U [label = 'μ Iᵤ']
S_Y -> E_Y [label = 'β Sᵧ((Iᵤ + Iᵧ)(φᵤ Nᵤ + φᵧ Nᵧ)C + Iᵧ∕φᵧNᵧ(1-C))']
E_Y -> I_Y [label = 'k Eᵧ']
I_Y -> R_Y [label = 'γ Iᵧ']
I_Y -> D_Y [label = 'μ Iᵧ']
}")
seird_ru_structure <- DiagrammeRsvg::export_svg(g)
# seirdnpiage --------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle]
node [shape = circle, style=filled]
S_1[label = 'S₁', fillcolor=deepskyblue]
E_1[label = 'E₁', fillcolor=orange]
I_1[label = 'I₁', fillcolor=coral]
R_1[label = 'R₁', fillcolor=turquoise]
D_1[label = 'D₁', fillcolor=tomato]
S_2[label = 'S₂', fillcolor=deepskyblue]
E_2[label = 'E₂', fillcolor=orange]
I_2[label = 'I₂', fillcolor=coral]
R_2[label = 'R₂', fillcolor=turquoise]
D_2[label = 'D₂', fillcolor=tomato]
S_1 -> E_1 [label = 'β(t) S₁ (C₁₁(t) I₁ + C₁₂(t) I₂)']
E_1 -> I_1 [label = 'k E₁']
I_1 -> R_1 [label = 'γ₁ I₁']
I_1 -> D_1 [label = 'μ₁ I₁']
S_2 -> E_2 [label = 'β(t) S₂ (C₂₁(t) I₁ + C₂₂(t) I₂)']
E_2 -> I_2 [label = 'k E₂']
I_2 -> R_2 [label = 'γ₂ I₂']
I_2 -> D_2 [label = 'μ₂ I₂']
}")
seirdnpiage_structure <- DiagrammeRsvg::export_svg(g)
# seiaimisrd --------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
S [fillcolor=deepskyblue]
E [fillcolor=orange]
R [fillcolor=turquoise]
D [fillcolor=tomato]
Ia [label = 'Ia', fillcolor=coral]
Im [label = 'Im' fillcolor=coral]
Is [label = 'Is' fillcolor=coral]
S -> E [label = 'S (βa Ia + βm Im + βs Is) ']
E -> Ia [label = 'ηa k E']
E -> Im [label = 'ηm k E']
E -> Is [label = 'ηs k E']
Ia -> R [label = 'γa Ia']
Ia -> D [label = 'μa Ia']
Im -> R [label = 'γm Im']
Im -> D [label = 'μm Im']
Is -> R [label = 'γs Is']
Is -> D [label = 'μs Is']
}")
seiaimisrd_structure <- DiagrammeRsvg::export_svg(g)
# seimrd --------
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
S [fillcolor=deepskyblue]
I [fillcolor=coral]
R [fillcolor=turquoise]
D [fillcolor=tomato]
E_1[label = 'E₁', fillcolor=orange]
E_2[label = 'E₂', fillcolor=orange]
E_3[label = 'E₃', fillcolor=orange]
S -> E_1 [label = 'β S I']
E_1 -> E_2 [label = 'k E₁']
E_2 -> E_3 [label = 'k E₂']
E_3 -> I [label = 'k E₃']
I -> R [label = 'γ I']
I -> D [label = 'μ I']
}")
semird_structure <- DiagrammeRsvg::export_svg(g)
# seird_ct
g <- DiagrammeR::grViz("
digraph PrimC{
graph [rankdir = 'LR']
node [shape = circle, style=filled]
R [label = ' R ', fillcolor=turquoise]
D [label = ' D ', fillcolor=tomato]
S [label = ' S ', fillcolor=deepskyblue]
E [label = ' E ', fillcolor=orange]
P [label = ' P ', fillcolor=chocolate]
A [label = ' A ', fillcolor=gold]
I [label = ' I ', fillcolor=coral]
Et [label = 'Eᵀ', fillcolor=orange]
Pt [label = 'Pᵀ', fillcolor=chocolate]
At [label = 'Aᵀ', fillcolor=gold]
It [label = 'Iᵀ', fillcolor=coral]
S -> E [label = '(1 - χ)β(P + I)S + βₐAS']
E -> P [label = '(1 - ηₐ)ωE']
E -> A [label = 'ηₐωE']
P -> I [label = '(1 - φ)ψ P']
P -> It [label = 'φψ P']
A -> R [label = 'γ A']
I -> R [label = 'γ I']
I -> D [label = 'μ I']
S -> Et [label = 'χβ(P + I)S']
Et -> Pt [label = '(1 - ηₐ)ωEᵀ']
Et -> At [label = 'ηₐωEᵀ']
Pt -> It [label = 'ψ Pᵀ']
At -> R [label = 'γ Aᵀ']
It -> R [label = 'γ Iᵀ']
It -> D [label = 'μ Iᵀ']
}")
seird_ct_structure <- DiagrammeRsvg::export_svg(g)
# make all available --------
usethis::use_data(seird_structure,
seirdage_structure,
seird_bd_structure,
seird_ru_structure,
seirdnpiage_structure,
seiaimisrd_structure,
semird_structure,
seird_ct_structure,
overwrite = TRUE, internal = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.