I have a pet peeve for having to enter my zip code after I've already had to type in the city and state. There wasn't any easily downloadable file that had every ZIP code though. I keep hoping more sites will ask for ZIP first and then just auto fill it using data like this. /wishfulthinking
> There wasn't any easily downloadable file that had every ZIP code though
Post Service says what? https://postalpro.usps.com/ZIP_Locale_Detail (Heads up, it's Excel document)
I did not know you had a checksum in US zipcodes (I am French, oir zip codes are for the most part "region number"+"number that may tell about the importance of the city or carry a completely different meaning".
78000 is Versailles, which would make the city the "most important" city of the 78 "region", one of the ones around Paris.
78140 is another city, and 78142 (a mde up number) would be some internal numbering in the city, usually linked to a post office and usually unknown to the everyday Joe.
How this gets complicated is fascinating.
My new file contains all of the ZIP + city/state combo from that file now.
What else would you expect? Typing my zip is way easier than going through a list of zipcodes in a dropdown, many of which will be off by one digit in different spots. (ETA: I reread your comment and see what you are expecting)
I like the experience of autocomplete while I'm typing out my street address.
>I have a pet peeve for having to enter my zip code AFTER I've already had to type in the city and state.
The city and state can be derived from the zipcode - so why not simply ask for the zipcode to be typed and then auto-populate the associated city and state.
I was frustrated that this seemingly open data wasn't openly available. Anything that asks for city+state+zipcode can ask for zip code first, auto populate the rest. For the edge cases where the city is wrong, the person can still type in the city like they would have needed to anyway.
It is worth noting that a package would never get delivered to the wrong place because the city wasn't correct but the ZIP code was. The USPS routes based on ZIP codes, not city/state.
There are ZIP codes that represent more than one city (town) - and that cross state boundaries.
And there are cities (towns) that have more than one ZIP code.
Another complexity that surprises folks is you can't guarantee a one-to-many state-to-ZIP Code relationship. There are several (I forgot offhand how many, I used to have them memorized) that span across state boundaries.
I lived in a house; the other location was a nail spa. Strangers sometimes visited thinking they were at the right address (they weren't) to get their nails'did (they didn't).
https://www.census.gov/programs-surveys/geography/guidance/g...
Stop Using Zip Codes for Geospatial Analysis (2019) - 184 points, 131 comments - https://news.ycombinator.com/item?id=42974728
Indeed. My zip is from a neighboring state but has a -xxxx to route specifically to my mail distribution center. Even without the last 4 digits they manage to figure it out, just slower.
They remind me of Social Security numbers in a way, where an identifier created for one narrow use (internal Social Security use only) ended up becoming a de facto standard (national identification number) due to the absense of a suitable alternative.
If you'd like to go further down the ZIP code rabbit hole, a few interesting codes to research are `00501`, `48222`, and `12345`. :)
And this relates to why there are some ZIP codes that are in multiple states.
So a ZIP code is an area. A ZIP code is often used incorrectly to apply other demographic information such as race or income, those are generalizations and not necessarily 100% accurate.
- https://www.benfry.com/zipdecode/
- https://hw.leftium.com/#/item/446666
Of course, the results are pretty similar.
---
Another interesting ZIP code visualization: https://eagereyes.org/zipscribble-maps/united-states
Even when I worked for Medicare I couldn't get the damned post office to give us accurate zip code data! It's terrible geodata but also almost everybody remembers it and most zip codes map to one county, so it was the best UI we found for getting a general area for where a person lived.
Santa Claus's postal code H0H 0H0 would be read as being in the Montreal area (starting with an H), but being rural (second character is a 0). H0 is an almost completely empty prefix, except for an indigenous reserve.
Still cool!
https://www.printmag.com/designer-interviews/paula-scher-map...
Point here is to type 0, 1, 2, etc. in the search box to see how zip codes with that prefix are geographically distributed.
I read an interesting story where this distribution comes from the manual mail sorting days... before computer sorting, postal workers could read the first digit and drop it into one of 10 boxes based on what part of the country it was going to, and so on for each additional digit.
Other countries have said "ah f it, it's all computers these days anyways, lets just make all addresses arbitrary random codes with no correlation between code distance and geographic distance. A database lookup at computer speed is a database lookup no matter what."
Fab visualization.
as the son of a (former) mailman, i would have loved an @usps.com email