Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-geocoder

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-geocoder

Geocodes a file (JSON or CSV). Requires a Google-style geocoder.

  • 0.3.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

file-geocoder

Geocodes a file (JSON or CSV). Requires a Google-style geocoder.

For example:

Given a CSV,

address,              city,       state, zip
135 Morrisey Blvd,    Boston,     MA,    02125
1150 15th Street NW,  Washington, DC,    20071
242 West 41st Street, New York,   NY,    10036 

file-geocoder adds several geocoding fields (what's the deal with GeocodeAdminAreaLevel1?):

address,              city,       state, zip,   GeocodeLat, GeocodeLng, GeocodeStatus, GeocodeLocality, GeocodeAdminAreaLevel1, GeocodeCountry, GeocodeAddress
135 Morrisey Blvd,    Boston,     MA,    02125, 42.293929,  -71.047218, ROOFTOP,       Boston,          MA,                     United States,  "135 Morrisey Blvd, Boston, MA, 02125"
1150 15th Street NW,  Washington, DC,    20071, 38.904711,  -77.034647, ROOFTOP,       Washington,      DC,                     United States,  "1150 15th Street NW, Washington, DC, 20071"
242 West 41st Street, New York,   NY,    10036, 40.755819,  -73.988402, ROOFTOP,       New York,        NY,                     United States,  "242 West 41st Street, New York, NY, 10036"

Usage examples

Geocode a JSON file, hit http://localhost:8080 (how to setup a local geocoder):
file-geocoder \
	-f myaddresses.json \
	-a address,city,state,zip # list of fields containing the address, in order
Geocode a CSV file, hit Google, throttle geocoding requests to 1 per second (read up on their usage limits):
file-geocoder \
	-f myaddresses.csv \
	-a address,city,state,zip \ # list of fields containing the address, in order
	-h maps.googleapis.com \ # geocoding host
	-p 80 \ # geocoding port
	-s 1 # time (in seconds) to throttle the geocoding requests
Your laptop battery died before the geocoder finished. No problem. file-geocoder stores its work on a .db file. Let's resume the geocoding:
file-geocoder \
	-d myaddresses.db \ # database
	-a address,city,state,zip # list of fields containing the address, in order

Progress bar!

Progress bar!

Install

npm install file-geocoder -g

FAQs

Package last updated on 16 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc