COVID-19 visualizations with Stata Part 3: Heatplots

Asjad Naqvi
The Stata Guide
Published in
10 min readSep 2, 2020

--

In this guide, we will learn how to make a heat plot in Stata. A heat plot is a three-dimensional figure which shows the third dimension using colors intensities. In order to make this figure, we will make use of the COVID-19 policy database compiled by the Oxford COVID-19 Government Response Tracker (OxCGRT). This dataset tracks various policy indicators at the country and date level, for example, school closures, work from home policies, travel restrictions, and various other economic and health interventions. These indicators are aggregated in an overall composite index that ranges from 0 (weakest) to 100 (strongest) policy. This provides us with three dimensions we need - date, country, and policy stringency index. From, this information, we will learn how to generate the following heat plot:

The figure above shows how European countries ramped up their lockdowns after the initial COVID-19 outbreak in Italy around end of February 2020. Italy and Ireland implemented almost a complete shutdown of all activities, which is represented by the dark red color. In June and July several countries started easing their lockdown policies. Sweden also stands out in the graph above since it avoided locking down the economy. Changes in color intensities also show how some countries reintroduced stricter policies around August after an increase in cases which…

--

--

Asjad Naqvi
The Stata Guide

Here you will find stuff on Stata, data visualizations, data wrangling, workflows, and programming.