Skip to content

Bamboo Weekly #175: Inflation

Get better at: scraping, pivot tables, Plotly, regular expressions, and joins.

Bamboo Weekly #175: Inflation

[Administrative note: I'm very excited to share my new LernerPython practice system, which lets you solve Python, Pandas, and Git exercises in your browser — no installation necessary! All exercises at LernerPython.com now use this, and I'll be using it in my corporate training, as well. You can get a preview, with five free exercises, at https://practice.lernerpython.com/. Tell me what you think, and where/how it can improve!]

If you feel like things are costing more than they used to, you're right: Inflation has come back, and it's as unpopular as ever. It's not fun to see everything – from gasoline to food to hotels to restaurants – raising their prices.

Paul Krugman has noted that when both inflation and wages go up, people tend to say that they deserved the pay hike, but that inflation is someone else's fault. Of course, the two go hand in hand; when prices go up, people ask for more money, and vice versa. But at least in the US, recent reports have indicated that inflation is rising faster than wages, which means that people's effective purchasing power is declining over time.

I thought that it might be interesting to look at inflation as measured by the Organization for Economic Cooperation and Development (OECD), what the Economist calls "a club of mostly-rich countries." The OECD collects, analyzes, and distributes data on a variety of topics, including inflation.

This week, we'll look at inflation numbers from a variety of OECD countries. We'll see where inflation is rising, and how it looks in historical context.

Data and six questions

To retrieve the data, go to the OECD data explorer, and choose the consumer price indices. From there, select:

Download that as a filtered CSV file, which can come from:

https://sdmx.oecd.org/public/rest/data/OECD.SDD.TPS,DSD_PRICES_COICOP2018@DF_PRICES_C2018_ALL,1.0/.M.N.CPI.PA._T+CP045_0722+GD+CP041T043+CP041T043X042+_TXCP01_NRG+SERVXCP041_042_0432+SERVXCP041_0432+SERV.N.GY?startPeriod=2006-06&dimensionAtObservation=AllDimensions&format=csvfilewithlabels

Paid subscribers, both to Bamboo Weekly and to my LernerPython+data membership program (https://LernerPython.com) get all of the questions and answers, as well as downloadable data files, downloadable versions of my notebooks, one-click access to my notebooks, and invitations to monthly office hours.

Learning goals for this week include working with CSV files, dates and times, grouping, joins, pivot tables, correlations, and plotting with Plotly.

Here are my six questions for this week. I'll be back tomorrow with my solutions and explanations: