# Epidemic Modeling

Epidemic Modeling

### A Basic Model

A Basic Model

As a zeroth approximation, let’s assume that each person infects 5 others, and it takes a week. So after t weeks, the number of infected people will be:

In[]:=

Table[5^t,{t,0,20}]

Out[]=

{1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625}

If we take the population of the world, how long will our naive model take to infect everyone?

In[]:=

Log5.,QuantityMagnitude

Out[]=

14.1358

Let’s pull up a random graph and track how many steps it takes to infect the community.

In[]:=

gr=RandomGraph[WattsStrogatzGraphDistribution[300,.2]]

Out[]=

In[]:=

HighlightGraph[gr,NeighborhoodGraph[gr,{1},4]]

Out[]=

Infection quickly goes to the whole population.

In[]:=

Table[VertexCount[NeighborhoodGraph[gr,{1},t]],{t,10}]

Out[]=

{5,9,17,42,99,181,268,300,300,300}

In[]:=

ListLinePlot[%]

Out[]=

In[]:=

Ratios[Table[VertexCount[NeighborhoodGraph[gr,{1},t]],{t,10}]]//N

Out[]=

{1.8,1.88889,2.47059,2.35714,1.82828,1.48066,1.1194,1.,1.}

In[]:=

ListLinePlot[%]

Out[]=

Let’s try with a larger graph.

In[]:=

gr=RandomGraph[WattsStrogatzGraphDistribution[10000,.2]]

Out[]=

Graph

In[]:=

Table[VertexCount[NeighborhoodGraph[gr,{1},t]],{t,30}]

Out[]=

{5,12,28,71,169,403,935,2039,4084,6890,9122,9908,9997,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000}

In[]:=

ListLogPlot[%]

Out[]=

In[]:=

VertexDegree[gr]//Histogram

Out[]=

Perhaps the distribution of the graph is not particularly realistic - let’s try with a more realistic graph.

In[]:=

bgr=RandomGraph[BarabasiAlbertGraphDistribution[200,5]]

Out[]=

Our basic model spreads very quickly through the community.

Let’s try with some different degrees of connectivity.

Let’s try a few times - to see if where we start in the graph makes a large difference to disease spread.

### Is the “social network” spatially invariant? Does social network homogeneity matter?

Is the “social network” spatially invariant? Does social network homogeneity matter?

Let’s import some more realistic network graphs. We take some data of the connections of people who have been infected with COVID-19, and who they have interacted with.

Some of these nodes are individual cases, and others are clusters (for example conferences etc.). Let’s highlight the clusters.

Let’s remove the clusters from the data, so that we can just see how individuals are connected.

How many people did each person infect?

Counts of Out Degree - the people each individual gave it to.

Counts of In Degree - the people each individual may have got it from.

Let’s look at some real Epidemic Data.

Let’s look only at the countries, rather than administrative divisions.

### Does weather effect spread?

Does weather effect spread?

Let’s start with air temperature.

What about humidity?