Skip to content

Choose map classes from the data distribution

badgeospatialjudgmentMonmonier 2018 p. 173Slocum 2023 p. 89Slocum 2023 p. 88Brewer 2024 p. 449

How does life expectancy differ between world regions?

Plotly Express Gapminder dataset, country life expectancy in 2007 across 142 countries.

“Arbitrary selection of breaks between categories might mask a clear, coherent trend”

Mark Monmonier, "How to Lie with Maps", third edition (cited by page of the library PDF), p. 173.

Also covered in Slocum 2023 (5 Data Classification, p. 89), Slocum 2023 (5 Data Classification, p. 88), Brewer 2024 (9 Color on Maps, p. 449).

CVD preview

Before

Round breaks at 45 and 80 years put nearly every country in the middle class, so the map shows almost one color.

Download before Python code

After

Five classes of 28 or 29 countries each follow the data, and the title names the method.

Download after Python code

Values

Life expectancy ranges from 39.6 years in Swaziland to 82.6 years in Japan.

The lowest class covers most of sub-Saharan Africa, and the highest covers Western Europe, Japan and Australia.

Values used in both views
ISOCountryLife expectancy in 2007 (years)
JPNJapan82.6
HKGHong Kong, China82.2
ISLIceland81.8
CHESwitzerland81.7
AUSAustralia81.2
ESPSpain80.9
SWESweden80.9
CANCanada80.7
FRAFrance80.7
ISRIsrael80.7