Outbreak globe

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.

http://op12no2.me/toys/vpo

Simple SIR model

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

http://op12no2.me/toys/sir

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.

Essentially:-

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

Where:-

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.  Think 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.

Indirect protection

A little demo to show how people are indirectly protected in an epidemic when enough people are vaccinated – herd immunity.

http://op12no2.me/toys/protect

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.

Description

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:-

https://www.ncbi.nlm.nih.gov/pubmed/8174658

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%
PROTECTED = 100% - VACCINATED - INFECTED

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) {
    safe++;
    if (safe > 2000) {
      $('#debug').html('oops');
      break;
    }
    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) {
      cnt++;
      if (cnt > 10)
        break;
    }
    else {
      cnt = 0;
    }
    s1=s2;
    i1=i2;
    r1=r2;
  }
  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:-

http://op12no2.me/toys/protect?r=16

http://op12no2.me/toys/protect?v=87&r=6

http://op12no2.me/toys/protect?r=20&v=100

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

vaxfax search engine

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 them for content. The English based sites listed by the World Health Organization as sources of reliable vaccination information are included.

http://op12no2.me/toys/vaxfax

By using this search engine all the of vaccination misinformation on the internet is avoided; and there is a lot of it!

If you are interested in the list of sites used or have a suggestion for one, please let me know.

The Egan

Once upon a time, not so very long ago, and not so very far away, there was a wonderful world called Cloud. At the centre of Cloud stood the great city of Ppouc and scattered around it were many smaller towns and villages.

Ppouc had stood proud and still for millennia. Nothing seemed to affect the life and beliefs of the people. In contrast, the surrounding towns and villages popped up and disappeared all the time. Each one more rich, colourful and vibrant than the last.

Sometimes the children of Ppouc looked out with awe and yearning. “I wonder what it would be like to visit these strange places”, they thought. But it was forbidden. Legend told of the The Pyx – a massive hoard of tiny creatures that would sometimes ravage the lands around Ppouc. The legends were told to the children by a great storyteller called Yvy; who could both delight and horrify the children with her skills.

Describing battles with The Pyx, in which millions of people had died screaming from disgusting smelling pustules bursting out from their bodies and horrible wriggly worms eating their brains, Yvy would have the children transfixed until the very last sentence. Then they would nudge each other and giggle nervously before going back out to play. Yvy would smile and nod, contented; “such silly stories” she would think to herself.

One of the children was always a little bit more serious than the others. He would stay behind alone for a while and think about the stories and the countryside.

His name was Craig.

When they were growing up, It was not long before the children realised why their world was called Cloud. Every day messages and questions would appear in the sky written in the clouds. They were usually lovely messages from lovely people with lovely sounding names like Storm, Amethyst and Saffron. The children called these lovely people, Cloudwriters.

The children loved the messages. There were messages that mocked the legends of The Pyx and made them laugh. There were even whole sequences of messages saying that all you had to do to keep The Pyx away was to eat the lovely natural produce of the land, or just concentrate hard and they’d run away.

One of the children’s favourite messages was about nothing. Not nothing as in nothing, but nothing as in a tinsy-winsy bit of something so small that it was in fact nothing – but could keep The Pyx away. The children would love to laugh and shout “Nothing can keep The Pyx away!” They also liked the messages about chocolate, making up rhymes like “Three chocs a day keeps The Pyx away!”.

Sometimes the messages were from important sounding people like Dr Tenthpenny, who also advertised her books and videos about all the lovely things that could keep the Pyx away. This confused some of the children because it was obvious, even to them, that pretty much everything in Dr Tenthpenny’s books could be read as cloud messages for free. Maybe it was because she had cleverly collected all the lovely things and thoughts that could keep The Pyx away into a single place.

Craig would sit alone and stare at the messages. Some instinct, that he didn’t really understand, told him that there was something wrong. He couldn’t put his finger on it, but sometimes messages would appear and then simply disappear. He would concentrate for hours, trying to get a glimpse of who they were from, but it was difficult. Cloud-blind. he would at first give up and go to play with the other children, but the more he glimpsed the messages, the more he was convinced they were real.

Over the years, Craig realised that these fleeting messages were written by just a few Cloudwriters, and that the position of the message in the sky seemed to depend on who wrote it. He learned to stare at a particular spot and piece together the messages, fragment by fragment. They seemed to talk a lot about something called Vyx, which was somehow related to The Pyx, and Craig nicknamed them The Vyxers.

