Tag Archives: dataviz

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

COVID-19 graphs, with data and code

Updated March 25.

Although I’m not an expert on pandemic analysis, I am naturally following the COVID-19 data as best I can. And because I always understand data better when I make the figures myself, I’ve been making and looking at COVID-19 trend data, and sharing it as I go.

The figures below are the latest I made as of March 18 25 29, but you can click on the images to link to the current version. The figures, as well as data files and code, are in an Open Science Framework project, here: osf.io/wd2n6/, under CC0 license (free to use for any purpose). The project updates automatically as I go, but these figures won’t (because this is an old fashioned blog).

First, across countries:

country cases and deaths

For this one, to put the diverse US in perspective, in included US states in addition to selected countries. These are deaths.

countries and states since 10 deaths

State cases and deaths, per capita:

state cases and death rates bar

Finally, one with commentary: The first month, in numbers and Trump’s winning words:

Microsoft PowerPoint - first month of winning coronavirus.pptx

 

11 Comments

Filed under In the news, Me @ work