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

Missing zip codes? #43

Open
hayksaakian opened this issue Apr 8, 2023 · 2 comments
Open

Missing zip codes? #43

hayksaakian opened this issue Apr 8, 2023 · 2 comments

Comments

@hayksaakian
Copy link

I had some code bug out because certain zip codes were missing when I used this library.

Example: 49588

@blakek
Copy link
Owner

blakek commented Apr 10, 2023

TL;DR: This is a known issue, but I don't know where to get more accurate information.

I acknowledge the missing ZIP codes and understand your concern. This package uses Census Bureau ZIP Code Tabulation Areas, which do not include every USPS ZIP code. Unfortunately, I'm unaware of an official, up-to-date USPS ZIP code list due to their frequent changes for mail routes. There is a note in the README that some ZIP codes won't be available.

For the specific example you provided (49588), Google Maps does show an area southeast of Grand Rapids, MI, which seems like it'd contain several addresses:

However, looking at addresses within that boundary largely shows other ZIPs like 49508 or 49512 (which are both listed in this package):

To be clear, I agree that there are ZIP codes used by USPS that will not show here. To my knowledge, there is no official list of up-to-date ZIP codes used by USPS. The ZIP lists are managed locally and change often; they are intended to be used for mail routes only. This package makes tradeoffs of being:

  • fast for lookups but not exact (uses center of ZCTAs)
  • containing most residential addresses
  • up-to-date (an issue is automatically created when the Census Bureau publishes updated ZCTA data; old ZIPs are removed)

@hayksaakian
Copy link
Author

I appreciate the effort and clarification here.

I later found a dataset here that at least identifies the zip codes, and has some record of when it was updated

https://postalpro.usps.com/ZIP_Locale_Detail

It doesn't really have any latitude or longitude information, so it's a starting point more than anything.

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