A far as Craig could tell, the Vyxer who appeared the most, seemed to be called Hygyyd. Hygyyd was an important scholar, who had written a sacred text about The Pyx with her friend Hyrlyhy and Hygyyd made Craig laugh. She used colourful language that was forbidden in Ppouc, but which he knew was used in the towns and villages around it. Sometimes he found himself wondering if The Vyxers were villagers.

Craig also wondered about the The Vyxers when they talked about The Offyt in almost reverential tones, because in Ppouc mythology, The Offyt was a creature of the darkness and a teller of lies, and the children were not allowed to speak its name for fear of punishment. It was all very confusing, especially because The Vyxers blamed a lot of things on Wykefield, which in Ppouc was merely a large smelly field which mysteriously attracted the city’s biggest bulls and horses when they needed to defecate.

Sometimes it felt to Craig as if The Vyxers were speaking a different language, and one that would be pretty difficult but fulfilling to learn. It would be so much easier to just believe the lovely natural things and thoughts that could keep The Pyx away.

The children had lots of lessons while they were growing up. One of the things they learned – along with their usual social-justice post-modern science classes like Lovely Natural Remedies, Olfactory Quantum Healing, Colourful Crystal Healing, Gentle Therapeutic Touch and Evidence-Based Faith Healing – was how Ppouc was organised. As well as Yvy the storyteller, there was a group of people called The Admyn who ran Ppouc on a day-to-day basis, and a mysterious cult called The Freeloaders. The Freeloaders were the only people allowed to leave the city walls to visit the countryside, but nobody really seemed to know what they did.

By the time Craig was a teenager, he had discovered more and more Vyxers and he delighted in their names and personalities. As well as Hygyyd and Hyrlyhy the Scholars, there was Vyxymym, a ferocious warrior princess and leader of an ancient tribe called The Avwys – who had once battled and defeated The Pyx.

Then there were people like Tock the Seer and Alchemist, Cyvryc the Cool and the mysterious White Witch Wyssyl – Vyxers that Craig realised knew more actual science than all of his teachers put together. There was even a group of Vyxyers lead by a Mr Simpson, that seemed to have a fascination with something called Zombies, and even Sparkly Zombies, but he couldn’t really figure out what that was all about.

Craig decided that he liked The Vyxers. They posted lots of serious sounding messages, often referring to Yryc, who he thought must be some sort of wizard – but they also had a lot of fun, and, he suspected, were often as drunk as skunks. Above all else, they seemed nice, Reasonable, clear-thinking people; people who obviously accepted the truth, regardless of whether or not it clashed with any of their innate personal predilections.

He was also in awe of the time The Vyxers would spend cloud writing. Especially Professor Ryyss the Resolute, who seemed to know absolutely everything there was to know about the ancient and sacred Cloud Lore Scrolls – and a girl called Kyryn, who’s tribal leadership skills amazed Craig for one so young. It was with both amusement and some frustration that he thought the city of Ppouc itself would benefit greatly from such generous people; even if for some reason they were disparagingly called Shylls by many of the brief and obviously nasty replies. In fact Craig decided being called a Shyll was a cool badge-of-honour, because they always seemed to be one ones making the most sense and being the most reasonable.

Craig had mentioned the fleeting messages and The Vyxers to Yvy and even once to a member of The Admyn, but they would just smile nicely and say he was imagining things. Sometimes he was sure he heard them mumbling something about trolls as he walked away. But as far as Craig knew, the only trolls in Cloud actually lived in Ppouc and they were not the nicest of creatures; certainly not like the Vyxers that he was getting to know.

What worried Craig more and more was the content of the messages that he’d pieced together. He had dismissed them as nonsense when he was younger, preferring to believe the stories of Yvy. But now he was older, they were beginning to make some sense; after all, the legends had to have some truth to them.

The Vyxers said that The Pyx were real and that Vyx could be used to protect against them. They said that the only reason Ppouc was safe from The Pyx, was because the surrounding towns and villages were protecting it. They explained that if The Pyx could not get past the towns and villages, they could not get to Ppouc.

This made a lot of sense to Craig’s young and agile mind, even if, as The Vyxers explained, Vyx occasionally caused some illness itself. It was almost as if all of the country-folk were working together and a taking small personal risk to protect not only themselves, but everybody else in Cloud – even the population of Ppouc. Craig wondered if this was to do with the Social Contract he had seen The Vyxers talk about.

