This simple SIR model simulates a zombie outbreak in France, inspired by the scenario described in When zombies attack!: Mathematical modeling of an outbreak of zombie infection.
Here the model is extended spatially to allow neighboring grid cells to interact with one another (each cell can interact with its 8 adjacent cells) so infection can spread from cell to cell, and the global zombie outbreak can be visually appreciated (who doesn't want to see a nice zombie wave!).
The patient zero (there must be one ...) is placed somewhere between Lyon and Nimes. You can also add more foci infection by clicking on the map.
The two line charts on the right show the current state of the population for each iteration of the model:
The France population density image is created from the published 2011 Europe Population grid data (see the formatData
function in this repository for the details of how the data were transformed to the grid format).
https://d3js.org/d3.v4.min.js
https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js