View the source code in my Github repo

What is this? It’s easy to find daily tracking data for covid-19 infections, deaths, positive test rates, and so forth, but harder to tell how each state trending in comparison with each other. So while in lockdown, I put together these maps showing the percentage changes in Total Cases and Positive Test Rates versus 2 weeks ago for each state. (Both datasets are important, because sometimes an increase in total cases was only caused by an increase in testing, not increased spread of the virus.)

I chose to compare cumulative numbers rather than daily numbers to solve for the human factor in reporting. The daily case, test, and death numbers can have a lot of variance: reporting slows on weekends (Sun/Mon) and some cases get shifted to higher mid-week counts (Tu/Wed/Th), so even 3-day averages can get spiky. All I’m looking for is a general sense of where each state is trending.

But this is a code sample, not a professional-quality data analysis, so:

Hovering over a state (or clicking the state on a mobile device) gives you data for that state: past, current, and percentage change. The code should run on any site, if you update covid-maps-config.js with your Google Charts API key. In the same config file, you can also change the number of weeks to compare.

What technologies does it use?