Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

County FIPS off in tracts file #17

Open
Makosak opened this issue Oct 22, 2024 · 1 comment
Open

County FIPS off in tracts file #17

Makosak opened this issue Oct 22, 2024 · 1 comment
Assignees

Comments

@Makosak
Copy link

Makosak commented Oct 22, 2024

County GEOID should be a 4-digit number (ex 1001), not a 1-digit number as is currently shown in the tracts file downloaded.

@mradamcox
Copy link
Contributor

Ultimately this is caused by the CSV column being interpreted as an integer. In this case, the field is COUNTYFP so it should actually be 3 digits 001, but it's been shortened to 1. A county "GEOID" would be 5, as it is a concatenation of STATEFP + COUNTYFP.

image

Because all of this in the HEROP_ID, I'm thinking it may be best to calculate these derivative identifiers from that ID. For example, county GEOID would be the first 5 digits after US, so something like substr(x, 5, 10) (I may have the index positions wrong) would pull the id right out. This is something we could even wrap into the load_oeps function if that would be desirable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants