Gini Index Data Visualization

Tamy
4 min readMay 3, 2022

--

At the end of my Kaggle data visualization course, there’s a Final Project for real world application. I applied some of the things I learned on the Gini Index data that the World Bank provided, and here are some findings.

The higher the number, the less equal the coefficient will be. The scale goes from 0 to 1. Or in our case, 0 to 100 percent, with 0 being perfectly equal and 100 percent where the income of one country is earned on one person.

To prepare the data, I used the most recent Gini index. Almost all of the data is from 2010 onwards. I also deleted countries which provided no data at all.

With this available data, the first thing I did was created a scatterplot based on the regions.

So this is showin somethin
so this showin somethin

We can see clearly here that some of the countries with the highest inequality are in Sub-Saharan Africa. Europe is mostly concentrated in the lower part of the figure. What surprised me was that none of the Latin America and Caribbean Regions was on the lower end of the figure. To see this more precisely, I plotted a box plot.

but this showin somethin more

So here, we can see that inequality is a big issue in Sub-Saharan Africa, and it’s definitely true for almost all the countries in Latin America, if we were to compare with other regions. The highest median Gini index is in Latin America and the Caribbean Region. What actually shocks me as well was that North America’s median is higher than most regions. Only lower to Latin America and Africa. Since the United States have been one of the top developing countries, I assumed that they would have progressed like Europe in being more equal. So I zoomed in on the two available North American countries.

if we zoom in on NA

Okay, so US is weighing down the NA region scale🤭 As we can see, Canada is pretty stable, while America just keeps getting more unequal. No surprise though, since as of April 2022, 8 of the 10 wealthiest people are Americans, and American companies make up more than half of the list of largest companies by revenue.

In my opinion, especially after reading Banerjee and Duflo’s Good Economics for Hard Times, the US is just such a perfect breeding ground for capitalism to work out its true potential. But with all that capital flowing into the country, I wonder if there’s anything that the States can do, out of humanity, to pull up the poor and lower inequality. Or maybe that’s not the point of capitalism? I’m not an economic major, and I’m ranting well beyond the goal of the post right now.

After North America, I decided to also plot my home country’s Gini index, Indonesia.

got my home country

It was a pleasant surprise to know that: One, Indonesia’s got one of the most complete data for Gini index, as well as other World Bank data that I played around with. And two, the trend is actually falling in the past decade!

I know correlation doesn’t mean causation, and there’s definitely more going on in the world and in Indonesia that may affect this than just changes of president, but I added the different periods anyways out of curiosity. If anyone can tell me how to do this in Seaborn, I’ll be grateful. Because I did this manually in MS Paint🙂

And lastly, just to add some old rivalry spice, I plotted Indonesia and Malaysia’s Gini Index.

Gini index Indonesia & Malaysia

Those were the Gini index plots. I would definitely recommend Banerjee and Duflo’s Good Economics for Hard Times. I’m still reading it, but they’ve shown so much insight and I’ve also learned about Gini index from the book. The 4 men in the bar analogy really helped me understand the measures economists use the explain the economy.

Code: https://github.com/tamysiby/project1-gini-index

Disclaimer: This project is for practice purposes, so the results from this post doesn’t necessarily reflect reality. For the purposes of practice, I only used available data. I forward filled missing data, and then deleted rows with missing data. The countries deleted may cause imbalances when comparing between regions. The empty data from other years could actually have held valuable data that doesn’t reflect on the plots. With that in mind, the conclusions are only drawn by the available data from World Bank.

Resources:

--

--

Tamy

Over explaining is my expertise:) Based in South Korea, raised in Indonesia. Enjoys observing the two countries.