Closed erikarasnick closed 2 years ago
Is this because the original IDs were four digits and then the split ones were six digits? Would it make sense to "right pad" the early four digit tracts with to zeros to bring them up to six digits?
I think that's part of it. I noticed this while putting finishing touches on the data for NGHS. For that data I did
glue::glue('{STATEA}{COUNTYA}{TRACTA}')
which results in, for example (in 2010 data), 39061000200
but the GISJOIN for that same tract is G3900610000200
Note the extra zeros.
When I went to join st_census_tract output with NGHS data the tract ids aren't matching up because I used GISJOIN here and glue
d the string together for NGHS.
This script from old crew census degauss image might help: https://github.com/degauss-org/crew_census/blob/master/make_crew_geodata.R
Yes, that is helpful. I will make sure it is done the same way here and for the NGHS data.
https://github.com/degauss-org/st_census_tract/blob/ad30e92c7140c2a2b21a6eb86f7da54c0d6c757b/get_tract_shapes_nhgis.R#L15
probably need to go back and join state fips, county fips, tract fips to make the entire fips string....