Taking a look at GDP and Life Expectancy Data

Gavin Whelan
3 min readSep 6, 2023

--

I’m currently taking a course in Data Science on Codecademy.com; this project is a part of that course. (That’s not to say I don’t have anything interesting to say, just like to be honest about why I undertook this in the first place).

I used data collected by World Bank and the World Health Organization, provided by Codecademy for the project. It’s interesting, if limited: GDP and Life Expectancy at Birth for 6 countries (Chile, USA, Mexico, Germany, China, and Zimbabwe). GDP (gross domestic product) is measured in US Dollars, and the data is annual from 2000 to 2015, giving each country sixteen years of data.

So I thought, starting out the project: what can I say about this time period? The 2008 global recession was an obvious choice — I assumed both GDP and life expectancy would have taken a significant hit after the US housing market crashed, and those effects rippled across the global economy. Here’s what I found, starting with GDP:

For GDP, we get a pretty significant down-tick in the USA, one that’s somewhat visible in Germany, maybe one in Mexico? It’s hard to tell because the scale is so different, so I plotted each separately.

This is easier to read by a long shot. We see that same hit that the USA took after 2008, but similar hits in Germany, Chile, and Mexico. China kept going up, but it slowed for a few years, maybe feeling the damage less due to its reliance on its own manufacturing.

Take a look at Zimbabwe, though. Its GDP absolutely skyrocketed after 2008, no question about it. Bizarre . I have two theories as to why, the second of which I prefer.

First, it could be that Zimbabwe was helped by manufacturers looking for cheaper labor — with a lower GDP, it could have pounced on this opportunity.

My favorite explanation, though, hinges on the fact that these GDP measurements are scaled in USD. That’s far from a stable metric, with inflation changing the value year to year. Maybe Zimbabwe, a relatively small player on the global stage judging by the first chart (the nation had the lowest GDP by far and across the board), wasn’t particularly closely tied to the economy of the US (as the recession was caused by the US housing market crash). This would have caused the value of Zimbabwean currency to shoot up in comparison.

A deeper dive would take more research, of course.

One more graph: this time of Life Expectancy:

We see a few down-ticks here, in Chile and Mexico, but not much else of note. I could theorize, but it’s hard to even call this a trend, much less try to justify it, so I’ll leave it as “I couldn’t tell anything interesting looking at this”.

That may be an anticlimactic note to end on, but I’m encouraged by the finding about GDP. I’m much more interested in Zimbabwean economics now, and I’m looking forward to learning how to implement calculus in Python later in this same course, so that I can analyze trends in more detail.

Until then, adieu.

--

--