Population · Public data

Population & economy

Put local demand in context.

World Development Indicators (World Bank) · CC BY 4.0 · commons_pubdata.population.world_bank_indicators

Read Markdown
World population 1960–2025, the sum of the countries.
World population 1960–2025, the sum of the countries.

Query it with DuckDB.

Bash
lhbox duckdb --catalog commons/pubdata
SQL · Population of every country in the latest available year
SELECT country_code, country_name, year, value AS population
FROM commons_pubdata.population.world_bank_indicators
WHERE indicator_code = 'SP.POP.TOTL' AND NOT is_aggregate
QUALIFY row_number() OVER (PARTITION BY iso3 ORDER BY year DESC) = 1
ORDER BY population DESC LIMIT 10;

Read it where you work.

Public, read-only data. With an account, lhbox duckdb attaches the catalog as commons_pubdata; an agent with the LakehouseBox connector opens it with open_public_catalog("commons/pubdata"). Without one, DuckDB reads the public files directly.

Example queries

  • Population of every country in the latest available year
    SELECT country_code, country_name, year, value AS population
    FROM commons_pubdata.population.world_bank_indicators
    WHERE indicator_code = 'SP.POP.TOTL' AND NOT is_aggregate
    QUALIFY row_number() OVER (PARTITION BY iso3 ORDER BY year DESC) = 1
    ORDER BY population DESC LIMIT 10;
  • Pivot two series side by side
    SELECT iso3, year,
           max(value) FILTER (WHERE indicator_code = 'SP.POP.TOTL') AS population,
           max(value) FILTER (WHERE indicator_code = 'NY.GDP.PCAP.CD') AS gdp_per_capita_usd
    FROM commons_pubdata.population.world_bank_indicators
    WHERE NOT is_aggregate AND year >= 2015
    GROUP BY 1, 2;

Know your columns.

ColumnTypeMeaning
iso3stringWorld Bank economy code (ISO 3166-1 alpha-3 for countries)
country_codestringISO 3166-1 alpha-2 (joins reference.countries); null for aggregates and Kosovo
country_namestringthe economy's name as the Bank lists it
indicator_codestringWorld Bank indicator code, e.g. SP.POP.TOTL
indicator_namestringthe indicator's name
yearintthe calendar year
View all 8 columns
valuedoublethe value in the indicator's unit (people, %, current US$, years, t CO2e)
is_aggregatebooleantrue for regions, income groups and other aggregates

Join keys: country_code, iso3, year.

Before you query.

  1. Long format: always filter on indicator_code.
  2. The latest year differs per indicator and economy; take the newest row per key with a window rather than assuming a year.
  3. The indicator codes: SP.POP.TOTL population, SP.POP.GROW growth %, SP.URB.TOTL.IN.ZS urban %, SP.DYN.LE00.IN life expectancy, NY.GDP.MKTP.CD GDP US$, NY.GDP.PCAP.CD GDP per capita US$, IT.NET.USER.ZS Internet users %, EN.GHG.CO2.PC.CE.AR5 CO2 per capita.

Source & licence.

Source
World Development Indicators (World Bank)
Licence
CC BY 4.0
Attribution
World Development Indicators, The World Bank, Creative Commons Attribution 4.0.
Coverage
217 economies plus 48 aggregates; 1960 to the latest published year
Refresh
monthly, the whole table replaced; source version worldbank lastupdated 2026-10-08
Table
commons/pubdata · population.world_bank_indicators · Iceberg v2 · browse the catalog
Recipe
pubdata/recipes/world_bank_indicators.py, registry entry pubdata/registry/world_bank_indicators.yaml

Source: World Development Indicators (World Bank) · CC BY 4.0 · Snapshot shown: 10 Oct 2026HTML for people. Markdown for agents.