walkerke / pygris

Use US Census shapefiles in Python (port of the R tigris package)
https://walker-data.com/pygris
MIT License
107 stars 16 forks source link

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

Open pedrocamargo opened 6 months ago

pedrocamargo commented 6 months ago

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