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

pingplot

v1.1.0

Published

Turn a CSV or JSON file into a chart — PNG by default, SVG or self-contained HTML on request — via Observable Plot.

Downloads

29

Readme

PiNGplot

CLI that turns a CSV or JSON file into a chart — PNG by default, SVG or a self-contained HTML page on request. Charts come from Observable Plot: Plot defaults for styling, with custom color palettes as the one option.

Install

npm install -g pingplot

Or run from source (Node 18+, pnpm):

pnpm install
pnpm link

Use

printf 'month,traffic\nJan,10\nFeb,25\nMar,18\nApr,40\n' > report.csv
pingplot --data report.csv --mark bar --x month --y traffic

Writes report.png next to the data file and prints the path. The chart type comes from --mark; match your data to a type in catalog.md.

| Flag | Meaning | | --- | --- | | --data <file> | CSV or JSON input (.json = JSON, anything else = CSV) | | --mark <type> | chart type: bar, line, area, dot, donut, box, heatmap, rule, funnel, sparkline | | --x <field> | x channel (a field name in the data) | | --y <field> | y channel | | --format <fmt> | png | svg | html (default png) | | --color-range <hex,…> | ordered colors → the color scale's range | | --size <preset> | output size: default | doc (1200×800) | | --background <color> | white | transparent (default white) | | --interactive | hover tooltips — html only; png/svg stay static | | --spec <file> | a full Plot options object instead of inline flags |

Formats

  • png (default) — rendered server-side and rasterized.
  • svg — the raw chart as a well-formed SVG file.
  • html — a self-contained page that loads Plot from the CDN and renders in the browser, so it needs a network connection. --interactive adds hover tooltips here; png/svg never include them.

Colors

Plot defaults everywhere — no theming. --color-range is the only customization, and it maps straight to the color scale's range, so it works for categorical, sequential, diverging, or cyclical scales:

pingplot --data report.csv --mark bar --x month --y traffic --color-range "#1d4ed8,#0f766e,#b45309"

For a reusable branded chart, put the palette in a spec file instead.

Sizes and background

For charts that will sit inside a document and print or export to PDF, --size doc (1200×800) fills a letter/A4 content column and stays crisp. --size default leaves Plot's own sizing alone. --background sets the PNG/SVG background to white (default) or transparent — the donut scales with size too.

Spec files

A spec file is a JSON Plot options object — the way to build a complex chart or a branded one, with colors baked in. Marks are named by Plot constructor; data can live in the file or come from --data:

{
  "data": [{ "month": "Jan", "traffic": 10 }],
  "marks": [{ "type": "barY", "x": "month", "y": "traffic", "fill": "month" }],
  "color": { "range": ["#1d4ed8", "#0f766e"] }
}
pingplot --spec chart.json

Spec files render the same chart as equivalent inline flags. Donut is the one type a spec file can't express (Plot has no donut mark — pingplot draws it with d3-shape), so donut is inline flags only.

Chart catalog

catalog.md lists every chart type with the data shape it expects, the Plot marks behind it, and when to reach for it.

How it works

pingplot builds one JSON-serializable chart description — the data, the marks (named by Plot constructor), and plot options — and renders it two ways: server-side with Plot in jsdom for PNG and SVG, or embedded in a self-contained HTML page that rebuilds the same chart in the browser. Inline flags and --spec files both produce a description, so the two render paths can't drift. Donut is the exception: Plot has no donut mark, so pingplot draws it with d3-shape.

Develop

pnpm test

The suite covers parsing, loading, spec building, all three output formats, the client-side HTML script, and a catalog loop that renders every chart type from a committed fixture.

License

MIT