From 8062f01db91dda2534cdb01a0152a192d70b8a82 Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Sun, 7 Apr 2024 11:13:18 +0200 Subject: [PATCH] reaplce tikz with png in IDM --- 23_ID_modelling.ipynb | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/23_ID_modelling.ipynb b/23_ID_modelling.ipynb index 38821df..a83475f 100644 --- a/23_ID_modelling.ipynb +++ b/23_ID_modelling.ipynb @@ -223,8 +223,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", - "\n", "### The \"shape\"\n", "\n", "Most *single-wave* infectious disease outbreaks tend to have a characteristic shape: at the start, the number of infected individuals increases, reaches its peaks, and then goes down back to near zero.\n", @@ -236,18 +234,7 @@ "\n", "The simplest possible assumption about how a disease spreads is that each case of disease leads on to some fixed number of new cases every day. \n", "\n", - "```{tikz} \n", - " [level distance=20mm,level/.style={sibling distance=40mm/#1}]\n", - " \\node[circle, draw, fill=red!30] {D0}\n", - " child {node[circle, draw, fill=red!30] {D1}\n", - " child {node[circle, draw, fill=red!30] {D2}}\n", - " child {node[circle, draw, fill=red!30] {D2}}\n", - " }\n", - " child {node[circle, draw, fill=red!30] {D1}\n", - " child {node[circle, draw, fill=red!30] {D2}}\n", - " child {node[circle, draw, fill=red!30] {D2}}\n", - " };\n", - "```\n", + "![](assets/idm1.png)\n", "\n", "Day 0: 1 \n", "\n", @@ -368,14 +355,7 @@ "- $I(t)$ be the number of infected individuals at time $t$.\n", "- $N$ be the total population size (constant over time).\n", "\n", - "```{tikz}\n", - "% Nodes\n", - "\\node[draw, circle, fill=blue!30] (S) at (0,0) {S};\n", - "\\node[draw, circle, fill=red!30] (I) at (2,0) {I};\n", - " \n", - "% Arrows\n", - "\\draw[->, thick] (S) to[out=45,in=135] node[midway, above]{$\\beta S I/N$} (I);\n", - "```\n", + "![](assets/idm2.png)\n", "\n", "The dynamics of the SI model can be described using a set of ODEs. One of them describes the rate of change in susceptiopal individuals $\\frac{dS}{dt}$ and the other one describes the rate of change in infected individuals $\\frac{dI}{dt}$:\n", "\n", @@ -558,16 +538,7 @@ "\n", "The acronym SIR stands for Susceptible-Infectious-Recovered, representing the three main compartments of individuals within the population. The $R(t)$ described individuals who have recovered from the disease and have developed immunity to it. Recovered individuals are no longer susceptible to the disease and cannot transmit it to others. In some cases, individuals may also acquire immunity through vaccination.\n", "\n", - "```{tikz}\n", - "% Nodes\n", - "\\node[draw, circle, fill=blue!30] (S) at (0,0) {S};\n", - "\\node[draw, circle, fill=red!30] (I) at (2,0) {I};\n", - "\\node[draw, circle, fill=green!30] (R) at (4,0) {R};\n", - " \n", - "% Arrows\n", - "\\draw[->, thick] (S) to[out=45,in=135] node[midway, above]{$\\beta S I/N$} (I);\n", - "\\draw[->, thick] (I) to[out=45,in=135] node[midway, above]{$\\gamma I$} (R);\n", - "```\n", + "![](assets/idm3.png)\n", "\n", "$$\n", "\\begin{align*}\n",