This is wonderful. My only complaint is that it takes forever to load. Is that just due to the incredible amount of data?
I'm new to java script and observable in general, so I was just wondering!
Welcome to the Observable community!
Unfortunately, yes. When I published this in April, the summary CSV (which is downloaded from the NYT Github repo and then analyzed in the browser) was 2.4 MB. On my laptop the graphs took about a second to load.
I did foresee (or design for) the catastrophe that we have experienced. That same CSV is now over 30 MB, and I had to fiddle with Firefox's maximum RAM per tab settings just to get the graphics to render at all. I don't recall exactly what munging I had to do with the data – April feels like a lifetime ago – but I suspect there's some O(n²) work happening.
Apart from the long load time, there are other problems with how this tool visualizes the pandemic. I designed these graphs when we'd been in lockdown in my state for about three weeks, to visualize the trajectory of the new case numbers and try to understand if the social distancing measures were working to contain the spread. I was hoping that the measures would be enough to contain the virus and that it would be eliminated in a few more weeks.
But here we are, eight months later. The virus has spread to every community in the country. The federal government refuses to provide financial aid to working class families. Basic safety measures have become political statements. And millions of Americans, perhaps weary from a year that seems unwilling to end, have just returned from visiting family for Thanksgiving – ignoring pleas from the CDC to stay home.
In all this protracted chaos, counting the total number of cases and deaths (as these charts do) has become a less useful way to understand the pandemic. Containment became a pipe dream months ago, so mapping which counties have had any cases isn't very useful – nearly every county has run off the charts on the color scale I designed in April. Total case counts also don't give a good picture of transmission risk in a community or of hospital bed occupancy. Probably at least 10 million of the 13.8 million recorded cases are over (either ending in recovery or death). Including all of this now-historical case data hides critical information about active cases from view.
I recommend the NYT COVID dashboard if you're looking for useful graphs of the pandemic. They've been mapping and plotting new cases per 100,000 people in the last week, which is a more informative view of the current state of things than aggregating everything since February like I've been doing here.
I think it'd be interesting to put together an animated map of cases per capita per week in each county over time. This could be done with the NYT dataset used here, but processing would probably have to happen server-side for performance reasons.
I'm going to leave this notebook as it is for posterity. If anyone's interested in understanding the analysis or tinkering with it, contact me and I can try to answer any questions.