How to Use Census Microdata
A practical guide to accessing individual-level census records through IPUMS International and national data archives — covering sample design, variable selection, applying weights, and computing demographic statistics you cannot get from published tables.
Overview
Published census tables show pre-computed statistics in standard categories: population by age and sex, by administrative unit, by education level. They answer the questions statisticians decided to answer in advance. Census microdata — the individual-level records behind those tables — let you answer any question the survey was capable of answering.
This guide focuses on IPUMS International as the primary access point for global census microdata, but the principles apply equally to national archives such as the US Census Bureau's PUMS files, the UK Data Service, and Statistics Canada's Data Liberation Initiative.
Step 1 — Understand when microdata is the right tool
Microdata is the right tool when:
- You need cross-tabulations not published in official tables (e.g., fertility by education and region simultaneously)
- You need to run regression models on individual-level data
- You want to compare sub-groups across countries using harmonised variables
- You want to construct custom age groups or geographic aggregations
Microdata is not the right tool when published aggregate tables are sufficient, when you need small-area (below regional) statistics, or when you only need a few standard indicators that are available from World Bank WDI or UN WPP without downloading and processing large files. See How to Use World Bank Population Data for the simpler case.
Step 2 — Access microdata through IPUMS or national archives
IPUMS International
international.ipums.org — Harmonised census microdata from 100+ countries, 300+ censuses. Variables are standardised across countries (e.g., AGE means the same thing in Brazil 2010 and Kenya 2009). Free registration; research statement required. Downloads in CSV, fixed-width, Stata, SAS, or SPSS formats.
US Census Bureau PUMS
American Community Survey (ACS) 1-year and 5-year Public Use Microdata Sample files at census.gov/programs-surveys/acs. No registration required. Updated annually. Finest geography: Public Use Microdata Areas (PUMAs, ~100,000 population).
UK Data Service
ukdataservice.ac.uk — UK Census microdata from 1971–2021 and a wide range of social surveys. Free to UK academic researchers; international researchers can access most datasets with registration.
IPUMS USA
usa.ipums.org — Harmonised US census and ACS microdata from 1850–present. The deepest historical time series of any national census microdata archive. Essential for historical demographic research.
Step 3 — Select variables and understand sample design
In IPUMS, data is selected through an online extract system. You choose:
- Samples: Which countries and census years to include
- Variables: Which variables to include in your extract (person-level and household-level)
- Output format: CSV, Stata, SPSS, etc.
Essential variables to always include:
PERWT Person weight — multiply all person-level statistics by this variable
HHWT Household weight — multiply all household-level statistics by this variable
SERIAL Household identifier — links people to their household
GEOLEV1 First-level administrative geography (region, state, province)
Census microdata are samples — typically 5%, 10%, or 20% of all census records. The sample fraction is stated in the IPUMS documentation for each census. A 10% sample of a country with 50 million people gives 5 million records — typically more than enough for almost any sub-group analysis.
Step 4 — Compute demographic statistics from microdata
Standard demographic indicators computable from census microdata:
- Age-sex distribution / population pyramid: Cross-tabulate AGE × SEX, weighted by PERWT. Divide by total weighted count to get shares.
- Dependency ratio: (Sum of PERWT where AGE<15 or AGE>=65) / (Sum of PERWT where AGE 15–64) × 100.
- Own-children method for TFR: Count children aged 0–4 living with their mother, relate to women of childbearing age by age group, apply survival corrections. A standard indirect method when direct birth records are unavailable.
- Migration rates: If the census asked "where did you live 5 years ago?", you can compute internal migration flows between regions directly from individual records.
In R, the tidyverse + srvyr combination handles weighted microdata
cleanly. In Python, pandas with numpy broadcasting for weights is straightforward.
For large samples (>5 million rows), use data.table in R or
polars in Python for performance.
Step 5 — Handle disclosure avoidance and geographic limits
Public-use microdata have privacy protections applied that researchers must understand:
- Geographic coarsening: Location is only identified to large units (100,000+ people). Smaller geographies require application for restricted access through data enclaves.
- Age top-coding: Many censuses recode the oldest respondents (e.g., 90+) to a single category to prevent identification.
- Income top-coding: Incomes above a threshold (e.g., $250,000 in US ACS) are recoded to that threshold value.
- Small-cell suppression: Some national archives suppress cells with fewer than 5 records to prevent identification.
For restricted-access data with finer geography, most national statistical offices operate secure data enclaves where approved researchers can access uncoarsened files on-site or through remote desktops, with output subject to disclosure review before release.
For related methodology, see Vital Statistics, Population Register, and How to Understand Demographic Surveys for the full landscape of demographic data sources.
Related glossary terms and guides
Frequently asked questions
What is IPUMS International and is it free?
IPUMS International (ipums.org/international) is a project of the University of Minnesota that harmonises census and survey microdata from over 100 countries into a common variable structure. It is free to access after registering with a brief research statement. Data is available for academic, educational, and non-commercial research purposes. IPUMS also hosts US CPS, ACS, and DHS data products.
How is census microdata different from published census tables?
Published census tables show pre-computed statistics for standard geographic and demographic categories. Microdata gives you individual-level records, allowing you to compute statistics for any combination of variables and geographies not included in published tables — for example, age-specific employment rates by education level and region, or household composition patterns among recent immigrants.
Do I need to apply weights to census microdata?
Yes. Census microdata samples are usually not a simple random sample — some groups are oversampled or undersampled. The person weight variable (PERWT in IPUMS) corrects for this. Applying weights ensures your estimates represent the full census population, not just the sample. In R, use the survey package; in Stata, use svyset; in Python, use statsmodels or the samplics library.
Can I use census microdata for subnational analysis?
Public-use microdata typically has geography coarsened to large administrative units to protect respondent privacy. US ACS Public Use Microdata Sample (PUMS) files identify Public Use Microdata Areas (PUMAs) of 100,000+ people — smaller than a county in most urban areas. For more granular geography, researchers must apply for restricted-access data through approved data enclaves.