Visualizing Wealth: Plotting the Net Worth of the World’s Richest in Log/Log Space

5/5 - (2 votes)

The distribution of wealth, especially when it comes to the ultra-wealthy, is a subject of immense fascination and study. It can reveal patterns and insights into economic structures, inequality, and financial dynamics at the highest levels.

One of the most revealing ways to examine this distribution is through a log/log plot of the net worths of the world’s richest individuals. Here’s how to visualize the net worth of the top 100 richest people using Python, providing a step-by-step guide to create a log/log space plot.

Understanding the Data

πŸ’° The dataset consists of the net worths of the top 100 richest people in the world. This information is often available from financial news outlets and wealth-tracking websites. For the purpose of this demonstration, assume we have this data in a list where each value represents an individual’s net worth in billions of dollars.

Here’s a sample from the data:

Why Log/Log Space?

A log/log plot is particularly useful for data that spans several orders of magnitude, as it does with the world’s wealthiest individuals. This type of plot can help to linearize exponential relationships, making it easier to identify patterns that might not be apparent in a linear plot. For wealth distributions, which often follow a power law, log/log plots can highlight the underlying distribution’s scale-free nature.

Preparing for the Plot

Before plotting, ensure you have Python installed on your system along with the necessary libraries: Matplotlib for plotting and NumPy for numerical operations.

If you haven’t already, you can install these libraries using pip:

pip install matplotlib numpy

The Python Script

First, import the necessary libraries:

import matplotlib.pyplot as plt
import numpy as np

Assuming you have the net worth data in a list named net_worths in billions of dollars, you can prepare your data.

For ease of reproducibility, I’ll include my list at the point of writing here:

net_worths_float = [
    234.0, 156.0, 155.0, 126.0, 125.0, 124.0, 118.0, 117.0, 116.0, 116.0,
    87.8, 84.6, 82.4, 74.3, 72.6, 70.6, 69.6, 67.8, 63.2, 61.7, 61.6, 59.4,
    50.5, 50.5, 42.3, 41.3, 41.3, 40.0, 39.9, 39.1, 38.8, 37.0, 36.1, 36.0,
    35.2, 35.1, 34.2, 32.9, 32.0, 31.9, 31.9, 31.5, 30.1, 29.5, 29.3, 29.2,
    28.9, 28.5, 28.0, 27.9, 27.9, 27.7, 27.3, 27.1, 26.6, 26.5, 26.5, 25.9,
    25.1, 23.9, 23.9, 23.4, 23.2, 23.2, 23.0, 22.6, 22.3, 22.1, 21.8, 21.6,
    21.5, 21.5, 21.4, 21.4, 21.3, 21.2, 20.6, 20.6, 20.4, 20.3, 19.9, 19.7,
    19.6, 19.1, 19.0, 18.9, 18.8, 18.8, 18.5, 18.5, 18.5, 18.5, 18.4, 17.7,
    17.6, 17.6, 17.5, 17.2, 17.2, 17.2
]

If your data isn’t sorted, sort it in descending order:

net_worths = sorted(net_worths, reverse=True)

Next, create a rank for each individual based on their position in the sorted list. The richest person gets rank 1, the second richest gets rank 2, and so on:

ranks = np.arange(1, len(net_worths) + 1)

Plotting the Data

Now, you’re ready to plot the data in log/log space:

plt.figure(figsize=(10, 6))
plt.loglog(ranks, net_worths, marker='o', linestyle='-', color='b')
plt.xlabel('Rank (log scale)')
plt.ylabel('Net Worth in Billions (log scale)')
plt.title('Net Worth of the Top 100 Richest People (Log/Log Space)')
plt.grid(True, which="both", ls="--")
plt.show()

This code snippet will generate a log/log plot of the net worths. The loglog function from Matplotlib is used to automatically scale both axes to a logarithmic scale. Markers are added for each point to clearly delineate the individual net worths, and a grid is added for better readability.

Interpreting the Plot

In the resulting plot, each point represents an individual’s net worth plotted against their rank. A straight line in a log/log plot indicates a power law distribution, common in wealth distributions and many natural phenomena. The slope of this line (if it appears roughly straight) can give you the power law’s exponent, offering deeper insights into the inequality of wealth distribution.

This visualization technique is not just limited to financial data; it can be applied to any dataset that spans multiple orders of magnitude and is suspected to follow a power law or similar distribution. Whether you’re a data scientist, economist, or simply a curious observer, plotting data in log/log space can unveil patterns and relationships that are not immediately visible in traditional linear plots.

Follow Up Analysis

For instance, you can examine the cumulative net worth as people are sampled from this distribution:

Also, check out our Finxter article:

πŸ‘‰ 8 Millionaire Tips to Reach Financial Freedom as a Coder