Field note · July 3, 2023

Five minutes with co2_tonnes_per_capita in world-indicators

720 rows, 686 distinct values, and the one fact about co2_tonnes_per_capita that changes how you query it.

1 min read ·Data quality ·quality practice

Someone asked what is in co2_tonnes_per_capita on world-indicators, and the honest answer took one query.

720 rows, no nulls, 686 distinct values. CO₂ emissions per capita.

The five-number version: min 0.43, p10 0.86, median 2.80, p90 7.50, max 15.49. The mean is 3.67.

The p10 to p90 band — 0.86 to 7.50 — 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.

sql
select
  count(*)                                as rows,
  count(co2_tonnes_per_capita)            as present,
  count(*) - count(co2_tonnes_per_capita) as nulls,
  count(distinct co2_tonnes_per_capita)   as distinct_values
from world_indicators;

The mean sits 31% above the median, which is the whole story: anything that reports the average of co2_tonnes_per_capita is reporting a number most rows are below. Put the median next to it or drop the mean.

Where this bites: a filter like co2_tonnes_per_capita > 3.67 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 2.80.

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.