Live data from Hacker News

Stop using zip codes for geospatial analysis (2019)

carto.com

91–100 of 134 posts

Re: Stop using zip codes for geospatial analysis (2019)

#91

Earlier quoted context omitted.

Web devs not using a good library that will populate the former from the latter?

Some libraries will insist that my address is in a different city because my zip code spans the border. I mean if my mail has the other city it still gets to me, but for anything other than mail, they now have the wrong city for me.

Does it matter if the "city" is wrong if your street address + zip code is unique?

Re: Stop using zip codes for geospatial analysis (2019)

#92
post #47

For anyone curious, here is the official US Gov list of ZIP codes in CSV with lots of helpful related data (longitude, latitude, etc.) http://federalgovernmentzipcodes.us/free-zipcode-database-Pr...

There is no "official US Gov list of ZIP codes". They come from the US Postal Service, and those aren't published for free.

Re: Stop using zip codes for geospatial analysis (2019)

#93

Earlier quoted context omitted.

Some libraries will insist that my address is in a different city because my zip code spans the border. I mean if my mail has the other city it still gets to me, but for anything other than mail, they now have the wrong city for me.

Does it matter if the "city" is wrong if your street address + zip code is unique?

It depends on what they're doing with it. But mostly probably not.

Re: Stop using zip codes for geospatial analysis (2019)

#94
post #49

Zip codes, zctas, and tiger/line are good enough for what most people need. Maybe you can find an edge by using something more granular...but I'm not sure what edge you'd be looking to get with geodata. Maybe for real estate trends and/or market analysis?

I agree.

Reading their alternatives, it strikes me with "ZCTA's are the worst form of small area aggregation except for all others."

Its not a great geography to use but it is quite useful if you know it's limitations and inaccuracies when you get into it. Stuff like multipolygon entities, island-polys, etc aren't fun to resolve but can be accounted for.

Add on that ZCTA's will historically follow some sort of actual boundary(rivers/highways/etc) they can tell a story in a way Census tracts can't.

Re: Stop using zip codes for geospatial analysis (2019)

#95
post #61
post #14

ZIP codes are an emergent property of the mail delivery system. While the author might consider this a bad thing, this makes them "good enough" on multiple axes in practice. They tend to be: - Well-known (everybody knows their zip code) - Easily extracted (they're part of every address, no geocoding required) - Uniform-enough (not perfect, but in most cases close) - Granular-enough - Contiguous-enough by travel time…

Contiguous enough by data travel time as well. A few people will get 5 ms more latency than the exact optimal route, but it’s not like your routes are exactly optimal anyway. And don’t forget sales tax. Which is state + county + city

... + special entertainment district + business renovation area + exception + exception + exception + ...

Re: Stop using zip codes for geospatial analysis (2019)

#96
post #70
post #60

Earlier quoted context omitted.

Sure, and in the States, ZIP+4 could once nail my postal location to a subset of 4 (of a group of 16) mailboxes within a particular set of entry doors on a particular apartment building. But broadly speaking, nobody knows what their ZIP+4 is, while I imagine that most people in Canada know their postal code by heart. It is interesting.

The plus four changes all the time so it isn't feasable to know it. The use is large mailers can get a discount by looking it up and presorting mail. If the mail coming into my post office has my mail next to my next door neighbors that saves them a lot of time.

Is that still true? I would imagine any reasonably modern computer could map every physical address in a huge region to a (route number, stop number) pair. I wouldn't think the +4 would add a lot of value anymore.

Re: Stop using zip codes for geospatial analysis (2019)

#97
post #48

India is experimenting with Digipin https://www.indiapost.gov.in/Navigation_Documents/Static_Nav... Which is derived from longitude and latitude..

I've seen a few attempts like this, like loc8 and google's plus codes. Is there any advantage to Digipin over existing solutions other than avoiding splitting major cities into very different codes? None stood out to me from that document. The description is written pretty well.

Always sad when these schemes don't include a check digit in them though, even if the layout of this one gets typo'd codes pretty close to their intended destination.

Re: Stop using zip codes for geospatial analysis (2019)

#98

There are many problems with zip codes / postal codes but the biggest two we see are: a. Excel treats them as numbers instead of strings of digits and thus drops the leading 0 b. Developers make assumptions about postal codes based on how they work (or more usually how the developer incorrectly thinks they work) in their own country and these assumptions absolutely do NOT hold in other countries. A relevant guide to…

> Developers make assumptions about postal codes

Until very recently I naively assumed that the area of a given zip code would be entirely within the area of some single city or town which would then be entirely within the area of a single county.

It was quite a rude awakening working with software that tries to apply the correct local taxes to a given address and finding that the statement “A given X can contain multiple Y” is true for every possible combination of zip, city, and county.

Re: Stop using zip codes for geospatial analysis (2019)

#99
post #14

ZIP codes are an emergent property of the mail delivery system. While the author might consider this a bad thing, this makes them "good enough" on multiple axes in practice. They tend to be: - Well-known (everybody knows their zip code) - Easily extracted (they're part of every address, no geocoding required) - Uniform-enough (not perfect, but in most cases close) - Granular-enough - Contiguous-enough by travel time…

One more advantage: ZIP codes are a good trade-off if you want to gather anonymous data in a survey or provide anonymized data to an outside entity. For example, we recently conducted a survey on mobility patterns within our university. To offer respondents a reasonable amount of anonymity, we just asked for their (German) ZIP code and the location of their primary workplace. This allows us to determine the distance and approximate route people would take between home and university campus - to a degree that is sufficient for our goals.

Re: Stop using zip codes for geospatial analysis (2019)

#100

Earlier quoted context omitted.

Equal distances to each adjacent neighbor: https://www.uber.com/blog/h3/

They also only have one type of neighbor. Square grids have 2 neighbor types. Triangular grids have 3.

Makes perfect sense. Thanks both
Post reply on HN