Field note · June 23, 2023
Five minutes with gdp_per_capita_usd in world-indicators
720 rows, 719 distinct values, and the one fact about gdp_per_capita_usd that changes how you query it.
Someone asked what is in gdp_per_capita_usd on world-indicators, and the honest answer took one query.
720 rows, no nulls, 719 distinct values. GDP per capita, constant dollars.
The five-number version: min 1,822, p10 3,193, median 20,761, p90 60,349, max 140,012. The mean is 26,959.
The p10 to p90 band — 3,193 to 60,349 — is where ordinary rows live, and it is the pair worth quoting when somebody asks what to expect. Min and max describe the two strangest rows in the table and nothing else; they are useful for spotting impossible values and misleading for everything else.
select
count(*) as rows,
count(gdp_per_capita_usd) as present,
count(*) - count(gdp_per_capita_usd) as nulls,
count(distinct gdp_per_capita_usd) as distinct_values
from world_indicators;The mean sits 30% above the median, which is the whole story: anything that reports the average of gdp_per_capita_usd is reporting a number most rows are below. Put the median next to it or drop the mean.
Where this bites: a filter like gdp_per_capita_usd > 26,959 reads as "above average" and selects a minority of rows — a smaller minority than the phrase suggests to whoever asked for it. If the request was "the typical ones", the threshold they meant was 20,761.
The grain is one row per country per year, which is the context every one of those numbers depends on. None of them survive a change of grain, which is why "profile the column" and "profile the table" are the same job. Full schema, and the CSV, on the dataset page.