# Population & economy

*Put local demand in context.*

Eight of the World Bank's most used yearly series for every economy since 1960, in long format: population and its growth, urban share, life expectancy, GDP and GDP per capita, Internet users, CO2 per capita. One row per economy, indicator and year where the Bank has a value. Regional and income aggregates are included and flagged.

## At a glance

| | |
|---|---|
| Table | `pubdata.population.world_bank_indicators` |
| Category | Population · Population, Country, Time series |
| Rows | 119,657 |
| Size | 1.1 MB in 1 data file(s) |
| Iceberg format | v2 |
| Last refreshed | 2026-10-10T12:50:56Z |
| Source version | worldbank lastupdated 2026-10-08 |
| Refresh cadence | monthly (replace) |
| Coverage | 217 economies plus 48 aggregates; 1960 to the latest published year |

## Origin

- **Source:** [World Development Indicators (World Bank)](https://data.worldbank.org/)
- **Licence:** CC BY 4.0
- **Attribution:** World Development Indicators, The World Bank, Creative Commons Attribution 4.0.
- **Note:** Values are revised every year; the whole table is replaced at each refresh.
- **Recipe:** `pubdata/recipes/world_bank_indicators.py` in the LakehouseBox repository; registry entry `pubdata/registry/world_bank_indicators.yaml`.

## Schema

| column | type | description |
|---|---|---|
| `iso3` | string | World Bank economy code (ISO 3166-1 alpha-3 for countries) |
| `country_code` | string | ISO 3166-1 alpha-2 (joins reference.countries); null for aggregates and Kosovo |
| `country_name` | string | the economy's name as the Bank lists it |
| `indicator_code` | string | World Bank indicator code, e.g. SP.POP.TOTL |
| `indicator_name` | string | the indicator's name |
| `year` | int | the calendar year |
| `value` | double | the value in the indicator's unit (people, %, current US$, years, t CO2e) |
| `is_aggregate` | boolean | true for regions, income groups and other aggregates |

**Join keys:** `country_code`, `iso3`, `year`.

## For agents

Long format: always filter on `indicator_code`. The latest year differs per indicator and economy; take the newest
row per key with a window rather than assuming a year. 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.

## Example SQL (DuckDB)

```sql
-- population of every country in the latest available year
SELECT country_code, country_name, year, value AS population
FROM 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 pubdata.population.world_bank_indicators
WHERE NOT is_aggregate AND year >= 2015
GROUP BY 1, 2;
```

## How to read it

Without an account, over HTTPS (the bucket is public):

```sql
INSTALL iceberg; LOAD iceberg; INSTALL httpfs; LOAD httpfs;
-- anonymous: the bucket is public, requests go unsigned, through the public-data cache
CREATE OR REPLACE SECRET pubdata (TYPE S3, ENDPOINT 'lakehousebox-public-data.b-cdn.net', URL_STYLE 'path', REGION 'us-east-1');
CREATE OR REPLACE VIEW world_bank_indicators AS SELECT * FROM iceberg_scan('s3://commons--pubdata/population/world_bank_indicators');
SELECT * FROM world_bank_indicators LIMIT 10;
```

With a LakehouseBox account:

```bash
# with a LakehouseBox account (any organisation): the public catalog by name, read-only
lhbox duckdb --catalog commons/pubdata     # opens DuckDB attached as `commons_pubdata`
SELECT * FROM commons_pubdata.population.world_bank_indicators LIMIT 10;
```

Public URL of the table's storage: `https://s3.lakehousebox.com/commons--pubdata/population/world_bank_indicators/`. This card: `https://lakehousebox.com/pubdata/cards/world_bank_indicators.md`; the page: https://lakehousebox.com/public-data/world_bank_indicators. Every dataset as a table: `commons_pubdata.meta.datasets`; as Markdown: https://lakehousebox.com/public-data.md.
