As COVID continues to rampage through the US (and the world), I worked on modeling COVID’s impact on business. This is made particularly difficult because of the differential response to COVID by different states. To this end, I realized that tracking both COVID deaths and Google Mobility data over the same time frame could give insight into both COVID’s impact and a state-level response to COVID. The video above shows both in a time-lapse video.

This was a simple little project that had some unique quirks:

  • I wrote all of this in python, using geopandas to plot the data and ffmpeg to stitch together the images
  • The Google Mobility Data was a bit messy, so I converted the values (as well as the death values) to a 7-day rolling average
  • To get the colors, I normalized the values within each state from 0-1 and used the resulting value as the alpha for red (high) or blue (low).
  • I threw out Hawaii and Alaska because it reduced visibility on all the other states (Alaska is HUGE – I used the Census Bureau Shape Files)
Close Bitnami banner