5 ms·
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 disa
by rmc 15y ago
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 administrative division, and you can have a city of 1,000 people. "County" would be used in Ireland & UK.
* In some places Country = State, e.g. Ireland. The law & Consitution there consistantly refers to 'Irish State'. Likewise the European Union has 27 member states. Each State is a Country. (Some States (e.g. UK) are made up of several countries).
* Some places don't have post codes (or zip codes) at all. (e.g. Ireland).
Addresses are hard.
- wmboy 15y agoYeah 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 http://zip.elevenbasetwo.com/?zip=1010 It gives: {"country": "US", "state": "MA", "city": "BRIMFIELD"}
- jwn 15y agoI'm guessing it's a leading zero problem, since all US Zipcodes are 5 digits (or nine). Going to http://zip.elevenbasetwo.com/?zip=01010 http://zip.elevenbasetwo.com/?zip=01010 gives the same response noted above.
- damian2000 15y agoSame for Australian zip codes e.g. 2000 (Sydney) returns a 404 (doesn't exist)
- BryanB55 15y agoDespite the mentioned problems with this method I still think it is a great start and should be implemented more often. The U.S. GDP is three times larger than any other economy, there is no doubt that for a lot of sites, US addresses are the norm. Even if it is not 100% accurate it would still be nice to pre-populate fields and let the city be changed if it is incorrect.
- rmc 15y agoThe U.S. GDP is three times larger than any other economy Eh? The GDP of the European Union is larger than the USA. (A lot of this now hinges on how you defined 'country' or 'economy'. I'll point out that most law comes from european level and EU passports say "European Union" on the front :P )
- _delirium 15y agoOn the third bullet point, that's just a word with two meanings, not a country-to-country difference. The USA is also a State in that sense: it has a Department of State to handle state-to-state affairs (i.e. foreign affairs), is a Member State of the United Nations, etc. The use of the term "state" for a subnational division, roughly akin to a Canadian "province", is a different meaning with the same spelling. The same is true in some European countries; for example, Austria is a member state of the EU, but its subnational entities (Länder in German) are conventionally called states in English also.
- eru 15y agoAnd you can also call all of Austria a `Land' in German. Same applies to Germany.
- rmc 15y agoThe use of the term "state" for a subnational division, roughly akin to a Canadian "province", is a different meaning with the same spelling. Fun fact, Ireland has provinces (4 of them). However they aren't used for addresses, only for sports or cultural reasons. So Dublin (the city) is in the State of Ireland, and the Province of Lenister. Sometimes the web forms will have a field saying "State/Province", and I wonder which to put in.
- dmoo 15y agoThe Government in Ireland is currently in the process of introducing postcodes http://www.dcenr.gov.ie/Communications/Postal/Postcodes.htm http://www.dcenr.gov.ie/Communications/Postal/Postcodes.htm
- rmc 15y agoThey've been talking about that for years. It won't happen. We don't have the money, and the gov doesn't want to waste money on mostly pointless systems, i.e. a repeat of when they tried to bring in evoting
- cygal 15y agoIn France, Paris, Lyon and Marseille have multiple postal codes, and some postal codes are used for multiple cities (postal codes were attributed to delivery offices in 1972, and new offices now use the number of the nearest numbered office). (And no, Ziptastic doesn't work for French postal codes.)
- chimeracoder 15y agoIt doesn't even work (perfectly) within the USA. Zip codes are so unreliable that they're not even used by other government agencies/projects - take a look at the Census, which uses ZCTAs: http://en.wikipedia.org/wiki/ZIP_Code_Tabulation_Area http://en.wikipedia.org/wiki/ZIP_Code_Tabulation_Area The reason for this is that the USPS can change the zip codes without warning (and furthermore, leaves some areas undefined), whereas the Census needs reliable boundaries and fixed geographic areas.
- lunarscape 15y agoGetting things delivered to the Republic of Ireland is a major pain because of this. I've had deliveries delayed because the company in question doesn't believe my address is real or correct. It doesn't contain numbers, the word 'street' or a postcode. Some sites also flag your order if you put 0000 in as a postcode for example. Some enterprising guys have created an unofficial "Location Code"[1] for Ireland to help solve some of these problems but it all comes back to faulty assumptions. [1] http://www.myloc8ion.com/ http://www.myloc8ion.com/
- tingletech 15y agoZIP Code is a trademark of the US postal service; so yea, US only.
- julioc 15y agoBrazilian 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.
- Genmutant 15y agoDoesn't work for German zip codes. Returns 404 or some US city with the same code.