Join GDP and life expectancy correctly for a scatter plot

Join the two indicators on country code and year, never on row position.

Join GDP and life expectancy correctly for a scatter plot. Explore the public-data example; methods and data notes are below.
Explore the public-data example; methods and data notes are below.Download chart SVG

The direct answer

Join the two indicators on country code and year, never on row position. Each point must pair income and life expectancy for the same country in 2023. A row-order join can create a convincing relationship from incorrectly paired observations.

Prepare the observation table

Use GDP per capita in constant 2021 international dollars at purchasing power parity, with life expectancy in years. Exclude incomplete pairs together and retain country labels. In Scatter, map gdp_ppp_per_capita to X, life_expectancy_years to Y and country to Point label.

Public dataset and a reproducible example

The download is a prepared extract, not a live data connection. The source links below include the original query, observation period and reuse policy. Keep an original copy when you update the data; revised source values can change the result.

World Bank WDI values retain the indicator units and country-year definitions. Derived counts and indexes are Datamon tutorial calculations, not new official World Bank statistics.

Snapshot retrieved: 2026-10-26. Prepared rows: 10.

Download the prepared CSVDownload the reference SVG

First five rows from the prepared public-data extract; blank cells remain missing.
iso3countryyeargdp_ppp_per_capitalife_expectancy_years
CHNChina202322687.251953432877.953
DEUGermany202363140.194909966981.0414634146342
IDNIndonesia202313889.949501285871.146
INDIndia20238870.5502760934572.003
JPNJapan202347387.217254252384.0412195121951

Build it in Datamon

Sign in with Google to create an editable visualization. Public articles and examples can be read without an account. The prepared CSV already contains the joins, filters or aggregations described above; do those steps in a spreadsheet first when using your own data.

  1. Open Data and choose a file, or paste the table with its header row. Check the detected numeric columns, decimal separator and dates. The current importer accepts files below 20 MB; these examples are smaller. Keep blanks distinct from recorded zeros.
  2. In Visualize, select Scatter plot. Connect the roles exactly as listed below. Review the preview against at least two rows in the example table rather than relying only on automatic mapping.
  3. In Refine, add a title that states the question, the unit, observation period and source. Check labels and contrast at the size your reader will see. Keep a table when exact values matter.
  4. Use the export controls for SVG, PNG, PDF or PowerPoint, then inspect the actual file. Save an editable project backup. Publish only after checking the underlying values: a public link makes the published data available to anyone possessing the URL.

Calculation and column mapping

The rule below is pseudocode. The downloadable CSV already contains the prepared values; spreadsheet functions and cell references depend on your sheet layout.

JOIN indicators ON iso3 AND year; retain complete pairs
X
gdp_ppp_per_capita
Y
life_expectancy_years
Point label
country

Read the result

In this extract, life_expectancy_years ranges from 69.83 (PHL) to 84.04 (JPN).

Use the preview to check the structure and the CSV to check exact values. Its styling is a reference; your Datamon rendering can look different. Follow the mapping and preparation above to reproduce the analytical meaning.

Mistakes that change the meaning

The ten selected countries are a teaching sample, not a random global sample. Country-level association does not establish that increasing income by a given amount causes a particular gain in years of life.

Questions before sharing

Do these calculations require an AI service?

No. The prepared CSV and reference calculation are deterministic. Optional AI can help draft an explanation when configured, but it does not replace checking source values or choosing a valid comparison.

Can I use this example with my own spreadsheet?

Yes. Keep the same observation unit, column types and calculation. Replace the source attribution and time period, recompute derived columns, then compare several output values with your original sheet before sharing.

What is free and what needs an account?

Reading this guide and downloading its CSV and chart images are free. Datamon currently has no paid checkout or subscription plans in this deployment. Creating and saving an editable visualization requires Google sign-in. Provider-backed AI, cloud analysis, publishing and video depend on configured services; this guide does not promise unlimited free connected services.

Sources and further reading

Report a correction or an access barrier: Email the editorial contact.

Open Datamon