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 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-data-vis

v0.4.0

Published

simple data visualizations using d3

Readme

simple-data-vis

simple-data-vis is a JavaScript module initially developed to visualize data gathered by the Simple Logging Service for its visualization page.

It is however generic enough that can be used to visual various types of data including CouchDB and Cloudant views.

Once installed the module can be used to render JSON Array data visually onto a web page (with D3). The data can be provided directly or via a REST endpoint.

Install

  • Node.js

    npm install --save simple-data-vis
  • browser

    Include the following files in your HTML file:

    <script src="https://d3js.org/d3.v4.min.js"></script>
    <script src="simpledatavis.js"></script>

    Also include the desired visualizations:

    <script type="text/javascript" src="vis/simpledatavis-barchart.js"></script>
    <script type="text/javascript" src="vis/simpledatavis-bubblechart.js"></script>
    <script type="text/javascript" src="vis/simpledatavis-piechart.js"></script>
    <script type="text/javascript" src="vis/simpledatavis-groupedbarchart.js"></script>
    <script type="text/javascript" src="vis/simpledatavis-stackedbarchart.js"></script>
    <script type="text/javascript" src="vis/simpledatavis-rangebarchart.js"></script>

Usage

The module can be initialized via JavaScript or using HTML data attributes:

  • HTML data attributes

    <div type="text" data-vis="https://some-data-url"
            data-vis-type="bar-chart"></div>

    data-vis - (Required) the url to retrieve the JSON data
    data-vis-type - (Optional) the type of visualization to use to render the data (e.g., bar-chart, pie-chart, bubble-chart, etc.)

    Additional attributes are available based on the visualization. See the Visualizations section for more information.

  • JavaScript

    SimpleDataVis(URL_or_JSONArray)
    	.attr('type', 'bar-chart')
    	.render(selector)

    where URL_or_JSONArray is the url to retrieve the JSON data or the actual JSON data. The render() function is called passing in the (CSS) selector of where the visualization will be placed.

  • Node.js

    var SimpleDataVis = require('simple-data-vis')
      
    SimpleDataVis(URL_or_JSONArray)
    	.attr('type', 'bar-chart')
    	.on('end', function (data, selection) {
    		// chart has been created and available in the (D3) selection
    		var svghtml = selection.node().outerHTML
    	})
    	.render()

    where URL_or_JSONArray is the url to retrieve the JSON data or the actual JSON data. The render() function is called and the SVG will be available as a D3 selection in the onEnd callback.

Additional Info

Demo

The /demo folder of the repository contains the source for this page.