Find out info about a date's geohash for a graticule or globally.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src mock it all Nov 10, 2016
test mock it all Nov 10, 2016
.babelrc deps Aug 7, 2016
.travis.yml node versions Feb 6, 2017
LICENSE license and desc May 5, 2015


Find the geohashing coordinates for a day and location.

I use this for xkcd Geohashing.

NPM Build Status js-standard-style Greenkeeper badge


npm install geohash-coordinates


import geohash from 'geohash-coordinates'

  date: '2015-03-27',
  location: '34.123,-111.456'
}, (err, result) => {
  console.log(result) // [ 34.520364031734495, -111.75641517793687 ]
  date: '2008-09-10'
}, (err, result) => {
  console.log(result) // [ -42.426807304339135, -15.618631484260248 ]

  date: '2008-09-10',
  location: '34.123,-111.456'
}, (err, result) => {
  console.log(result.graticule) // [ 34.380395695429435, -111.6951528305385 ]
  console.log(    // [ -42.426807304339135, -15.618631484260248 ]

  date: '2015-05-05', // Defaults to today
  days: 4 // Defaults to 4,
  location: '34.123,-111.456'
}, (err, results) => {
    // Results will be an array of results from `geohash.all` up to any date
    // that does not have Dow Jones opening data yet. So this is safe to call
    // on any date for any number of future dates.
    // It is designed so that by default it can be called on a Friday
    // and it will return the weekend (and the possible Monday holiday).


geohash.all(options, cb(err, result))

geohash.graticule(options, cb(err, result)), cb(err, result)) (required, string or date)

The date of the geohash coordinates that you want. You can pass in a date string or a date object, moment will be used to format the date as YYYY-MM-DD.

options.location (required, string or array or object)

The coordinates within the graticule that you want the geohash within. Can be in the format "latitude,longitude", [latitude, longitude], or {latitude, longitude}. This is not required fro the global hash.

options.cache (optional, default is no cache)

You also have the option to cache the result of the Dow request to disk. Any subsequent requests for the date will return the cached value. This value takes a path as a string for the directory where you want to cache the values.


This is written in ES6 and compiled to ES5 using babel. The code you require will come from the lib/ directory which gets compiled from src/ before each npm publish.


npm test