Guides
How to use census and government data
Finding the right official statistics, joining them to your own data by geography, and the margin-of-error traps that catch first-time users.
Government statistical agencies publish some of the most reliable, best-documented data available for free, and it is still routinely misused — joined at the wrong geography, treated as a hard count when it is a survey estimate, or pulled from the wrong vintage of a boundary that has since been redrawn. This guide is about handling official statistics correctly, not about any one country's politics or programs; specifics depend on the agency and the release you are working with.
Two different kinds of "government data"
Survey data — the U.S. Census Bureau's American Community Survey (ACS) is the standard example — samples the population and produces estimates with a published margin of error on every figure. Small geographies and small subpopulations carry wide margins; a tract-level median income for a population of 400 people can have a margin wider than the number itself is useful for. Always check the margin before quoting a small-area estimate as precise.
Administrative data — records generated as a byproduct of running a program, like tax filings, benefit enrollments, or federal spending records — is usually a full count rather than a sample, so it has no sampling margin of error, but it carries its own limitations: it only covers people who interact with that specific program, and its categories were designed for administering the program, not for your research question. administrative data is often the more complete source where it exists, but "complete" means complete for that program's population, not the general population.
Confusing the two is the single most common error: treating a sample-based ACS estimate as a hard count, or assuming an administrative dataset (school enrollment records, unemployment insurance claims) generalizes to everyone, when it structurally only covers people the program touched.
Geography is the join key — get the level right
Government data is published at nested geographic levels — country, state or province, county, census tract, block group — and the level you need depends on your question, not on what happens to be available. A tract typically covers 1,200–8,000 people; useful for neighborhood-level patterns, too small for reliable estimates on rare characteristics. Two joining rules that prevent the most common mistakes:
- Match the vintage of the boundary to the vintage of the data. Tract and district boundaries are redrawn periodically — after each decennial census in the U.S. — so a dataset from 2015 and a shapefile from 2024 may not describe the same geographic area under the same ID, especially in fast-growing areas that got split into multiple tracts.
- Geocode your own data to the same geography level and vintage before joining, rather than assuming addresses map cleanly to whatever boundary file you downloaded first. A point that geocodes to the wrong side of a boundary line silently pollutes the aggregate for both areas it touches.
-- joining your data to ACS tract-level estimates: keep the margin alongside the estimate
select
c.tract_geoid,
c.median_household_income,
c.median_household_income_moe,
o.your_metric
from acs_tract_estimates c
join your_geocoded_data o
on c.tract_geoid = o.tract_geoid
and c.vintage_year = o.geocode_vintage_year; Where to start looking
- U.S. demographic, economic, and geographic data at the source: the Census Bureau's own tools — data.census.gov for browsing tables, the public API for programmatic pulls, TIGERweb for the matching boundary files.
- Individual-level microdata, harmonized across years or countries, for real research work rather than published summary tables: IPUMS, free to registered researchers, covering U.S. history and 100-plus countries.
- A single starting catalog across U.S. federal agencies: Data.gov, which harvests metadata from agency portals so you don't have to know which department publishes what.
- Cross-country comparisons within the EU, with consistent methodology across member states: Eurostat.
- Cross-country development indicators — GDP, poverty, health, infrastructure — over long time series: World Bank Open Data.
- A curated, explained entry point when you want the data paired with context rather than a raw table: Our World in Data, openly licensed for reuse.
Most government open-data portals — a state's transportation department, a city's budget office — run on the same handful of platforms, often CKAN under the hood; a general open data search on the publishing agency's name plus "open data portal" will usually surface it directly.
Reading a release correctly
Before you use a figure in anything that matters:
- Is this a survey estimate or an administrative count? Look for the margin of error, or its absence.
- What population does this actually cover — everyone, or only people who interact with a specific program or filed a specific form?
- What year, and what geographic vintage, does the release use? Government data is often published well after the reference period, and revisions happen.
- Is the definition consistent with the last time this series was published? Agencies redefine categories (industry codes, poverty thresholds, race and ethnicity categories) periodically, breaking simple year-over-year comparisons.
- Does the documentation disclose suppression rules? Small-population cells are often blanked out or rounded for privacy, which can silently distort totals if you sum sub-cells expecting them to equal a published total.
Combining multiple sources
Most real projects join two or more official sources — census demographics with an administrative dataset, or a national statistics office's figures with a local government's open-data portal — and each additional source adds another place for definitions, geographies, or time periods to quietly diverge. Before combining sources, check that both use the same geographic boundaries and vintage, the same reference period, and compatible category definitions (age bands, industry codes, race and ethnicity categories) — reconciling these up front is slower than joining on whatever key happens to match, but it is the difference between a defensible combined dataset and one that looks plausible and is wrong.
Common mistakes
- Quoting a small-area ACS estimate as a precise figure without checking whether the margin of error is larger than the number itself.
- Joining current-year data to an outdated boundary file, or vice versa, without checking the vintage matches.
- Summing suppressed or rounded small cells and expecting the total to reconcile with a published aggregate.
- Assuming an administrative dataset represents the general population rather than only the population that used that specific program.
- Comparing a metric across releases without checking whether the underlying definition changed.
For mapping and spatial joins once your data and the government geography are aligned, see how to start with geospatial analysis. For consumer and neighborhood-level demographic products built on top of census data, see every tool in this category; for broader civic and government open-data platforms, see every tool in this category.