npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gs2geojson

v0.0.3

Published

simple google spreadsheet to geoJSON converter

Downloads

3

Readme

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

  1. npm install -g gs2geojson
  2. Have a Google Spreadsheet with lat, long columns and if you want, a hexcolor column. Publish spreadsheet, copy key.
  3. gogogeo YOURSPREADSHEETKEY
  4. 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

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

get spreadsheet key

Node and NPM

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

Add Your Key and Run

  1. 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

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