r/programming • • Apr 11 '16

How an Internet Mapping Glitch Turned a Random Kansas Farm Into a Digital Hell

http://fusion.net/story/287592/internet-mapping-glitch-kansas-farm/
276 Upvotes

59 comments sorted by

View all comments

100

u/sacundim Apr 11 '16

Holy crap. I think this article is a great teachable moment for the concept of false precision—estimates that, because of the way that they're presented, appear to imply conclusions that they don't.

Because that's one way of looking at the design problem with these IP address geolocation services. It sounds like ideally queries should return either:

  1. Some sort of hierarchical description of a geography (e.g., a potentially incomplete sequence specifying country, state, county, street and address);
  2. A probability distribution of points over the Earth's surface.

But instead they're mapping IP addresses to geographical points—and it sounds like the numbers are routinely reported without any accompanying margin of error, so even if you were aware of the risk, there's no way to tell the precision of the individual results.

18

u/sydoracle Apr 11 '16

Be interesting to see how they remedy it if there isn't provision for margin of error in the data structures. Maybe they'll just switch the mapping into the middle of a body of water ?

19

u/timknauf Apr 11 '16

Yeah, at the end of the article, it sounds like that's exactly what they're doing.

18

u/[deleted] Apr 11 '16

I wonder how long it will be before we see the first instance of some bright spark drowning while trying to rescue their phone from the middle of a lake.

1

u/isarl Apr 11 '16

Michael Scott drove his car into a lake; does that count?

5

u/jonjonbee Apr 11 '16

Which is the equivalent of shooting yourself in the leg after you've shot yourself in the foot. "Hey, let's fix our stupid API by clamping NULL coordinates to the middle of bodies of water!" I wonder what happens when one of those bodies of water gets drained...

11

u/poizan42 Apr 11 '16

They do provide an "accuracy_radius" element along with the position. But it doesn't help much when their customers just ignore that.

2

u/kurav Apr 12 '16

Maybe because that's what the example app does?

16

u/poizan42 Apr 11 '16 edited Apr 11 '16

There is an "accuracy_radius" field in MaxMind's data. Doesn't help a lot when their customers just ignores it though.

It might work better if they returned min/max pairs of latitude and longitude, but they can't really change that now.

4

u/sacundim Apr 11 '16

It might work better if they returned min/max pairs of latitude and longitude, but they can't really change that now.

I have seen some evidence suggesting that would not generally work either, because a non-negligible number of programmers or data analysts who would interpret one of those points as a precise location would be. So basically, the people in the upper left and bottom right of those rectangles would still get singled out often.

Thinking about it a bit, I've come up with this proposal:

  1. Always return some sort of hierarchical description of the geography—something like:
  • "North America/United States/Nebraska"
  • "North America/United States/California/Santa Clara County/Cupertino/1000 Infinite Loop Dr."
  1. Only when the error margin of the coordinate is small enough (according to some carefully designed criterion), return those as well.

But the problem then is that when a client wants to map the results, they have to convert the only-#1 results to a polygon to map, and a lot of the clients won't know how to do that. So they'll want you to provide coordinates for them. And then we're back to square one—as long as you provide precise coordinates, even if the clients misinterpret what they mean, those coordinates will be somewhere and the people there may be affected...

8

u/ilogik Apr 11 '16

I've worked with maxmind and other similar providers.

Others usually also return an radius, that way this result would be displayed on the map as a large circle covering the US

5

u/killerstorm Apr 11 '16 edited Apr 11 '16

Those geographical points are meant to be used for visualization purposes only, e.g. to draw a map with flags representing web site visitors.

They are points because you gotta put a flag into a concrete location.

So it's a problem with data being misused and misinterpreted.

4

u/kurav Apr 11 '16 edited Apr 11 '16

No, you can not give a "point" as a result when you mean to give a "radius" "circle". The geolocation service has a fundamental design flaw which is destroying the lives of innocent people.

1

u/bobindashadows Apr 11 '16

Ok, so you return a radius, and you absolutely don't return any points. What, pray tell, is the recipient supposed to do with that lone radius?

1

u/kurav Apr 11 '16

What would you do?

1

u/bobindashadows Apr 11 '16

With the information "a circle exists with a given radius but I won't tell you where it is" I would do nothing because that information is completely useless.

Hint: look up the definition of a circle

1

u/kurav Apr 11 '16

That information is completely useless.

Are you sure? Maybe you can draw a line, or print out a number. Or you can draw a color.

Hint: look up the definition of a circle

TBH, I am just kidding, obviously I meant radius with a centerpoint, i.e. a circle.

1

u/bobindashadows Apr 12 '16

Oh, well in that case: they already return a radius and a center point.

1

u/kurav Apr 12 '16

Yes, but as already pointed out even their own example application for using the data completely ignores the radius parameter, spitting out an exact coordinate for any IP you throw at it. Clearly, they are pushing developers to interpret the data as pinpoints rather than rude approximations.

Which is of course great for their business, so they can associate terms like "Precision" with their products. It still sucks for the people who happen the live where their "precision" products send deranged Internet lunatics and misguided SWAT teams.

0

u/bobindashadows Apr 12 '16

So your suggested API is their exact API and they're still monsters for providing a terrible API. Gotcha.

→ More replies