What is a Lorenz Curve?

The Lorenz curve displays economic inequality by plotting cumulative wealth against the population percentage. Its deviation from a straight diagonal line represents the level of inequality; the bigger the gap, the higher the inequality. This tool aids in understanding economic disparities.

Tools & Frameworks Used

  • Python - A friendly versatile computer language for web development and data analysis.
  • NumPy - A Python library for numerical and array operations, essential for scientific computing and data analysis.
  • Matplotlib - A Python library for making charts and graphs, commonly used for data visualization.

Lorenz Curve

In this project, NumPy and matplotlib were used to create a Lorenz curve from 2010 population data of over 200 countries. The curve illustrates how the smallest x countries contribute to total population. For instance, y(1) represents the smallest country, y(2) the two smallest, and y(N) the entire set. Both X and Y dimensions were normalized between 0.0 and 1.0 using array operations. The finalized graph, labeled and titled, was saved as "population-lorenz.png" with 200dpi resolution. The process was automated, taking data from "pop2010.npy" and producing the PNG without manual input.

Lorenz Curve