Creating a hierplane object from a dataframe requires a bit more work because we need input from the user to construct valid JSON. Construction requires the user to provide a dataframe, title, and a list of settings.

hp_dataframe(
  .data,
  title = "Hierplane",
  parent_id = "parent_id",
  child_id = "child_id",
  child = "child",
  node_type = "node_type",
  link = "link",
  root_tag = "ROOT",
  attributes = NULL,
  styles = NULL
)

Arguments

.data

A dataframe with valid hierachical features (child_id, parent_id, etc.).

title

A title, defaults to "Hierplane", this serves as the header/title of the hierplane.

parent_id

Variable to be used for linkage references when generating children nodes.

child_id

Variable to be used for generating children nodes.

child

Variable to be used for labeling children nodes.

node_type

Variable to be used as node type (used for plane styling).

link

Variable to be used to generate lane tags (i.e. connections between planes).

root_tag

Keyword in link field to be used to identify top-level plane. Defaulted to "ROOT".

attributes

Variable(s) to be used for generating the attribute tags. If not specified (i.e. NULL), all variables with "attribute" in the name will be used.

styles

Assign styles to hierplane generated from hierplane_styles().