Jonathan Sedar

Personal website and new home of The Sampler blog

Contagious Coughs & Colds 2019 Commute Calculator

Posted at — 8 Mar 2020

If there’s ever a medium to undertake half-baked analysis it’s blogging… So a major warning upfront that nothing in the following should be used for anything (!)

I’m watching the impending Covid-19 crisis with muted concern. As I write, Lombardy in Northern Italy is under lockdown, the count of confirmed cases in the USA is rising and seemingly only limited by lack of adequate testing, and some states including mine of NY have declared a state of emergency to grant them wider powers in the effort to curtail the spread of the virus.

This contagion appears to spread very easily with a very high $R_{0}$ and carriers may be asymptomatic but contagious for several days. These effects are novel and worthy of study and public understanding. There are already several high quality epidemiological studies published online (e.g. this paper estimating case fatality rate using a Bayesian transmission model), and despite being interested in the technicalities of the models, I have no background in epidemiology, and dare not attempt any serious modelling in this space.

However, I observe that:

  1. The daily new cases in South Korea appear to be reducing, and they have implemented extremely strong practices of social separation and quarantine
  2. Many companies are implementing rules that ban employees from attending conferences (indeed many conferences are cancelling themselves) or meetings in large numbers, and encouraging work from home where possible
  3. I live in Brooklyn, NYC and usually face a 45min subway ride into the office Downtown including a change at Union Station, one of the busiest, hottest, and frankly least pleasant stations on the line.

Using the little I know about population resampling, I wondered if I could make a rough estimate of the number of Covid-19 cases I might encounter during a round trip commute via various methods, and seeing as NYC still hasn’t recommended any form of social separation, gauge for myself how risky it might be to go to the office on a typical day.

If this is of any interest to you dear reader, please try the interactive calculator for yourself.

Screencap of the online calculator

This was also an excuse for me to try out streamlit and reaquaint with Heroku. This setup makes for a really convenient way to create and share small interactive apps for analyses, and I’ll try to use this in future. I’ve made the code available here on Github if want to clone and try it out.


comments powered by Disqus