COVID-19 code, data, codebooks, figures

Every day for who knows how long I’ve tinkered with COVID-19 data and made graphs using Stata. Now I’ve condensed my tools down to several elements, updated daily, which I’m sharing:

  • A program that assembles the COVID death and case data, by date, at the county, state, and country level. To this I have added some population, income, and political variables. The program is here, along with the codebook it outputs.
  • The data file is here in Stata format and CSV format. It’s in long shape, so one record for each place on each date.
  • A Stata program that makes my favorite graphs right now (currently 24 per day). The Figures are stored here in PNG format.
  • The Stata scheme I use to make them look the how I like is here.

These files are linked to my laptop so they update automatically when I revise them. Yay, Open Science Framework, which is non-profit, open source, free to use, and deserves your support.

I hope someone finds these helpful, for teaching or exploring on their own. It’s all yours.

Here are a few figures from today’s runs (click to enlarge):

counties with any cases

deaths and GDP scatter

4 Comments

Filed under Me @ work

4 responses to “COVID-19 code, data, codebooks, figures

  1. Good to see that the percentage of counties is finally leveling off 😉

    Like

  2. One thing none of the graphs seem to do is show the percentage of new vs. probably resolved cases — more than 2 weeks old. You could adjust the colors?

    Like

Leave a Reply to Philip N. Cohen Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s