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

@jarp/ivy

v0.1.4

Published

Ivy is an Information Visualisation library for react.

Downloads

2

Readme

ivy

Ivy is an Information Visualisation library for react.

The problem

Visualising data in web development is a common enough task, and there are some great libraries for it. They fall broadly into two categories;

d3

One category is D3 (and yes, it's basically a category on its own), which is a fantastic library for building amazing looking graphs. It provides minute control and it does a lot more than just IV - D3 is also concerned generally with processing data. In this regard, it's a bit like a combination numpy/matplotlib. This is one of it's problems; D3 is a huge library to learn, and getting started with it can be quite a task.

This is coupled with the fact that d3 has very few opinions of its own. In experienced hands, this is a superpower, because it allows you to produce virtually any kind of plot you want. The downside to this however is that very little work is done for you. If you want a graph in d3, you need to write the code for it yourself - and sometimes that is quite a complicated task indeed.

The final problem with D3 is that it doesn't feel very ergonomic in modern web development. It follows patterns similar to Jquery; everything is imperative. In this regard, it truly does not integrate into modern stacks built with react or a similar library.

Component Libraries

In contrast to this, you have the second class of libraries, which provide pre-made graph components. These vary in quality, and they all have their own problems. None of the available libraries cover every single kind of graph, and so often you will end up using more than one if you are doing many kinds of visualisation.

Virtually all of the component libraries you will find are opinionated, and this is good; it makes using them much easier. But this comes at the cost of customisability. having a single component represent an entire graph means you lose control over smaller elements within it. This is not a problem you find with d3, where you create everything yourself, and thus, can control every aspect.

Finally, some component libraries use features that do not render properly on the server (the most obvious is canvas elements). If you are trying to build a static site (say with astro), then you can't ship the advertised 0 javascript because the graph requires client-side code to render. This isn't great for SSR either, so its something i'd like to avoid.

These 6 problems are the ones I set out to address, and while some are quite vain ambitions (for example, no high-level IV library will every be truly comprehensive), this is what, in an ideal world, I would like to achieve with Ivy.

  • focused
  • opinionated
  • declarative
  • comprehensive
  • customisable
  • SSR friendly

So the goal of ivy is high-level abstraction with low-level control.

For example, you probably don't need to be worrying about how you will convert a data point into a coordinate on a graph; but you very much might care about weather we display that data point as a dot or as part of a line, what colour it ends up being, and what happens when you click on it.