How npm Packages are Linked by Dependencies

I created 2 graph visualizations based on data from the npm registry for Node Packaged Modules. A graph with all retrievable packages (WARNING: slow and may crash your browser) and one with packages, that have at least 10 dependent packages. Data for both graphs was collected on July 12, 2013.

Packages that can be installed via npm often rely on other packages, that need to be installed as well. Information about the registered packages and their dependencies can be queried using the npm package. See the code I used to gather the data.

Nodes are sized by their in-degree, i.e. the number of packages dependent on them. A small number of libraries clearly stand out, most prominently underscore with 3,283 dependent packages followed by the async (2,401) and request (2,106) packages.

The full graph contains 35,000 nodes and 66,551 edges and the graph showing the top packages 717 nodes and 942 edges.

Unfortunately, navigating the large graph doesn't really work and other browsers than Chrome are likely to freeze when trying to zoom or highlight individual nodes, which is why I created the version with the limited set of nodes as well.

Both graphs are rendered with the JavaScript library sigma.js and were pre-processed with the Gephi visualization platform.

Feel free to post feedback and questions in the comments below.

comments powered by Disqus