[GIS] TIGER/Line GeoID – Census Tract map to Lat/Long

censusgeocoding

I'm working in Python with ACS data downloaded from here: https://www.census.gov/geo/maps-data/data/tiger-data.html

I was able to convert the geodatabase format to a pandas dataframe where every row is a GeoID representing a census tract.

I can't figure out how to understand the GeoID and to connect it to latitude/longitude. My end goal is to build a function that takes in a lat/lon and returns what census tract it is in.

For example, this library: https://pypi.org/project/censusgeocode/ will take a lat/lon and return the census tract information. But it returns (as an example):

'GEOID': '42079216600'

whereas the TIGER/Line data I downloaded has the GeoID in a different format:

GEOID: '15000US170010001001'

Can someone help me understand how to interpret these GeoID's so I can join on them? I've looked here: https://www.census.gov/geo/reference/geoidentifiers.html but it doesn't explain down to the census tract level.

Best Answer

The censusgeocode library you linked to includes a dictionary example:

42079216600 is:

  • State 42 (Pennsylvania)
  • County 079 (Luzerne County)
  • Census Tract 2166

15000US170010001001 is:

  • State 17 (Illinois)
  • County 001 (Adams County)
  • Tract 0001 (Census Tract 1)
  • BG 001 (Block Group 1)

The 15000US refers to the summary level (in this case "State-County-Census Tract-Block Group") and population (in this case, entire population).

See more here: https://www.census.gov/geo/reference/geoidentifiers.html, which you already linked in your question. Specifically check out "GEOID Structure for Geographic Areas". For a good overview of how to link Census files and American Fact Finder (Census Bureau) data, see here: http://spatial.scholarslab.org/stepbystep/joining-census-data-tables-to-shapefiles-in-arcmap/. This article also shows an example in which the geoid field will have the leading 14000[...]US or 15000US, while GEO.id2 started with State code.

Related Question