Profile cover photo
Profile photo
Colin Jenkins
Colin Jenkins's posts

Post is pinned.Post has attachment

Post has attachment
#vaxfax is a custom google search engine allowing parents and others to search for reliable vaccination based information. All the sites included in the engine are added by hand after reviewing for content. The English based sites listed by the +World Health Organization as sources of reliable vaccination information are included.

By using this search engine all the of vaccination misinformation on the internet is avoided. And there is a lot of it.

#epidemiology #publichealth

Post has attachment
A little #Javascript herd immunity demonstration.

The explicit language translations are because google translate doesn't do a great job. If you would like to translate into another language please do not hesitate to contact me.

#vaccination #epidemiology #publichealth #herdimmunity #antivax

Post has attachment
A little demo to show how people are indirectly protected in an #epidemic when enough people are vaccinated - herd immunity.

It should work on touch and non touch devices including phones; the layout being responsive to screen size.

The demo is not suitable for thinking about the elimination of a disease in an endemic steady state.  It is rooted in an epidemic context.


This demo executes an epidemic #SIR model in real time as the sliders change the vaccination rate V (blue) and basic reproduction number R0 (green).  

All standard SIR model assumptions hold.  The purpose is to show that as the vaccination rate increases, the number of people indirectly protected from disease increases non-linearly and steeply as the vaccination rate approaches the herd immunity threshold (1-1/R0), as depicted in this sketch:-

See also figure 4 of:- 

A single infection is used as the trigger.  The total number of people in the population (T) remains the same through the model.

The vaccine is assumed to be 100% seroprotective and long lasting - such that all those who are in the vaccinated fraction of the population are considered immune (and not infectious).  

It would be easy to additionally model vaccine seroconversion rates, but essentially one can do the same by just lowering V.

The initial values for the SIR model are calculated as follows:-

S = T(1 - V)
I = 1
R = T - I - S

i.e. the population is completely susceptible (S), other than those who are vaccinated (assumed to be immune in R) and a single index case I.

The values of the three bars are then calculates as:-

VACCINATED  = V * 100%
INFECTED = (SIR(S,I,R,R0) / T) * 100%

For small values of R0, PROTECTED will have a value even when V=0, because of the low force of infection.  This is noted in the help tips rather than a whole new UI element introduced.  I tried to keep the UI very simple.

The model uses an elementary method to try and detect the end of the epidemic which typically converges in 20-100 iterations.  There is a safety limit of 2000 iterations, which is never hit using the constraints of the UI.  The SIR function itself is is defined as:-

function sir(t,i0,s0,b,k) {
var r0 = t-s0-i0;
var s1 = s0;
var i1 = i0;
var r1 = r0;
var cnt = 0;
var itot = i0;
var safe = 0;
while(1) {
if (safe > 2000) {
var inew = s1*i1*b;
itot += inew;
var rnew = k*i1;
var s2 = s1 - inew;
var i2 = i1 + inew - rnew;
var r2 = r1 + rnew;
if (inew < 0.1) {
if (cnt > 10)
else {
cnt = 0;
return itot;

Note that R0 is parameterised as b and k as per standard SIR model formulations.  b being the contact rate per capita and k the recovery rate.  b is calculated as kR0 and k is fixed at 0.125.  This may seem like a limitation, but it is a property of SIR models that they behave similarly depending on b/k (R0), so the model need not be complicated by considering different recovery rates - it's all implicit in R0.  Ditto for population size.

URL Initialisation

Parameters v (initial vaccination rate as a percentage) and r (initial R0) can be added to the URL to override the default values of nil and 7 respectively.  For example:-

This method allows R0 to be specified outside of the UI constraints.

#vaccination #antivax #epidemiology #publichealth

Post has attachment
A simple #epidemic and #endemic compartmental SIR (Susceptible, Infected, Recovered) infectious disease model using #Javascript and #HTML5.

The model implements these fairly standard iterative equations for S, I and R:-

s' = s - cis/t - bs + bt - vbt + wi
i' = i + cis/t - ki - bi
r' = r + ki - br + vbt - wi

All the usual constraints hold, like homogeneous mixing and vaccination at birth.

Note that the total population is constant.


s' = s - new cases - susceptible deaths + births - vaxed + waned

i' = i + new cases - recovered cases - infected deaths

r' = r + recovered cases - recovered deaths + vaxed - waned


t = Total population. This is always constant.

s,i,r = Number of susceptible, infected and recovered individuals at any one time.

c = Contact rate.  The way to interpret this is to this of a totally susceptible population and a single infection.  If on average the infective infects one person every other iteration then c=0.5.

k = Recovery rate.  If it takes on average 10 days to recover then k = 0.1.

b = Birth and death rate.  This is a fraction of the total population per iteration.

v = Vaccination rate.  The fraction of newborns vaccinated at birth.

w = Wane rate after being immune from natural infection or vaccination.  This of this like k.  If it takes 100 iterations for immunity to wane then w=0.01.

The initial values of s and i are input as fields s0 and i0.  The initial value of r is then t-s0-i0.

The following metrics are calculated along with the graphs and tables:-

R0 = Basic reproduction number = c / (k+b).
Se = Epidemic threshold of susceptibles = t / R0.
H = Herd immunity threshold = 1 - 1/R0.

The input parameters are integers, reals or strings as required.

c,k,b,v and w can be defined based on the current iteration using javascript functions.

For example in the measles2 scenario, the contact rate c is defined with a function to add seasonal variation:-

function (iter) {
return 3.6*(1.0 + 0.036*Math.sin(iter*0.0172141));

0.0172141 being 2*pi/365 - i.e. every 365 iterations is a 'season' with a sin() shaped curve.

c,k,b,v and w can also be entered as expressions; e.g. 1/3 instead of 0.333333.

You can click on the model home page or one of the scenario links to see some predefined setups.  If you tweak any of the value and click the Plot button, the graphs and outputs will be updated.  You can also copy the resulting URL in the browser to link to your model.

#vaccination #epidemiology #publichealth

Post has attachment
Beating the Drum.

A little #Javascript demonstration showing that when we mass #vaccinate against a backdrop of morbidity, temporal correlations are inevitable.

#epidemiology #mmr #autism #publichealth

Post has attachment
This Web GL globe +Google Chrome experiment displays vaccination outbreaks between 2006 to 2015 based on data from the +Council on Foreign Relations. The globe was easy to work with, but could do with a little more documentation.

All the outbreaks, regardless of date and disease (mostly measles, mumps, rubella, pertussis and polio) are shown in blue with attacks on vaccination workers shown in yellow-ish. The size of the spike is linearly proportional to the number of cases, but it’s capped at 40000. The actual maximum number of cases is 130000 in one instance but including that reduces the smaller outbreaks to just dots.

#epidemiology #publichealth #webgl


Post has attachment
This #Javascript app parameterizes a SIR model and estimates R0 based on incidence data input by the user.

#epidemiology #publichealth

Post has attachment
A #Javascript agent based infectious disease model, allowing users to edit scenarios. If you would like to add a scenario, let me know.

#epidemiology #publichealth

Post has attachment
Wait while more posts are being loaded