BW #44: Global economics

This week, we'll take a look at economic trends among members of the OECD, using Seaborn to create some nice-looking charts.

BW #44: Global economics

The world economy has been through a lot in the last 15 years. From the financial crisis (aka "Great Recession"), through the pandemic and tension between China and the West, to the return of inflation and higher interest rates, the global economy has been under significant strain.

When the economy is going through turmoil, so are the people who make up the economy. Those economic problems can translate into trouble for governments. We've already seen a diverse set of countries, from the Netherlands to Argentina, vote out incumbents, in no small part because of people's economic frustration.

Of course, the United States will hold a presidential election next year, and President Joe Biden's supporters are already nervous. They aren't totally wrong to worry: The US might well have pulled off a "soft landing," reducing inflation without hurting growth or unemployment too much, but people are still noticing the rise in prices over the last few years, and aren't too happy about it.

Kyla Scanlon (https://kyla.substack.com) has been writing about this for a while, contrasting the actual (good) economic data with people's (bad) feelings, in what she calls a "vibecession."

What does the data say about the US economy, both by itself and in contrast with other developed economies? That's what we'll be looking at this week, giving us a picture that's better and deeper than the low "vibes" Scanlon writes about.

Data and 7 questions

This week, I thought that it would be interesting to look at the US economic data, both by itself and then in contrast with other economies. The data comes from the Organization for Economic Cooperation and Development (OECD), what the Economist likes to call "a club of mostly-rich countries."

We'll be looking at three different data files:

  1. GDP data for OECD countries, described at https://data.oecd.org/gdp/gross-domestic-product-gdp.htm . The CSV file we'll use is at https://stats.oecd.org/sdmx-json/data/DP_LIVE/.GDP.../OECD?contentType=csv&detail=code&separator=comma&csv-lang=en .
  2. Unemployment data for OECD countries, described at https://data.oecd.org/unemp/unemployment-rate.htm . The CSV file we'll use is at https://stats.oecd.org/sdmx-json/data/DP_LIVE/.HUR.../OECD?contentType=csv&detail=code&separator=comma&csv-lang=en .
  3. The consumer price index (CPI) for OECD countries, described at https://data.oecd.org/price/inflation-cpi.htm . The CSV file we'll use is at https://stats.oecd.org/sdmx-json/data/DP_LIVE/.CPI.../OECD?contentType=csv&detail=code&separator=comma&csv-lang=en .

This week, I have seven questions for you. The learning goals include plotting in Seaborn, applying functions with "pipe", pivot tables, and joins. I'll be back tomorrow with solutions, including the Jupyter notebook I used to develop my solutions.

  • Create a data frame from each of the three CSV files.
  • Use Seaborn to plot total US unemployment over the years. The x axis should contain the final two digits of each year. The y axis should be the percentage of unemployment reported.