← All datasets

World Population Panel

A CodeSights flagship and the platform's first longitudinal panel: 11,792 country-year observations across 391 state entities, assembled from Wikidata's point-in-time statements, the registry trick applied to time itself. Rows are observations, not countries, so the dataset teaches long format by existing: every census and estimate recorded as a dated population statement becomes a row keyed by country and year, joined where the graph carries them with dated life expectancy (1960-2025), nominal GDP and HDI. Panel data is the teaching unicorn, and the classics fall out in one groupby each: fixed effects, within-country variation, the demographic transition (post-2015 life expectancy beats pre-2000 by more than five years, by test), and HDI tracking longevity at correlation above 0.7, also by test. Former states are first-class citizens flagged Y: the Soviet Union's 1989 census counts 293 million people in a country that no longer exists, because historical states hold censuses too and live in their own Wikidata class, rejoined deliberately. The anchors are exact: the US 2020 census at precisely 331,449,281, India's 2011 at 1.221 billion. Canada owns the longest series at 188 years of observations; the United Kingdom's 153-year population series rises monotonically by test. The panel key (country, year) is unique by test, ISO3 codes cover 97 percent of rows for easy joining to any external source, and the guards are demographic common sense: no population above 1.6 billion, life expectancy between 15 and 95, HDI in the unit interval. Twelve acceptance tests.
11,792 rows 1 file last pulled 2026-10-13
Observations 11,792 rows × 9 columns
CountryCountry_IDISO3YearPopulationLife_ExpectancyGDP_Nominal_USDHDIFormer_State

Questions and answers

What is the World Population Panel dataset?

A CodeSights flagship and the platform's first longitudinal panel: 11,792 country-year observations across 391 state entities, assembled from Wikidata's point-in-time statements, the registry trick applied to time itself. Rows are observations, not countries, so the dataset teaches long format by existing: every census and estimate recorded as a dated population statement becomes a row keyed by country and year, joined where the graph carries them with dated life expectancy (1960-2025), nominal GDP and HDI. Panel data is the teaching unicorn, and the classics fall out in one groupby each: fixed effects, within-country variation, the demographic transition (post-2015 life expectancy beats pre-2000 by more than five years, by test), and HDI tracking longevity at correlation above 0.7, also by test. Former states are first-class citizens flagged Y: the Soviet Union's 1989 census counts 293 million people in a country that no longer exists, because historical states hold censuses too and live in their own Wikidata class, rejoined deliberately. The anchors are exact: the US 2020 census at precisely 331,449,281, India's 2011 at 1.221 billion. Canada owns the longest series at 188 years of observations; the United Kingdom's 153-year population series rises monotonically by test. The panel key (country, year) is unique by test, ISO3 codes cover 97 percent of rows for easy joining to any external source, and the guards are demographic common sense: no population above 1.6 billion, life expectancy between 15 and 95, HDI in the unit interval. Twelve acceptance tests.

How big is the World Population Panel dataset?

11,792 rows in one CSV file, with 9 columns in total: Country, Country_ID, ISO3, Year, Population, Life_Expectancy, GDP_Nominal_USD, HDI, Former_State.

Where does the data come from?

It is built by programmatically scraping wikidata.org, last pulled on 2026-10-13. Datasets are versioned; older versions stay downloadable.

Is the dataset free to download?

Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.

Can I see the code that built this dataset?

Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.

How do the files join?

Long-format panel: one row per (Country, Year); pivot or group by either. ISO3 joins external datasets; Country_ID joins other CodeSights topics.

Can the data contain errors?

Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.

Browse every free dataset on CodeSights