Hacker News new | ask | show | jobs
by jake-low 2272 days ago
I don't think it's generally possible. The FIPS code just identifies the county (the first two digits are the state, e.g. 06 for California) and the final three identify a county in that state. So technically that column is redundant with the "county" and "state" columns; I suspect they've included it to make joining this dataset to other data that might use different name-formatting of counties/states easier.

ZIP/postal codes are generally smaller (in the county I live in there are almost a hundred ZIP codes). I'm not sure they're even guaranteed to be entirely within one county either. We tend to think of ZIP codes as boundaries but they're actually delivery routes (which if you squint can be converted into boundaries by joining the properties that those routes serve together).

You might be interested in this article: https://carto.com/blog/zip-codes-spatial-analysis/

2 comments

zip codes span counties and also states. A few are actually in three different states.

(I have suffered at the hands of zip-codes-as-geographic-entities)

Right, so a simple mapping I'd want is given a Zip Code, what is the corresponding FIPS Code.
Pick a lat/long, and you can map between. Or find the centroid of the zip code and map accordingly. Or you might consider unions between the geometry objects. Qgis3 has a lot of great packages for this.