twoHelixestwoHelixes Start free

Datasets / World food and health

Income against obesity, latest year with both

Both measures come from the one latest year where a country has both an income and an obesity figure, so the scatter compares countries in the same year instead of mixing vintages.

Question does income track obesity in the latest year?
GDP per capita against obesity0204060801964.452312621.40852861.8364016.341810468.26616393.86394803.671861.3987180.9873Gdp Per Capita Ppp
World food and health — 186 rows charted from 7,485, drawn as a scatter
How it decided
Finding the data12 ms

World food and health: 7,485 rows, 7 columns. country, gdp_per_capita_ppp and obesity_pct in the latest shared year.

Shaping the data8 ms

7,485 rows in, 186 out across 3 columns. Both measures come from the one latest year where a country has both an income and an obesity figure, so the scatter compares countries in the same year instead of mixing vintages.

Choosing the chart7 ms

scatter. Two measures, no category and no time: a scatter of one point per country makes the relationship itself the chart.

Applying defaults1 ms

Palette, spacing, axis titles and legend placement applied. 0 issues found.

The transformation

This is the code, not a description of it — the chart above was drawn from what it returns, and the notebook download runs the same lines against the same file.

usable = df.dropna(subset=["gdp_per_capita_ppp", "obesity_pct"])
latest = usable["year"].max()
result = usable[usable["year"] == latest][["country", "gdp_per_capita_ppp", "obesity_pct"]]

What it charted

186 rows out of 7,485, 3 columns. First 8 shown.

countrygdp_per_capita_pppobesity_pct
Afghanistan1964.452318.7741
Angola8752.79811.7797
Albania21640.98427.2673
Andorra66232.7419.5468
United Arab Emirates69701.7930.2821
Argentina26771.96538.0566
Armenia20078.78528.567
Antigua and Barbuda29298.64635.4071