![]() ![]() I've updated the code and results with the correct list.Įdit: new state mapping confirmed by the OpenCongress API: Īs a special caveat, ZCTA data isn't USPS Zip Codes. I was using the first, while I should have been using the second, so the state names I listed were wrong. Both are numbers assigned based on the state's alphabetical ordering, but one seems to apply the numbers directly from 1-51 (50 states + DC), while the other skips some numbers. Print merged.sort().to_string(index=False)Įdit: It seems the Census has two different two-digit codings for states. States = pd.read_csv(census_codes_to_names_url, sep='|') # get number of times each ZCTA appears (most are only 1) # the data often repeats the same (ZCTA, state) pair. Here's how I generated it (with Pandas in Python): import pandas as pd Here's the full list with states: 02861 Massachusetts So your example of 42223 does span a state border, but it looks like it is actually between Maryland and Virginia. There are 13 multi-state US Census' ZIP Code Tabulation Areas (ZCTAs): 02861, 42223, 59221, 63673, 71749, 73949, 81137, 84536, 86044, 86515, 88063, 89439 & 97635.Īs others have mentioned, there are a few different ways to figure out the area covered by a ZIP Code, but ZCTAs are the easiest, and the only official version that I know of. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |