Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

gs2geojson

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gs2geojson

simple google spreadsheet to geoJSON converter

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Make geoJSON

More specifically, make geoJSON from a Google spreadsheet because you can view that in a beautiful Mapbox map on GitHub. YEAH!

This is a super simple node.js command line tool (NPM) that fetches your data from Google Spreadsheets and transforms it to geoJSON with the option to write it to a file. When you push the file to GitHub after running the script, you can view it in your repo as a lovely map!

Quick How

  • npm install -g gs2geojson
  • Have a Google Spreadsheet with lat, long columns and if you want, a hexcolor column. Publish spreadsheet, copy key.
  • gogogeo YOURSPREADSHEETKEY
  • Use gogogeo YOURSPREADSHEETKEY --save to write it to a file to push to GitHub

See directly below if you want to know more about getting lat and long

Long How

Make a Spreadsheet

spreadsheet

  • Your spreadsheet should have a lat column and long column. You can do it manually or use this Mapbox Plugin or use a Geocoder.
  • If you want to pick your own markers colors, and a column titled hexcolor with the hexcolor values you want. The default is blue.
  • Click File > Publish to the Web > Start Publishing. Copy the key generated between the = and &:

get spreadsheet key

Node and NPM

  • You'll need to have Node.js installed on your computer.
  • In your computer's Terminal, type npm install -g gs2geojson to install it as a global module.
  • To do a test, you can type npm test and it will run with a sample spreadsheet.

Add Your Key and Run

  • In your Terminal type gogogeo YOURSPREADSHEETKEY
  • If you want to save the spreadsheet as a geojson file in the directory you're in type gogogeo YOURSPREADSHEETKEY --save
  • To pipe the data to you clipboard to paste somewhere else type gogogeo YOURSPREADSHEETKEY | pbcopy

Push to GitHub and View

  • Include it in a repo and push it to GitHub!
  • Go look at it on the internet!

Keywords

geojson

FAQs

Package last updated on 06 Nov 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