Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Census Bureau FIPS Reference Files

The US Census Bureau publishes authoritative FIPS (Federal Information Processing Standards) code files that provide the canonical mapping from numeric codes to geographic entity names. These files are the ground truth for geographic identifiers across the pipeline.

What it provides

FileEntity typeRecord countKey columns
state.txtStates + DC + territories57STATE, STATE_NAME
national_county2020.txtCounties + equivalents3,143STATEFP, COUNTYFP, COUNTYNAME
national_place2020.txtIncorporated places + CDPs31,980STATEFP, PLACEFP, PLACENAME
national_cousub2020.txtCounty subdivisions~36,000STATEFP, COUNTYFP, COUSUBFP, COUSUBNAME

Format

All files are pipe-delimited (|) plain text with a header row. Encoding is ASCII. Example from the county file:

NC|37|037|1026339|Chatham County|H1|A
NC|37|063|1008557|Durham County|H1|A
NC|37|183|1008586|Wake County|H1|A

Columns in the county file:

ColumnDescription
STATETwo-letter postal abbreviation
STATEFPTwo-digit state FIPS code
COUNTYFPThree-digit county FIPS code
COUNTYNSANSI feature code
COUNTYNAMEFull county name including “County” suffix
CLASSFPFIPS class code (H1 = active county, H4 = borough, H6 = parish)
FUNCSTATFunctional status (A = active)

The five-digit county FIPS used throughout the pipeline is STATEFP + COUNTYFP (e.g., 37 + 183 = 37183 for Wake County, NC).

Download

https://www2.census.gov/geo/docs/reference/state.txt
https://www2.census.gov/geo/docs/reference/codes2020/national_county2020.txt
https://www2.census.gov/geo/docs/reference/codes2020/national_place2020.txt
https://www2.census.gov/geo/docs/reference/codes2020/national_cousub2020.txt

No API key required. Files are small (under 5 MB total) and rarely change.

Usage in the pipeline

Census FIPS files are consumed at L1 for geographic enrichment. When a source record contains a county name but no FIPS code (common in OpenElections and Clarity data), the pipeline joins against the county file to assign the canonical five-digit FIPS. When a source provides a FIPS code but no name, the lookup runs in reverse.

The place file enables resolution of municipal names to FIPS codes — relevant for city council, mayoral, and municipal utility district contests where the jurisdiction is a place, not a county.

FIPS codes serve as the primary geographic join key across all seven data sources. Without them, matching “Wake County” in MEDSL to “WAKE” in NC SBE to “Wake Co.” in OpenElections would require fuzzy string matching. With them, it is an exact integer join.