15 Nov 2012

How rich are you? Did you ever wonder that? I did, so I built this little tool to tell me exactly how rich I am! The tool uses data from the South Africa 2011 Census1 and nothing is sent or stored when you use this tool.

The tool

Enter your current MONTHLY income:

My thoughts

What really hit home to me is just how much better off I am than many people in South Africa. It is very sobering.


The numbers may seem off from the 51 million people that StatsSA reported, that is because I have removed people who answered "not applicable" or "not specified" which lowered the amount of the population to 46 867 063 - still enough of a data set to play with.

If you want to understand how this works, you can see the code (in a very messy state) at BitBucket.


Diaan's picture

The payment brackets seem to be divided in to very wide bands. Income from about 25000 to 51000 all seem to fall in to the same percentage. Could you possibly add an explanation as to the nature of your data and why it would lead to such vague results?

Robert MacLean's picture

Yeah, I know the bands are massive unfortunately that is the bands of data that StatsSA has exposed from Census 2011 so far. I am hoping that a more detailed break down comes out during this month, which would allow for more fine grain control.
Colin Alston's picture

I'm guessing the census data provides population and salary bracket. This could be improved by using a linear regression over those data points with the population entering each bracket to construct a model that will provide a more accurate percentage between those numbers.

Dylan's picture

A clever bit of kit, BUT I think your numbers are a bit off simply because you look at the entire population of SA. This includes kids and retired people who don't necessarily have a monthly income, but are far better off than many of their compatriots. To give one stark example, this would mean that a farmworker earning the minimum wage of R70 a day would be "richer" than billionaire Patrice Motsepe's 9 year old. The danger here is that people might use this tool to justify paying low wages (for instance, your tool shows that a farmworker on minimum wage is in the top 32.2% of earners in the country!)

Robert MacLean's picture

You are 100% correct - the fact that the people who do not earn anything at all is so large and there is no clear information between those who can work but are unemployed and those who cannot work. Maybe filtering out those below 16 & those over 65 out would help?
bixarrio's picture

What's rather fascinating is that someone with an monthly income of 0 more earn than over 21 million people...

Robert MacLean's picture

Yeah, that is the odd batching that StatsSA has, one group that doesn't earn anything (unemployed, retired etc...) and then the next batch starts with those that earn R0 and goes up to R400.
Visitor's picture

Seems to be off slightly.

If you put your total income as R1 you get:

You are better paid than 21 036 151 people in South Africa.
That puts you in the top 55,025%.

Robert MacLean's picture

Yeah - 45% of the population doesn't earn anything. Either unemployed, retired, too young etc...
Visitor's picture

Doesn't work correctly for R -10000.

Needs more testing..

Robert MacLean's picture

I am well aware that negative numbers break it - not quite sure what situation you end up with negative incomes so if you want to give me a user story to test against will be happy to do it ;)

Add new comment