Exploring the Link Between GDP and Life Expectancy: A Global Perspective

Favour Osawaru
6 min readFeb 7, 2024

--

In this data visualization project, I set out to explore the intricate relationship between Gross Domestic Product (GDP) and life expectancy across six diverse countries. GDP, a measure of a nation’s economic output, has long been associated with the well-being and quality of life of its citizens. By examining data from the World Health Organization and the World Bank, I aim to uncover insights into how changes in a country’s economic status can influence the longevity of its population.

this is a link to the GitHub code: Data-science/life_expectancy_gdp.ipynb at life_expenancy · favour-osawaru/Data-science (github.com)

Background Information:

Gross Domestic Product (GDP): GDP represents the total monetary value of all goods and services produced within a country’s borders in a specific time period, typically measured annually or quarterly. It serves as a critical indicator of a nation’s economic health and growth potential. A higher GDP can indicate a stronger economy, increased income, and improved standards of living.

Life Expectancy: Life expectancy is the average number of years a person is expected to live, often measured at birth. It is a vital indicator of a nation’s overall health and well-being, reflecting access to healthcare, nutrition, sanitation, and socio-economic conditions.

Data Sources:

For this project, I collected data from trusted sources, including:

  1. World Health Organization (WHO): The WHO provides comprehensive data on life expectancy for various countries. This dataset offers valuable insights into global health trends.
  2. World Bank: The World Bank offers extensive economic data, including GDP figures for nations worldwide. These statistics are fundamental for understanding economic development.

Further Research:

To enhance the depth of this analysis, I conducted additional research on the following topics:

  1. Factors Influencing Life Expectancy: I delved into the various factors influencing life expectancy, such as healthcare infrastructure, access to clean water, sanitation, and lifestyle choices. Understanding these factors is crucial for contextualizing the data.
  2. Economic Indicators: In addition to GDP, I explored other economic indicators that could potentially impact life expectancy, such as income inequality, employment rates, and education levels.

The Six Selected Countries:

  1. United States
  2. China
  3. Chile
  4. Germany
  5. Zimbabwe
  6. Mexico

Data Preprocessing and Exploration:

Before diving into the visualization and analysis, I carefully prepared and cleaned the data, ensuring its quality and consistency. Exploratory Data Analysis (EDA) helped me identify trends, outliers, and patterns in the datasets.

Data Visualizations:

Utilizing the power of Python libraries, Seaborn and Matplotlib, I created a series of informative visualizations. These visualizations include scatter plots, line charts, and boxplots, all aimed at revealing insights into the relationship between GDP and life expectancy.

Visualization 1: The Box plot of the life expectancy distribution by country

The life expectancy at birth (in years) for six different countries presents an intriguing contrast. Germany leads the group with the highest life expectancy, standing at approximately 79.66 years. Following closely behind is Chile, with a life expectancy of about 78.94 years. The United States of America ranks third among these nations, boasting a life expectancy of approximately 78.06 years. In contrast, Mexico’s life expectancy is notably lower, at approximately 75.72 years. Further down the list, China exhibits a life expectancy of around 74.26 years, while Zimbabwe shows the lowest life expectancy among the group, standing at a starkly lower figure of approximately 50.09 years. This range of life expectancies reflects diverse socio-economic and healthcare landscapes across these countries, influenced by factors such as access to healthcare, public health policies, socio-economic status, and environmental conditions. These statistics underscore the significant disparities in health outcomes and highlight the need for targeted interventions to address health inequalities on both regional and global scales.

From the chart, we can observe various trends:

  • Zimbabwe has a significantly lower life expectancy than the other nations, starting just above 45 years in 2000 and increasing to around 60 years by 2014.
  • The United States, Germany, and Chile show relatively high and stable life expectancies, with slight increases over the years.
  • China and Mexico also show an upward trend in life expectancy, with China having a slightly higher life expectancy than Mexico throughout the period.
  • Overall, there is a positive trend in life expectancy for all countries, with Zimbabwe showing the most significant increase.

The trends in the chart can be described as follows:

  • The United States of America (Purple line) has the highest GDP across the entire time span, showing a steady increase with the value exceeding 1.5 trillion by 2014.
  • China (Orange line) shows a very significant growth in GDP, starting from just under 0.25 trillion in 2000 to approaching 1.75 trillion by 2014, which is a steep upward trend.
  • Germany (Green line) has a relatively stable and modest growth, maintaining its position just under 0.5 trillion throughout the period.
  • Chile (Blue line), Mexico (Red line), and Zimbabwe (Brown line) show much lower GDP values compared to the others. Chile and Mexico have a slight upward trend, while Zimbabwe’s GDP appears relatively flat and close to zero when compared to the scale of others.

The chart indicates strong economic growth for China, steady growth for the United States and Germany, and more modest increases for Chile and Mexico. Zimbabwe’s economy, in contrast, is depicted as stagnant or growing very slowly, with its GDP remaining significantly lower than the other countries depicted.

From the histogram, we can observe:

  • The bins in the range of 45 to 60 years are less frequent, which corresponds to Zimbabwe’s life expectancy in the earlier years. As time progressed, Zimbabwe’s life expectancy increased, which would contribute to the higher counts in the subsequent bins.
  • The bins from 75 to 80 years have the highest frequency, suggesting that for the majority of the time span, the other countries (Chile, China, Germany, Mexico, and the United States) had life expectancies within this range. Since these countries have higher life expectancies and the data likely spans multiple years, each country contributes multiple data points to these bins.
  • The distribution indicates that while there is an occurrence of lower life expectancy rates, the overall trend across these six nations favors a higher life expectancy, with most data points being in the 70–80 year range.

This histogram provides a visual summary of the life expectancy data points collected over time, and it reinforces the observation from the line chart that, overall, life expectancy has been improving or remaining stable at a high level for most of the countries in the dataset.

Visualization Description:

  • Six separate scatter plots for six different countries, each plotting GDP (X-axis) against life expectancy at birth (Y-axis).
  • Each dot represents an observation for a given year.
  • Distinct colors are used for each country to differentiate the data points.

Insights Gathered:

  • There is a general positive correlation between GDP and life expectancy for all countries, suggesting that as economies grow, people tend to live longer.
  • The rate of increase in life expectancy differs between countries, with some showing signs of leveling off, especially at higher GDP levels.
  • Zimbabwe’s data points indicate a lower life expectancy overall, with variations that suggest factors other than GDP are affecting health outcomes significantly.

Inter-country Comparisons:

  • Wealthier nations such as Germany and the USA show a trend where life expectancy starts to plateau, indicating that wealth’s impact on longevity might be limited after a certain threshold.
  • The spread and density of data points vary, with countries like China showing a wide range of GDP growth and corresponding increases in life expectancy, likely reflecting rapid economic development and improvements in public health.

Intra-country Observations:

  • The data for each country may indicate different historical and socioeconomic contexts, such as policy changes, healthcare system improvements, or international economic events.
  • For example, China’s significant economic growth is reflected in its wide GDP spread, and the corresponding increase in life expectancy suggests that the benefits of economic growth have translated into better health outcomes.

--

--