Tools for creating D3 JavaScript network, tree, dendrogram, and Sankey graphs from R

This packages is intended to make it easy to create D3 JavaScript network, tree, dendrogram, and Sankey graphs from R using data frames. !!! NOTE: Active development has moved to the networkD3 package. !!!


Trivial change to deal with deficiency in CRAN Markdown processor.

Fixed a bug in d3Sankey that prevented the parentElement from being customisable selected. Thanks to Bo Werth for identifying this.

Added linkWidth to d3ForceNetwork in order to set the link width. An absolute numeric width can be set as well as a JavaScript function for weighting by Value.

Improved documentation to demonstrate how a JavaScript function can be added to linkDistance, possibly to weight the distance by Value.

Thanks to Kevin Keenan for the suggestion.

Improvements to iframe width/height calculation for d3SimpleNetwork.

Removed 'TWh' from d3Sankey's number format. Thanks to Enzo Martoglio for spotting this.

Documentation improvements.

parentElement argument added to all d3Network functions. It allows the user to specify the resulting svg graph's parent element. This is especially handy for use with Shiny server. Thanks to John Harrison.

Minor documentation improvements.

Internal code cleaning.

Minor bug fix for d3ForceNetwork.

Improve d3ForceNetwork documentation.

Added d3Sankey to create Sankey diagrams. Thanks to Scott Chamberlain for the suggestion.

toJSONarray no longer quotes integers. Thanks to Mark Gene.

Change examples for d3ClusterDendro so that they run on Windows.

Collapse and expand clustered dendrograms.

Mouse over zooming with clustered dendrograms.

Added Reingold–Tilford Tree graph with d3Tree.

Added Cluster Denograms with d3ClusterDendro.

Added ability to zoom into and out of graphs with zoom option for d3ForceNetwork.

d3ForceNetwork example now uses tabular data.

Added d3ForceNetwork for creating force directed network graphs where link distance and group changes the graphs attributes.

d3SimpleNetwork and d3Network are now the same and have improved aesthetic customisability. d3Network is depricated. This is in advance of creating functions for force directed and other types of networks.

JSONtoDF command added for reading a JSON data file into R. It converts a specified array in the JSON data into a data frame.

Improvements to the internal workings of the commands. Now uses mustache templates to create the graphs.

Documentation and minor bug fixes.

Internal improvements using whisker templating.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("d3Network") by Christopher Gandrud, 2 years ago

Report a bug at

Browse source code at

Authors: Christopher Gandrud

Documentation:   PDF Manual  

Task views: Web Technologies and Services

GPL (>= 3) license

Imports plyr, rjson, whisker

Suggests RCurl

Imported by qgraph.

Enhanced by RQDA.

See at CRAN