How to model network epidemics with Python (NetworkX)

I’ve been teaching myself the NetworkX package for network analysis in Python, which isn’t (yet?) covered on Codecademy. I’ve written up one of my recent projects - building a model of epidemic spread on a network - as tutorial/exercise. Hopefully it will be of use to other learners: (feedback also welcome, I’m sure my code can be improved!)