Geohashing

Summer seems to have arrived, at last.

As you may have noticed, today’s comic contains an algorithm for converting dates into local coordinates. For a given day, you can calculate what that day’s coordinate is for your region. Dan has put together a tool for calculating a day’s coordinates and show it using Google Maps. Note that you can’t calculate a day’s coordinates before the stock market opens on that day (about 9:00 EST) — except for weekends and holidays, when it uses the most recent opening price.

We’ve been having fun trying to reach these coordinates for some time now, when the coordinate is reachable — that is, when it’s not over water, in a military base, or in the middle of Bill Gates’s house.

If you happen to be looking for somewhere to go, driving to the coordinates can be an adventure. If you do, please take pictures and drop them on the geohashing wiki (feel free to help fill it out).  I’m gonna get some rest and then, at 10 AM tomorrow, see if I can get to the Boston coordinates (I have no way of knowing where they’ll be until then, of course).

And finally, when the coordinates are reachable, meetups are Saturday afternoon at 4:00.

Edit: I answered a bunch of questions in a comment below.  Further discussion is also happening on the wiki. I’m going to get some sleep and then head out to today’s coordinates (or as close as I can get).

586 replies on “Geohashing”

  1. Aww quit whining about water, and taking the train to Jersey; Boulder and Golden Colorado could put you at the top of a 14,000 mountain. At least in water you can charter the ss minnow for a 3 hour party cruise.

    Like

  2. Wow this is awesome. This is something I can see doing with friends till I get old a weary.
    Great way to create a date.
    Awesome idea man.

    Like

  3. I think maybe there needs to be a concept of local stock market, not just basing it on the DOW, e.g if the box is in the UK, use the FTSE 100, in Japan use the NIKKEI etc

    Like

  4. Those example coordinates are Google headquarters, actually.

    Randall, I saw from the wiki that you were at last weekend’s meeting in the graticule that contains San Francisco. 😮 Are you going to be in the area this next weekend too? I’m in Sunnyvale, but it’d be worth the extra drive if the location is doable.

    Like

  5. grr:
    You’re complaining about that?! Today’s (yesterday’s) was right by Mt. Evans! That’s incredible! I mean, it may be entirely inaccessable without rock climbing gear, but at least you can wander the mountainside for a bit! Either way, maybe I’ll see you when the site is somewhere less mountainy (assuming you live here).

    Also, I live on Baseline Road in Boulder, so I get to choose which site I go to (West Denver Metro or FoCo). Double awesome!

    Though I suppose technically 39.999 < 40. Problems like this made me get a liberal arts degree.

    Like

  6. I think the algorithm have a small issue.. It looks like that translating into decimal and taking the firse 6 digits will not be random enought. In fact, it chooses south places more often than it should (at my place). That’s becouse many times the number just start with 1: all hex higher than about 9000000000000000 translates to 1 as first decimal digit.
    The solution is taking the *last* 6 digit:

    9000000000000000 -> decimal -> 10376293541461622784 -> xx.622784

    Thanks for your attention 🙂

    Like

  7. What’s the statistical likeliness that two generated coordinates will be the same? e.g. how often does your hash collide?

    Like

  8. Gotta say, this algorithm is spectacularly useless in San Francisco, where 70% of the time the result is in the bay or ocean. Also, one degree by one degree is a pretty huge area…but I guess you _are_ looking for big adventure or enjoy driving more than I.

    Like

  9. Obviously the best way do this would be with randall’s GPS direction finder. You just download the data, check the map in zoomed out mode to make sure its not water, and then go. The best thing is that you have no idea where you’re going until you get there. So is there a stable and usable version that i can install for this purpose?

    As a side note this really brings into perspective how small the UK is, the graticules are the same size no matter where you are so here they take up a large portion of the country. Just shows how bad my geography is really.

    Like

  10. Nicola: The algorithm doesn’t just convert a big hex number to a big decimal number, and then take the first bunch of digits…

    It converts a long hex fraction into a long decimal fraction.

    So, say, 0.10000 (hex) would become 0.062500 (decimal), 0.2000 (hex) would become 0.12500 (decimal), etc.

    So the chance that the decimal value is (say) <0.5 is the same as the chance that the hex value is <0.8… which is the chance that the first digit of the hash is <8… ie, ideally half.

    Like

  11. > Randall: if the location is in water, just append a prime/apostrophe to the end of the original date/stock string, and re-hash. You should be able to just add a button that says “click here if that site was in the water” which fixes the problem that way.

    Well, there are a number of reasons why the location is unsuitable; I’d prefer to separate the meetup protocol from the coordinate-generating protocol, and not build extra intelligence into the actual hashing part. I think it makes more sense to default to a neighboring block or something.

    > Also, why did you choose 2005-05-26? (I know why *I* might have chosen it, since it was a particularly memorable birthday party for me, but I have no idea why *you’d* have chosen it.)

    I picked it because it gave a resulting coordinate that, should people misinterpret my example, wouldn’t send a horde of readers into someone’s living room 🙂 If that’s going to happen, I want it to at least be because they *correctly* interpreted the algorithm …

    Also, I’m stalking you.

    > Gotta say, this algorithm is spectacularly useless in San Francisco, where 70% of the time the result is in the bay or ocean. Also, one degree by one degree is a pretty huge area…but I guess you _are_ looking for big adventure or enjoy driving more than I.

    You can use the graticule for the west. But it’s not spectacularly useless — I think it’s about 65% water, but that’s still one day in three there’s a valid coordinate. Dan, who I’ve been working on this with, lives in Santa Clara, and he’s been having fun reaching the coordinates when they’re reachable. In general, not a lot of operations need them to work every day.

    > I think maybe there needs to be a concept of local stock market, not just basing it on the DOW, e.g if the box is in the UK, use the FTSE 100, in Japan use the NIKKEI etc

    See the wiki for discussion of this — we’re still deciding what to do. The DOW is just chosen because it’s a universal source of entropy. I think it’d be better to change things to use, say, yesterday’s DOW opening/closing than switch to another source of randomness entirely. But that’s a decision we’ll make after some more discussion on the wiki forum …

    > Randall, I saw from the wiki that you were at last weekend’s meeting in the graticule that contains San Francisco. 😮 Are you going to be in the area this next weekend too? I’m in Sunnyvale, but it’d be worth the extra drive if the location is doable.

    I just got back, actually, hours before this went up. But if it helps, I did get lost in Sunnyvale on that incredibly hot day last week while testing the GPS cyborg implant program. I think I ended up almost climbing a fence in the National Semiconducter office park.

    > this past weekend, when i entered May 16th in the tool thingy, the meeting spot was a three minute drive from my house in my region. is there any sort of repeating pattern in this algorithm or is that a stupid question?

    They’re random — or at least, as random as md5, which is more than random enough for these purposes 🙂 I think we can safely say that you won’t see any patterns that tell you that it’s any less random than dice rolls would be.

    > So, uh, it requires your starting co-ordinates. Doesn’t this mean that if people don’t use the same starting location we’ll all end up in different places?

    Everyone in the same lat/long grid gets the same location. Just figure out which square you’re in (-122, 37 for SF) and that’s all you need.

    > I would love to know if there are any other Baltimorons who read this. Maybe we can all go out and get coffee. If there are any others, that is.

    I can think of one way to find out …

    > I think the algorithm have a small issue.. It looks like that translating into decimal and taking the firse 6 digits will not be random enought. In fact, it chooses south places more often than it should (at my place). That’s becouse many times the number just start with 1: all hex higher than about 9000000000000000 translates to 1 as first decimal digit.

    No — 0.F in hex is not 0.15, it’s 0.935. We are not treating them as integers, but as floats less than 1. If you’re confused, work through the example given in the comic and see if you get the same answer.

    > Whoa, I was only about a mile from the destination coordinates in the comic LAST Saturday. I’m a week off. 😦

    If you’d just hold still, our satellites could track you better and this wouldn’t happen. Also, you have something in your hair.

    Like

  12. “>I can already tell it’s going to be a bitch for Seattleites. About half of the >spots are going to require a ferry trip, and that’s excluding Puget Sound, >which rudely consumes about 25% of the surface area.

    And if those two facts weren’t bad enough, the graticule covers very heavily populated area – like today’s location is in some backyard in a residential area. We’ll just have to hope that most Saturdays we’ll get lucky and it will be a park or some public location on the east side!”

    The West Sound location was literally my best friend’s house, back in grade school. I used to be there every Saturday at 4 PM.

    I now live right by the ferry in Bremerton. If anybody needs to be on this side of the water, I can put them up, if they miss the boat home.

    Like

  13. Creepiness…. Just for kicks I put in my girlfriend’s birthday…

    And the resulting location was two houses up from the house she grew up.

    That’s just odd.

    Like

  14. > I think the algorithm have a small issue..
    (various reply)

    Ahh i see, indeed i didn’t tried the comics coordinates, now i see my error. Sorry 🙂
    The red boxes are a little misleading on the “hex” line since they don’t enclose the “0.”. I mean, they’re misleading if you’re easily mislead, like me 🙂

    Like

  15. I’m getting somewhwere over 60 miles away, right on the far side of the little box, right in the middle of nowhere ;_; I don’t drive…. maybe if I start walking now….o.O

    Like

  16. This game is going to get really fun in the Ottawa area. The city is near the center of its zone, but everything around it is small towns, farmers’ fields and forests.

    Like

  17. Funny, some of today’s coordinates (using yesterday’s DOW, since I’m living in Denmark) turns up not far from where I grew up. Creepy.

    Like

  18. Also, I’m finally getting the link between the last 3 blag posts, and why there are so many water meeting points. He’s challenging everybody to a game of online underwater chess!

    Like

  19. >I don’t think anyone is going to be able to beat living at the Lizard, Cornwall, UK:

    It’s bad along the whole South coast of the UK, but that takes the biscuit…

    Like

  20. > They’re random — or at least, as random as md5, which is more than random enough for these purposes 🙂 I think we can safely say that you won’t see any patterns that tell you that it’s any less random than dice rolls would be.

    oh! a dice version for table top RPGs?

    … oh, and a version for alternate realities?

    Like

  21. Pingback: datenritter blog
  22. Too bad there aren’t enough xkcd fans around here in Eastern Finland (at least not ones that would really do this). This sure could be great fun if there were.

    Like

  23. I’ve been looking at the co-ordinates for London and every day it’s outside the M25 orbital

    …except for April 30th this year when it was in Dulwich, a short walk for me

    Like

  24. Finally, all my stock market manipulation has a purpose! Let’s see if I get this in my living room…

    Like

  25. I’m sorry, but this doesn’t seem like a good idea considering the price of a gallon of gasoline!! My location for yesterday would have been a 45 minute drive (in good traffic)

    Great tool for amateur spies!

    Like

  26. Hi.

    This is Paris graticule.
    http://irc.peeron.com/xkcd/map/map.html?date=2008-05-20&lat=48&long=2&zoom=8&abs=1

    I’ve been reading your blog back then when I was in Thailand and never stopped since then.

    If you don’t mind, I’ve added Paris coordinates to the wiki.

    I hope their will be people playing the game in Paree!
    Doing that around Paris is pretty exciting because outside of Paris there’s a lot of less urban areas, Parks and fields.

    I don’t know the city and the country much because I landed here just 6 months ago. This would have been reaaally cool in Thailand.

    As far as I’m concerned, I will be there saturday 16:00.

    Talking about GPS, I bought a boat GPS with general direction and waypoints 120 euros. It was very useful to bike in the jungle in Thailand.
    I’m SO happy to find a way to use it here in Paris 🙂

    Thanks for the cool game

    Nico

    Like

  27. So, am I the only one who’s first thought was that this thing was totally insecure? MD5 has been cryptographically compromised, right? The last thing you want is a man-in-the-middle attack when there’s crisco involved.

    Jeff

    Like

  28. While the Palm Bay area is split into two with most of Palm Bay being on the south side of the split, I’ll probably just have to take the Melbourne side of things. Looks like I may be going to the beach for some of these, though. 😀

    While it may not be this coming weekend, me and a friend of mine are likely to find a few of the spots. I’ll be wearing a black fedora and he’ll be wearing an XKCD t-shirt.

    If you’re in the Palm Bay/Melbourne/Malabar area, I imagine we’ll see you around.

    And has anyone considered an XKCD flash mob?…

    Like

  29. Jeff, geohashing isn’t encrypting information, so md5 as cryptographically insecure shouldn’t matter. It’s just trying to get some sufficiently random numbers.

    Like

  30. Anyone in the Twin Cities, Minnesota area?
    i’ll be there most likley even if i’m the only one.

    Like

  31. I am playing with the coordinate calculator. I understand that a consecutive Friday, Saturday, and Sunday should all give the same location, but they don’t. Am I mistaken or is there a bug in the implementation? This might lead to some extra meetups…

    I would also point out that people near the equator will have to travel farther. Maybe we should use UTMs.

    Like

  32. Unfortunately this doesn’t work well in the Vancouver BC area, as 90% of the time it is a multiple day hike through mountains to get to it, at which point it’s in a different spot already. So unless we get lucky and have it south of the mountains, or multiple xkcders have personal helicopters they can long-line in from, meet-ups will be very rare.

    Like

  33. Dumb question, how does one go about posting a graticule? Or is there one for a rural NY area already up? Avoca, Ny if anyone’s interested. Near Rochester or Corning NY.

    Like

  34. Man, three areas near me (Northeasth Ohio) and I am busy all day Saturday. I hope you have a great time without me Mentor, Kent, and Cleveland. I know it will be hard.

    Like

  35. Hey, I’m a Baltimoron! Someone was asking for them. Although I won’t be a Baltimoron much longer, as it’s off to Boston in the fall… this will be an interesting way to meet random people in my new city.

    Like

  36. I’m surprised no one has offered to create a simple utility for everyone to plug their major coordinates into. A simple webpage for others to access wouldn’t be hard. If anyone is interested, I’ll do it. 😀

    Like

Comments are closed.