datadesk/census-data-downloader

Am I going crazy or is DC no longer pulling at the tract level?

aboutaaron opened this issue · 5 comments

I've had a set of scripts using census-data-downloader to pull tract data for the U.S. (that's for the awesome library btw).

I noticed today that DC is suddenly missing. I thought it as possibly related to the python-us's handling of DC. I added a DC_STATEHOOD=1 environment variable but I'm still not pulling any data for DC.

I swore the data was always but maybe I'm misremembering. Regardless, is there a way to debug how census-data-downloader pulls records by state? If so, I'm happy to fork and debug further. Thanks!

So DC should appear at the tract level, depends on which table you are looking at. I just looked at the common ones, like income & race and it shows up. You can message me with what table/year
you are looking at and I can try to take a look.

Here's the command I'm running:

censusdatadownloader \
    --year 2018 \
    --data-dir data/census \
    poverty \
    tracts

And here's the output: https://gist.github.com/aboutaaron/5d2eb1d5753bbc135d0a67ed3a4858ac

Right now there's no state column w/ the value of 11 so I'm trying to figure out what's going on.

Let me know if you'd like me to move this off Github and into a separate space. Thanks, Sandhya!

I think it could be related to this? unitedstates/python-us#50

Okay I ended up solving this by using the latest version of python-us (3.0) and exporting the environment variable before running the command, i.e.

export DC_STATEHOOD=1 && censusdatadownloader \
	--year 2018 \
	--data-dir data/census \
	medianhouseholdincome \
	tracts

I'll close for now but something to keep note of. Thanks!

Let freedom ring.