Very simple model for the spread of an epidemic. Inspired by the neat models presented in this Washington Post article and the COVID-19 epidemic. Written in Python 3x with Jupyter.
Just run the jupyter notebook in this repo to do the simulation. It should be self-explanatory.
See requirements.txt
.
If you have improvements to the code, suggestions of examples, speeding up the code etc, feel free to submit a pull request.
todo:
- implement deaths
- implement recoveries
- impact of quarantine?
- random walking agents
- apply to realistic population densities, based on spatial data
Visit the author's web page and/or follow him on twitter (@nemmen).