rickhuizinga/node-geocommons-geocoder


Node.js wrapper for calling the geocommons/geocoder Ruby interface

License: MIT

Language: JavaScript


node-geocommons-geocoder

Node.js wrapper for calling the geocommons/geocoder Ruby interface

Dependencies

A working ruby installation is required with the json and geocoder/us GEMs installed and available.

For the geocoder/us GEM, follow the build and installation instructions in geocommons/geocoder.

A database can be built from the TIGER/Line data source as described in geocommons/geocoder. Alternatively, a pre-built database can be found on the VM images for www.DataScienceToolkit.org (petewarden/dstk).

API Documentation

geocode(database : String, address : String, callback : function)

Asynchronously parse and geocode address.

	var geocoder = require('node-geocommons-geocoder');
	geocoder.geocode("/opt/tiger/geocoder2012.db", "12 Seahawks Way, Renton, WA, 98056", function(err, results) {
	  if (err) {
	    console.log(err.message);
	  } else {
	    console.log(JSON.stringify(results));
	  }
	});

Output:

[{"precision":"zip","city":"Renton","score":0.603,"fips_county":"53033","lon":-122.186447,"zip":"98056","lat":47.514671,"state":"WA"}]

Project Statistics

Sourcerank 2
Repository Size 160 KB
Stars 0
Forks 0
Watchers 0
Open issues 0
Dependencies 1
Contributors 1
Tags 1
Created
Last updated
Last pushed

Top Contributors See all

Rick Huizinga

Packages Referencing this Repo

node-geocommons-geocoder
Node.js wrapper for calling the geocommons/geocoder Ruby interface
Latest release 0.1.0 - Updated

Recent Tags See all

0.1.0 March 07, 2014

Something wrong with this page? Make a suggestion

Last synced: 2018-05-04 07:01:09 UTC

Login to resync this repository