HackerTube

Simulating an epidemic

3Blue1Brown8 HN recommenders · recommended in 5 months, 2020–2023
YouTube
explainer · general · 2020–2023 on HN

3Blue1Brown builds toy SIR models to simulate how an epidemic spreads and tests scenarios like social distancing, travel restrictions, central gathering places and quarantine. It was made during the early COVID-19 outbreak.

HN pointed to it during 2020 as a digestible, well-made illustration of epidemic dynamics and interventions.

12 comments from Hacker News

@kaunta2020-04 · in “Building a command line tool to simulate the spread of an infection”

Garrett, thank you. * * * My inspiration for writing this came from watching 3Blue1Brown's YouTube video, "Simulating an epidemic": ▶ this video His simulations cover several scenarios: - Simulating social distancing. - Having people travel to a central location (e.g. a grocery store). - What if the government is able to identify and isolate cases? - Simulating multiple communities with travel, that put quarantine measures in place. - What happens when people get tired of social distancing. * * * Thanks for sharing your code. I see that you are using gnuplot to visualize the output of the script. Have you considered using the csv module ( link ) to output the data, instead of using the print() function? That way, you wouldn't have to manually add in spaces around the data and stringify the numeric data. >>> import csv, sys >>> writer = csv.writer(sys.stdout, delimiter=" ") >>> writer.writerow(["#", "T", "S", "I", "R"]) # T S I R In the script, usage would look something like this: import csv import sys ... writer = csv.writer(sys.stdout, delimiter=" ") writer.writerow(["#", "T", "S", "I", "R"]) writer.writerow([T, S, I, R]) while I > 1000: ... writer.writerow([T, S, I, R])

Strongly recommends View on HN
@foobarbecue2020-03 · in “Japan set to ban entry from the U.S. as early as next week”

Part of 3 Blue 1 Brown's excellent latest video simulates travel restrictions and suggests they're not very effective: ▶ this video . However, that was only for cutting travel between all communities by a factor of 4, rather than completely banning travel between two particular communities / countries.

Strongly recommends View on HN
@systemvoltage2021-05 · in “India’s second wave of Covid-19 feels nothing like its first”

Dynamics of the virus spread is quite interesting. 3Blue1Brown made a fascinating video about how an epidemic spreads: ▶ this video

Recommends View on HN
@gus_massa2021-01 · in “Contra Weyl on Technocracy”

> Technocrats used complicated mathematical models to determine that mass vaccination would create a "herd immunity" to disease. The SIR model is very simple link At the beginning of the covid19 epidemic everyone and their dog was writing one and publishing a demo version. It was interesting/scary to modify the parameters and see how thing changed. Also, try to fix misinformation in the models, like a 50% death rate. Anyway, a SIR model can be programed in 20 lines of codes, and is pretty straightforward. Adding a vaccine is like 5 additional lines at most. Also, the main idea is very simple to understand. (Someone should write a tutorial of SIR in Excel/GoogleSheets, it's interesting to see the graphics.) The most simple models just assume that everyone meets everyone randomly. It's more complicated if you want to consider a more realistic model of how people move. For a decision about lockdown you need the complex model, but to understand herd immunity the simple model is good enough. For a nice explanation of more complicated models, there is a video of 3Blue1Brown: "Simulating an epidemic" ▶ this video Note that he explains that the models in this video are not 100% accurate, some number are chosen to get nice graphics, they are only useful to get some insight but not get quantitative predictions.

Recommends View on HN
@tmabraham2020-10 · in “Manim: Animation engine for explanatory math videos”

BTW, he's currently co-teaching a course on Julia with some really great lectures on computational thinking: link He also had a nice video about epidemics/pandemics: ▶ this video All using manim for visualizations.

Recommends View on HN