d3.graphSankey: d3.graphSankey

Description Usage Arguments Details Value

Description

d3.graphSankey creates and htmlwidgets using sankey in D3. Inputs must be a couple of data.frames in some specific format.

Usage

1
2
d3.graphSankey(dfNodes, dfLinks, nodeWidth = 15, strokeOpacity = 0.2,
  width = NULL, height = NULL)

Arguments

dfNodes

A data.frame which contains nodes data. Some columns are expected. Every row is a node.

  • "name"Optional column. Name

  • "tooltip"Optional column. Tooltip

  • "level"Required column. Horizontal position (it must start at 0 to n without holes.

  • "color"Required column. Color of the node

  • "value"Required column. Vertical size of nodes.

dfLinks

A data.frame which contains links data. Some columns are expected. Every row is a link

  • "tooltip"Optional column. Tooltip

  • "source"Required column. Source node. It must be integer. It is the position in nodes data.frame starting at 0.

  • "target"Required column. Target node. It must be integer. It is the position in nodes data.frame starting at 0.

  • "color"Required column. Color of the link

  • "value"Required column. Stroke width of link.

nodeWidth

Width of nodes.

strokeOpacity

Opacity of links.

Details

Inputs must be a couple of data.frames.

Value

An htmlwidget.


rocalabern/d3graphsankey documentation built on May 27, 2019, 12:13 p.m.