Skip to main content
Transforms a set of columns (normally categorical) to x and y positions using a treemap layout. The treemap will be created hierarchically according to the order of columns in the input. At the lowest level of the treemap, points within the same category may be ordered from top to bottom and left to right using an optional numerical column.

Usage

The following example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
The following configuration transforms the categories into a treemap and uses the numerical column to order the nodes in the final squares.
layout_treemap(ds.salary, ds.position, ds.average_montly_hours, {
  "numerical_col": "average_montly_hours",
  "node_size": 8
}) -> (ds.x, ds.y)

Inputs & Outputs

The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced by name e.g. "churn-clf").
*columns
column[category|number]
x
column
required
Numerical column with the x position in the graph.
y
column
required
Numerical column with the y position in the graph.

Configuration

The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).

Parameters

numerical_col
string
Name of the numerical column. Used to order the nodes consecutively in the final treemap.
node_size
integer
default:"8"
Size of the nodes in pixels.Values must be in the following range:
1node_size < inf
v2
boolean
default:"false"
Enable use of version 2 of algorithm.
I