The Vyxers also warned that The Freeloaders, who sometimes ventured out into the surrounding countryside, were religious fanatics, spreading a dangerous sermon that Vyx was not necessary, because Ppouc had never been invaded by The Pyx – and that even if they were attacked, their lovely natural foods and thoughts would protect them.

Craig learned also, that The Freeloaders preached a lie that Vyx was an expensive and unnecessary bane, forced onto the people of the towns and villages, by a rich and fat farmer called Myrk. There was also some sort of a connection between Myrk and being a Shyll but the more Craig tried to understand it, the less sense it made.

But worst of all, The Vyxers said that more and more of the younger people in the countryside were starting to believe The Freeloaders and if this continued, The Pyx would eventually break through, like a herd of wild boars and arrive at the walls of Ppouc itself. And find a totally defenceless Ppouc. It would be a massacre, because of all the lovely natural beliefs and teachings of the people of Ppouc.

Finally, on his twenty-first birthday, the secret of the messages was revealed to Craig, as it was to everybody on their twenty-first birthday. Anybody aged over twenty could send a cloud message. Anybody, regardless of where they lived in Cloud. But the ones appearing over Ppouc were being censored by The Admyn, to protect the population from thoughts that were not as lovely and natural as their own.

Suddenly remembering their parents’ knowing smiles, these new Cloudwriters usually laughed and wondered aloud, how they could have been so naive for so long. Some even switched to lovely names like Amber, Crystal, Blossom, Sky and Star before going off to write lots of lovely messages about all the lovely natural things that could keep The Pyx away.

But Craig didn’t laugh. There really was something wrong. Something terribly wrong.

In a moment of clarity, Craig’s mind raced. He realised that The Adymn must be removing the messages he had glimpsed over the years and that The Admyn must also be Freeloaders; because it was only messages questioning Freeloader philosophy that were disappearing. He realised, as he had suspected, that Hygyyd, Vyxymyn and the other Vyxers, lived in the countryside and were actually trying to warn the people of Ppouc about The Pyx. Worst of all, he realised that Yvy must be a Freeloader and Ppouc was run by a cult and the whole of the lovely natural philosophy of Ppouc was a dangerous lie!

[DRAMATIC PAUSE]

Craig decided he had to do something. He may not be able to save Ppouc itself or even The Admyn from the ravages of The Pyx, but he might just be able to save what he now realised was a trusting, naive and child-like population that had been systematically fed dangerous ideological Freeloader misinformation for centuries – and starved from the truth that The Vyxers were trying to provide, because of the censorship imposed by The Admyn.

Thus he embarked on the adventure of a lifetime. An adventure that would take him far away from the city of Ppouc to the furthest reaches of Cloud. An adventure in which he would actually meet Hygyyd, Vyxymym and the other Vyxers. An adventure in which after building his own eco-friendly city called Ecoppouc, he became known simply as, The Egan – achieving an almost mythical status himself – the irony of which was not lost on him. In time, people would come to write stories about his life; the most popular one being the narrative you are reading.

But ultimately, it was an adventure in which he gently and patiently whispered the truth to the people of Ppouc and one-by-one guided them safely to the enlightened villages in the countryside under the protection of Vyx.

What happened to Ppouc itself and The Freeloader Admyn? The stories are numerous and varied but a common thread hints that Ppouc fell to The Pyx hoard while The Admyn scuttled away into small and sad little groups of refugees. Seeking shelter in hidden and secret underground locations had become their only strategy, because for all that had been revealed to them about The Pyx, most still evangelically shunned the protection of Vyx. As such, they became known to history The AntiVyxers.

Some people say that a smaller and more distributed Ppouc emerged from the dust, but others say it was the tireless work of The Egan and his followers; recreating mini memorial Ppoucs throughout Cloud as a reminder of the past, and the gullibility of ordinary well-meaning gentlefolk. People tell stories about visiting one or two sites of this new many headed Ppouc hydra – and ultimately being blessed with the enlightenment of Vyx.

But we are getting ahead of ourselves. First, Craig had to somehow infiltrate The Admyn and gain at least partial control of the messages over Ppouc. The warnings from The Vyxers needed to be read, before more of the young and impressionable people of the countryside believed The Freeloaders, and unwittingly cleared a path for The Pyx hoard…

In case it’s not obvious :), this is the true story of how Craig Egan single-handedly took down the biggest and most dangerous antivax facebook page called Proud Parents of Unvaccinated Children.  Some of the “Vyxers” referred to are public figures (I hope you don’t mind guys !) but most are members of a secret facebook group dedicated to combatting dangerous anti-vaccine ideology.