Live data from Hacker News

Ziptastic: Isn't a zipcode enough?

daspecster.github.com

91–100 of 113 posts

Re: Ziptastic: Isn't a zipcode enough?

#91
Consider 33042, "Summerland Key." This ZIP code covers several other Lower Florida Keys, including Cudjoe Key and Upper Sugarloaf Key. "Summerland Key" is technically correct, since the post office is on that island, but people on the other islands will _never_ write "Summerland Key" as their address, preferring instead to use the ("acceptable") name of their island instead. I'm sure this situation is not unique to the Florida Keys, and I therefore doubt the usefulness of resolving city and state from ZIP code outside of them there fancy big cities.

Re: Ziptastic: Isn't a zipcode enough?

#92
post #73

I use this database in my apps to solve exactly this problem (US only): http://federalgovernmentzipcodes.us/ No idea who runs it but its updated regularly and has never caused issue (so far). It includes both the USPS preferred city and all possible cities so you can either default to preferred or provide at least auto complete. Its also has all the military addresses and as well as lat/long, which is a bonus. I can…

Yes, it seems like the dataset is so small that one should just download the whole thing and periodically request diffs. Less total bandwidth for everyone, more reliable, and a nice user latency win as well.

Re: Ziptastic: Isn't a zipcode enough?

#93
post #8
post #7

I'm actually impressed it came back with my correct information. On major websites including Target.com, they do not see my zip code as valid even though it's close to a decade old. Sure, it's knew in the grand scheme of things but that's crazy... Anyway, I agree with the others that while this is nifty it won't always be accurate for everyone. For instance my township is contained within a very, very large county so…

My understanding is the whole point of a zipcode is that city and state on a mailer don't matter at all. Doesn't zipcode go to a specific post office?

Depends on if you mean ZIP or ZIP + 4 or ZIP + 4 + delivery point.

ZIP alone will route to a post office, but here are a significant number of areas where city is needed to further disambiguate due to duplicate street addresses in a delivery zone. Now, they obviously try to avoid this, but it still happens.

ZIP+4 would obviate the need for city, state.

ZIP + 4 + delivery point would obviate the need for everything :)

(The need for delivery point is because even a single address may have multiple mailboxes, etc)

Re: Ziptastic: Isn't a zipcode enough?

#94
post #45

I'm not sure if this is supposed to be USA-only or not. It seems to ask for 'country', so I assume it's aimed at the whole world. And here's where reality disagrees with your simple organisation. * First "zip code" is mostly an American term, "post code" is used in other anglosphere countries. * Not all countries have "everyone is in a city" model, this seems to happen in the USA, where 'city' is often an administrat…

ZIP Code is a trademark of the US postal service; so yea, US only.

Re: Ziptastic: Isn't a zipcode enough?

#95
post #45

I'm not sure if this is supposed to be USA-only or not. It seems to ask for 'country', so I assume it's aimed at the whole world. And here's where reality disagrees with your simple organisation. * First "zip code" is mostly an American term, "post code" is used in other anglosphere countries. * Not all countries have "everyone is in a city" model, this seems to happen in the USA, where 'city' is often an administrat…

Brazilian post codes map to [segments of] streets, with the format XXXXX-XXX. The API response for a brazilian post code is just "404", invalid if the application was expecting JSON.

Re: Ziptastic: Isn't a zipcode enough?

#96

My big pet peeve is when they ask you what type of credit card you're using, when that is easily determined by the first four digits of the CC number. Thankfully, more and more web sites are figuring this out.

I think there is a very good reason to do that — sites that don't accept all credit cards. I don't want to sit there typing in my American Express card number only to find out that it is not supported afterward. Now the sites that have a nice little pop-up showing me the detected card type are really nice and give me a nice warm and fuzzy feeling after giving them my card number.

Re: Ziptastic: Isn't a zipcode enough?

#98
post #51
post #45

I'm not sure if this is supposed to be USA-only or not. It seems to ask for 'country', so I assume it's aimed at the whole world. And here's where reality disagrees with your simple organisation. * First "zip code" is mostly an American term, "post code" is used in other anglosphere countries. * Not all countries have "everyone is in a city" model, this seems to happen in the USA, where 'city' is often an administrat…

Yeah this doesn't work at all if you live outside USA. The post code for Auckland CBD (in New Zealand) is 1010. So if I try http://zip.elevenbasetwo.com/?zip=1010 It gives: {"country": "US", "state": "MA", "city": "BRIMFIELD"}

Same for Australian zip codes e.g. 2000 (Sydney) returns a 404 (doesn't exist)

Re: Ziptastic: Isn't a zipcode enough?

#100
post #2

Unfortunately in some cases a zipcode is in fact not enough, as it's possible for a zipcode to spread across multiple towns. However, if you have a full 9 digit zipcode then you can in fact always determine. However, even if you can't always determine this information exactly, a zipcode should be enough to pre-populate these fields for you most of the time, and in those rare cases which they don't a choice can be pre…

Thanks! I will be looking into this more. I'm aware of the 9digit zipcodes. I'll look into the USPS API. Also, I'll address the other comment below. That might answer some questions.

Also, zip codes may change service areas each year, and so would be necessary to use 3rd party zipcode database and do a spatial join to add city, county, state attributes to each zip code. then import this table to mysql as lookup table.
Post reply on HN