by pseudosavant · 1y ago · 0 comments
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.
I know where I live what "city" you live in can be a complex situation because of unusual classifications of cities compared to the rest of the country so I can see this being a useful system to have.
We wouldn't have that problem in France where the cities are clearly separated. The concept of "city" (commune) is the basis for the topography classification of the country since 1789.
So when I input an address, a suggestion system will give me several choices with several distinct cities and zips. If I input a zip code, I can get several choices of "places" under one zip.
A situation where your address is in the neighbour city should not happen (I put "should" because this is France :))
USPS doesn't much care about counties. They assign postal routes based on geographical convenience, not political borders.
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.
A few comments here suggest this isn't true.
If you want to reduce input to one field, the autocomplete based on the street address that I brought up is the best experience I've come across.
The problem I've anecdotally seen with autocomplete is there's another property with the same street address as mine but in a different city and different zip code (granted only last digit is different IIRC) about ~15 miles away and on more than one occasion it's caused a few mix-ups.
False. Some ZIP codes even cover multiple States.
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.