BW #23: Misery index

Why do Americans feel so blah about the economy, even if it's doing well? Let's check the "misery index," which combines several factors to get a sense of why people are feeling bad.

The US economy is doing pretty well. In fact, by many measures, it's doing *really* well. Unemployment is at historical lows, people are spending a lot, there's a fair amount of growth... But people aren't necessarily feeling great about it. Sure, there's inflation, but that has actually come down a lot in the last two years.

So, what gives? Why do Americans say that the economy is only so-so, when so many other countries are suffering even more?

One possible answer, which we'll explore this week, is the “misery index,” devised by economist Arthur Okun. By adding together the unemployment rate and the rate of inflation, you can roughly estimate just how bad people feel about the economy. It's a way to quantify something we all know intuitively, namely that high unemployment and high inflation are pretty miserable, while low unemployment and low inflation give a pretty great feeling regarding the economy.

It might seem weird to add together two percentages that are otherwise unconnected. But it's not a bad first-pass measure of how things are feeling.

Data

To calculate the misery index, we'll need to get two different pieces of data, and then put them together:

  • The inflation rate
  • The unemployment rate

But wait a second — it's very nice to talk about “the inflation rate” and “the unemployment rate.” But as we've seen in previous issues of Bamboo Weekly, there are multiple measures of inflation, and also multiple measures of unemployment. Which ones will we use?

I'm not an economist (although I do find the subject fascinating), so I’m going to do my best to choose the right data and also to calculate these things correctly. (As always, I look forward to being corrected, and thus learning more about this, from readers.) This week, we'll use data from FRED, the data portal run by the Federal Reserve Bank of St. Louis. We’ll use the seasonally adjusted employment percentage, which is mentioned in several sources I read about the misery index. As for inflation, we’ll use the World Bank’s annual inflation numbers for the US. It’s quite possible that other measures will be seen as more accurate or useful.

I should add that there seem to be some newer versions of the misery index, including the Barro Misery Index (proposed by economist Robert Barro, which includes several factors beyond unemployment and inflation) and a worldwide misery index, proposed by economist Steven Hanke, which can be calculated for many countries. This analysis can thus go in a lot of different directions.

This week, we have eight questions and tasks. The learning goals are to work with Excel files, datetime data, changes, and line plots:

  • Download the seasonally adjusted unemployment numbers, as calculated by the Bureau of Labor Statistics, from https://fred.stlouisfed.org/series/UNRATE . Use the Excel version of the data. Create a data frame from that information, setting the `observation_date` column to be the index, and ensuring that the dtype is good for dates and times.
  • The misery index is calculated on an annual basis. This means that we'll need to transform our data frame from containing monthly data, with 12 rows per year, into one with annual data, with one row per year. Perform this transformation, such that the annual rate for each year is the mean of the 12 monthly calculations.