BW #62: Economic report card
The IMF just released their report about the world economy, including measurements and predictions for countries around the world. Who is doing well, and who isn't, among the G20?
The world economy continues to be rattled by ... well, by lots of different things, including continued echoes from the covid-19 pandemic and regional instability. But are things really that bad? How much should we worry?
Earlier this week, the International Monetary Fund (IMF, https://imf.org) released its latest report and predictions regarding the state of the world economy. You can read the full report, or just an executive summary from the report's home page, here:
https://www.imf.org/en/Publications/WEO/Issues/2024/04/16/world-economic-outlook-april-2024
I thought that it would be interesting to look at the data they provided, and understand their analysis and predictions. We'll especially look at G20 countries, to see who is doing better (and worse) at handling economic issues on a variety of fronts.
Data and seven questions
This week, we'll look at the data that the IMF provides on this page:
https://www.imf.org/en/Publications/WEO/weo-database/2024/April/download-entire-database
This includes information about all of the countries, measurements, and years that the IMF analyzes and discusses in their report. The Web site claims that the file is in tab-delimited CSV format, but let's just say that this isn't true.
This week's learning goals include: Handling stubborn files, working with multi-indexes, grouping, and plotting.
Here are my seven tasks and questions for this week:
- Download the full database from the IMF. If you're like me, you'll find that you have to jump through a number of hoops in order to get it loaded into Pandas. (I've never seen anything like this before, to be honest, and I'm surprised that the IMF distributed such a weird file.) Create the data frame such that it has a multi-index made up of the "Country" and "Subject Descriptor" columns, and the dtype of every column with a year heading is a float type.
- Which five countries had the lowest inflation (i.e., "Inflation, average consumer prices" where the units are "Percent change") in 2023? (Is that necessarily good?) Which countries had the highest inflation in 2023?