Stata graphs: Polar (Radial) Plots

Asjad Naqvi
The Stata Guide
Published in
20 min readJan 19, 2021

--

In this guide, learn how to make polar plots from scratch in Stata. The polar plot script is also applied to the Eurostat’s weekly deaths dataset to generate excess deaths figures shown below:

The above visualization was inspired by this Reddit post where weekly deaths are animated in a wheel. This visualization makes a lot of sense, especially when exploring seasonal indicators that continue from one year to the next. For example, deaths go up in winter starting around November and this wave continues till February. The standard way of graphing this information it to plot different lines for each year (see graph above). Even though this also work, the continuity of seasonal patterns is broken.

This guide is slightly more advanced than previous guides since the visualization is programmed from scratch. It also involves a basic knowledge of trigonometry, transformation of cartesian to polar coordinates, and knowledge of programming in Stata. These are discussed where necessary.

Preamble

Like other guides, a basic knowledge of Stata is assumed. This guide deals with advanced usage of locals, loops, and code structures that require some…

--

--

Asjad Naqvi
The Stata Guide

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