pygris icon indicating copy to clipboard operation
pygris copied to clipboard

Downloading census tracts for 2010 is not possible when specifying a county

Open pedrocamargo opened this issue 1 year ago • 0 comments

Apparently, Tiger data has different field names for COUNTYFP on census tracts for the 2010 Census, and that causes the software to fall over when one specifies the county when downloading census tract data for that year.

To reproduce the error one can run:

import pygris
pygris.tracts(state="Maine", county="001", year=2010, cache=False)

image

If instead you run

import pygris
pygris.tracts(state="Maine", year=2010, cache=False)

You obtain the correct data

image

pedrocamargo avatar Mar 20 '24 00:03 pedrocamargo