Difference between revisions of "426: Geohashing"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
m (Explanation: Just fixed the incomplete section to show the MD5 instead of MP5)
m (Added to the "the algorithm is built in such a way" section and changed "xkcd wiki" to "Geohashing wiki")
(18 intermediate revisions by 15 users not shown)
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
{{incomplete|explain terminology used in determining location (ie md5)}}
 
 
{{w|Geocaching}} is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in [[201: Christmas GPS]].
 
{{w|Geocaching}} is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in [[201: Christmas GPS]].
  
[http://wiki.xkcd.com/geohashing/ Geohashing] is a sport created by Randall based on reaching a random location determined by an [http://wiki.xkcd.com/geohashing/Algorithm algorithm] that uses a {{w|hash function}} that involves the current date, location and {{w|Dow Jones Industrial Average|Dow}} opening price.
+
[http://wiki.xkcd.com/geohashing/ Geohashing] is a sport created by Randall based on reaching a random location determined by an [http://wiki.xkcd.com/geohashing/Algorithm algorithm] that uses a {{w|hash function}} that involves the current date, location, and the {{w|Dow Jones Industrial Average|Dow}} opening price. The Dow Jones Industrial Average is a {{w|stock market index}} dealt in New York City.
  
 
The algorithm is built in a way that:
 
The algorithm is built in a way that:
 
*Makes it impossible to plan a meeting in advance - because of the Dow.
 
*Makes it impossible to plan a meeting in advance - because of the Dow.
 
*Changes every day.
 
*Changes every day.
*Gathers people that are nearby - everyone within the same 1°×1° grid square gets the same position.
+
*Will never generate a point in the same exact location twice (due to the incorporation of the date).
 +
*Gathers people who are nearby - everyone within the same 1°×1° grid square gets the same position.
  
 
The algorithm works as follows:
 
The algorithm works as follows:
# Take the current date in the format yyyy-mm-dd- and append the most recent opening value for the Dow Jones Industrial Average.
+
# Take the current date in the format yyyy-mm-dd and append the most recent opening value for the Dow Jones Industrial Average.
# Pass this sting through the MD5 algorithm.  
+
# Pass this string through the MD5 algorithm.  
 
# Divide the hash value into two 16 character halves, and convert each half to a decimal.
 
# Divide the hash value into two 16 character halves, and convert each half to a decimal.
# Take the integer portions of your current current coordinates and append the decimal hash values.
+
# Take the integer portions of your current coordinates and append the decimal hash values.
  
MD5 is a cryptographic hashing algorithm, and converts plaintext data into a seemingly random 128-bit (32 character) string. A good hashing algorithm should have three main properties: it is non-reversible (you cannot generate any plaintext data from the hash), a given sample of data will always produce the same hash value, and even a tiny change to the original plaintext should produce an entirely different hash.
+
{{w|MD5}} is a cryptographic hashing algorithm, and converts plaintext data into a seemingly random 128-bit (32 character) string. A good hashing algorithm should have three main properties: it is non-reversible, you cannot generate any plaintext data back from the hash, and a given sample of data will always produce the same hash value, but even a tiny change to the original plaintext should produce an entirely different hash.
  
Originally intended as a joke, there are people which do geohashing regularly. Please see the link to the xkcd wiki above.
+
The example co-ordinates are for the Google headquarters in California, as you can see here: [https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=37.421542+-122.085589&aq=&sll=37.0625,-95.677068&sspn=73.209607,135.263672&vpsrc=0&ie=UTF8&t=m&z=17&iwloc=A 37.421542 -122.085589]. The example date, May 26 2005, may reference the fact that the first edition of the Dow came out on May 26.
 +
 
 +
While geohashing was originally intended as a joke, there are people who geohash regularly. Please see the link to the Geohashing wiki above.
 +
 
 +
The title text may imply that people should bring games to their geohashing location on the Saturday following the comic's release.
  
 
==Transcript==
 
==Transcript==
Line 39: Line 43:
 
:[Combine integer part of location with fractional part of hash:]
 
:[Combine integer part of location with fractional part of hash:]
 
:Destination Coordinates: 37.857713, -122.544544
 
:Destination Coordinates: 37.857713, -122.544544
:Sample Implementation: [http://xkcd.com/geohashing/ http://xkcd.com/geohashing/]
+
:Sample Implementation: <nowiki>http://xkcd.com/geohashing/</nowiki>
  
 
==Trivia==
 
==Trivia==
*In response to comic [[353: Python]], the Python developers implemented the module <code>antigravity</code> in version 2.7+. This module contains a reference geohashing function.
+
* In response to comic [[353: Python]], the Python developers implemented the module <code>antigravity</code> in version 2.7+. This module contains a reference geohashing function.
 +
* Due to the 2019 hacking of the XKCD forum server, which the Geohashing wiki was also hosted at, the wiki was unavailable until February 2020. It is since back online under the new domain of [http://geohashing.site geohashing.site].
  
 
{{comic discussion}}
 
{{comic discussion}}
 
[[Category:Comics with color]]
 
[[Category:Comics with color]]
 +
[[Category:Stock Market]]

Revision as of 00:55, 8 September 2021

Geohashing
Saturday is game night
Title text: Saturday is game night

Explanation

Geocaching is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in 201: Christmas GPS.

Geohashing is a sport created by Randall based on reaching a random location determined by an algorithm that uses a hash function that involves the current date, location, and the Dow opening price. The Dow Jones Industrial Average is a stock market index dealt in New York City.

The algorithm is built in a way that:

  • Makes it impossible to plan a meeting in advance - because of the Dow.
  • Changes every day.
  • Will never generate a point in the same exact location twice (due to the incorporation of the date).
  • Gathers people who are nearby - everyone within the same 1°×1° grid square gets the same position.

The algorithm works as follows:

  1. Take the current date in the format yyyy-mm-dd and append the most recent opening value for the Dow Jones Industrial Average.
  2. Pass this string through the MD5 algorithm.
  3. Divide the hash value into two 16 character halves, and convert each half to a decimal.
  4. Take the integer portions of your current coordinates and append the decimal hash values.

MD5 is a cryptographic hashing algorithm, and converts plaintext data into a seemingly random 128-bit (32 character) string. A good hashing algorithm should have three main properties: it is non-reversible, you cannot generate any plaintext data back from the hash, and a given sample of data will always produce the same hash value, but even a tiny change to the original plaintext should produce an entirely different hash.

The example co-ordinates are for the Google headquarters in California, as you can see here: 37.421542 -122.085589. The example date, May 26 2005, may reference the fact that the first edition of the Dow came out on May 26.

While geohashing was originally intended as a joke, there are people who geohash regularly. Please see the link to the Geohashing wiki above.

The title text may imply that people should bring games to their geohashing location on the Saturday following the comic's release.

Transcript

Date (example): 2005-05-26
That date's (or most recent) DOW opening: 10458.68
[Concatenate, with a hyphen: 2005-05-26-10458.68]
md5: db9318c2259923d08b672cb305440f97
[Split it up into two pieces:]
0.db9318c2259923d0, 0.8b672cb305440f97
To decimal: 0.857713..., 0.544544...
Your location (example): 37.421542, -122.085589
[Combine integer part of location with fractional part of hash:]
Destination Coordinates: 37.857713, -122.544544
Sample Implementation: http://xkcd.com/geohashing/

Trivia

  • In response to comic 353: Python, the Python developers implemented the module antigravity in version 2.7+. This module contains a reference geohashing function.
  • Due to the 2019 hacking of the XKCD forum server, which the Geohashing wiki was also hosted at, the wiki was unavailable until February 2020. It is since back online under the new domain of geohashing.site.


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

Discussion

Isn't there an app for this? Or am I just confused? Unpopular Opinions (talk) 18:13, 13 February 2020 (UTC)

There are lots of them for different platforms, in fact. 162.158.203.21 10:02, 11 January 2021 (UTC)

The official implementation (http://xkcd.org/geohashing that redirects to http://carabiner.peeron.com/xkcd/map/map.html) doesn't seem to be working anymore.

There are other implementations, such as https://geohashing.info/ --XXOs (talk) 01:06, 8 September 2021 (UTC)

Should there be a thing about the 30W rule? --XXOs (talk) 01:06, 8 September 2021 (UTC)