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

csv-2-geo-json

v0.0.2

Published

A thing to convert CSV with lat/lon into kdtree + data files

Downloads

2

Readme

csv2GeoJSON

A still largely unfinished cli tool to help convert CSV spreadsheets into usable KDTREE indexes with records so browsers can have simple geolocation functionality for small datasets without needing any moving parts on the backend.

This was mostly developed to scratch an itch but feel free to improve.

And yeah, it uses coffee-script, so get your hate on.

Pull Request welcome.

Installation

$ [sudo] npm install -g csv2GeoJSON

Usage

$ csv2GeoJSON {ARGS}

Run without any arguements to see usage.

When supplied with just an in input file and output folder it will iterate over the CSV file and produce a file containing the KDTree index and then a json file for each record in the dataset.

For a suggestion on how to use these files look at this gist: https://gist.github.com/85f5ab526a9158b2cd30

Recommendations

For small datasets (i.e few hundred records), it is probably worth outputting the data as a single file and loading the entire thing up asynchronously. For larger datasets or instances where each record is large then just load up the index.json and load the individual record files as required.

If you have a very dynamic dataset that changes frequently you may find this module is not so helpful. It was designed with static write-once, read-alot datasets in mind.

Why

Becuase I can't stand the endless amounts of poorly written geospatital search implementations using PHP+Mysql that mostly don't use any kind of vaguely sensible indexing and bring needless complexity to the table. I also find MongoDB's geospatial to be a bit lacking and again has too many moving parts for what such a simple use case.