SankeyTree: Interactive d3.js Sankey Tree Visualization

View source: R/rhtmlSankeyTree.R

SankeyTreeR Documentation

Interactive d3.js Sankey Tree Visualization

Description

Create interactive d3.js visualizations of hierarchical data combining Sankey diagrams with tree layout.

Usage

SankeyTree(
  data = NULL,
  name = "name",
  id = "id",
  value = "size",
  childrenName = "children",
  maxLabelLength = 25,
  nodeHeight = 100,
  tooltip = NULL,
  treeColors = FALSE,
  categoryLegend = FALSE,
  terminalDescription = FALSE,
  numeric.distribution = TRUE,
  width = NULL,
  height = NULL
)

Arguments

data

Input. Should be a list with fields specified below.

name

The variable name of the field that specifies node name in data. Defaults to "name".

id

Should not change this.

value

The variable name of the field that specifies counts in data. Defaults to "size".

childrenName

The variable name of the field that specifies children in data. Defaults to "children".

maxLabelLength

Integer. Line wrapping will occur when the label of the node has width more than this value * 8 (pixels per char). Defaults to 25.

nodeHeight

Height of each node in pixels. Defaults to 100 pixels.

tooltip

Tooltip to attach to each node.

terminalDescription

Logical. Add description for terminal nodes? Defaults to FALSE.

numeric.distribution

Logical. Show numerical distribution for each node? If regression tree, then a histogram is plotted. If classification tree, then a horizontal bar plot is drawn. Defaults to TRUE.


NumbersInternational/rhtmlSankeyTree documentation built on Nov. 2, 2023, 9:48 a.m.