Skip to main content

Usage

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

Examples

General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.

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").

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

string
default:"Area Chart"
required
Area Chart. Area Chart.
array[object]
Type and appearance of an insight’s elements. A list in which each item is an object configuring the appearance of a particular insight element.
string
Specify the type of element.Values must be one of the following:TITLE DESCRIPTION CHART GRAPH STATS LEGEND LEGEND_COLOR_SCALE TABLE_CHART
string
The text shown for this insight element.
object
The element’s position and size. The position refers to the top-left corner of the rectangle representing the insight element, while the size is given by its width and height. For reference, the entire insight is 12 units wide and 9 units high, and the origin (0, 0) of the x/y coordinates is in its top-left corner.
integer
Horizontal position of the element’s top-left corner. In increments of 1; 0 being the left-most and 8 the right-most position.Values must be in the following range:
integer
Vertical position of the element’s top-left corner. In increments of 1; 0 being the top-most and 11 the bottom-most position.Values must be in the following range:
integer
The width of the element (in increments of 1).Values must be in the following range:
integer
The height of the element (in increments of 1).Values must be in the following range:
string
Name of the column containing the data to be used in this insight element. Required if the element is of type CHART or STATS.
string
Theme mode applied to the whole insight.Values must be one of the following:
  • dark
  • light
boolean
Defines if the cross-filters mode is set to auto.
boolean
Defines if the cross-filters and significant variables should ignore null values.
string
Insight default layout.Values must be one of the following:
  • plot
  • all
array[string]
Insight default layout elements.
string
Each item in array.Values must be one of the following:
  • title
  • description
  • filters
boolean
required
Defines if the cross-filters mode is set to relative.
[string, boolean]
default:"false"
Indicates if the insight can replay its original state or not.Values must be one of the following:
  • drillDown
  • directSelectionInGraph
  • nonPersistedColumn
  • True
  • False
string
A filter query. See Advanced query filters for more information.
string
required
Title of the insight.
array[object]
Comments that can be added to the chart. Any text can be added as annotation at certain abscissa point.
string
Alignment of the annotation.Values must be one of the following:
  • start
  • center
  • end
string
Text of the comment.
object
Annotations shape. Annotations shape configuration.
string
Annotation shape type.Values must be one of the following:
  • arrow
string
Annotation endpoint type for arrow shape.Values must be one of the following:
  • line
  • solid
  • none
string
Annotation shape line style.Values must be one of the following:
  • solid
  • dashed
string
Annotation shape line color.
array[number]
Annotation shape line dash.
number
Each item in array.
number
Annotation shape line width.
number
Annotation shape endpoint position x for arrow shape.
number
Annotation shape endpoint position y for arrow shape.
object
Annotations style. Annotation label style configuration.
string
Annotation label color.
number
Annotation label font size in pixels.
string
Annotation label font style.Values must be one of the following:
  • bold
  • italic
  • normal
[object, object, object]
X axis value. X axis value where the annotation is placed.
string
required
Annotation kind.Values must be one of the following:
  • VALUE
[number, string]
required
Annotation value in X axis.
[object, object, object, object]
Y axis value. Y axis value where the annotation is placed.
string
required
Annotation kind.Values must be one of the following:
  • VALUE
[number, string]
required
Annotation value in Y axis.
string
Chart description.
Chart footer text.
[string, object]
Chart size. Chart width & height if customized, undefined if in “Fit to screen” mode.
string
string.Values must be one of the following:
  • automatic
string
Chart subtitle.
string
Chart title.
[object, object, object]
Discretization configuration for a slot (x, y or color). There is different kind of discretization configurations depending on column type:
  • For quantitative ones a single count defining the number of bins is enough
  • For categorical ones we need the count of categories & its top (DESC) or bottom (ASC) direction
  • For dates we need a date period & a count of periods.
number
required
Number of bins in the axis.
boolean
Defines if the discretization in the X axis uses a exact or pretty number of bins.
boolean
Defines if the discretization in the X axis uses quantiles.
string
Chart markers foregroundColor.
boolean
Hides chart X axis title.
boolean
Hides chart Y axis title.
string
Interpolation method used for line or area chart.Values must be one of the following:linear monotone cardinal natural step step-before step-after
object
Stat configuration. For example, for a max stat it would be: { "stat": "max" } For stats that require a param like “countWhere” or “percentOfRowsWhere” it would be: { "stat": "countWhere", "params": { "value": "categoryName" } }
string
Stat kind.Values must be one of the following:sum mean variance standardDeviation skewness kurtosis min p25 p50 p75 max nNulls precision count cumSum nodeCount rForeground rForegroundColor rForegroundX uniqueValues valueCount countWhere percentOfRowsWhere
object
Stat parameters.
string
Value for the stat parameter.
string
default:"graphext"
required
Theme applied to the chart.Values must be one of the following:graphext dark excel fivethirtyeight ggplot2 googlecharts latimes powerbi quartz urbaninstitute vox
string
Theme color palette applied to the chart.Values must be one of the following:Horus Osiris Re Blues Greens Oranges Purples Reds Viridis Magma Plasma Red-Blue Blue-Orange Red-Grey Red-Yellow-Blue Red-Yellow-Green graphext dark excel fivethirtyeight ggplot2 googlecharts latimes powerbi quartz urbaninstitute vox
string
default:"dark"
Theme mode applied to the chart.Values must be one of the following:
  • dark
  • light
boolean
Defines if tooltip is enabled.
object
required
Slot value represented in the x axis. SlotValues could be of kind column, aggregated column, listIndex, nodeCount or metric.
string
The kind of then slot value.Values must be one of the following:
  • AGGREGATED_COLUMN
  • COLUMN
  • LIST_INDEX
  • NODE_COUNT
  • METRIC
string
The name of the slot value. Accepts variables of type category, boolean, number or date, as well as listIndex.
string
Aggregation method to apply to the column. Only for values with AGGREGATED_COLUMN kind.Values must be one of the following:SUM AVG VARIANCE STDEV MIN P25 P50 P75 MAX MODE UNIQUE_VALUES LIST LIST_UNIQUE CONCATENATE COUNT ELEMENT_COUNT ELEMENT_MIN ELEMENT_MAX ELEMENT_SUM ELEMENT_AVG ELEMENT_VARIANCE ELEMENT_STDEV
object
X Axis config options. Configuration options specific to X axis, including base axis properties and label display controls.
boolean
Whether to hide grid lines in the axe or not.
boolean
Whether to include zero in the axe or not.
boolean
Whether to use a logarithmic scale.
string
Axis labels numeric format.
number
Maximum width in pixels for axis labels before truncating with ellipsis.
string
Axis labels orientation mode. Controls how axis labels are oriented. auto (rotates only when needed), rotate (always rotated), or none (never rotated).Values must be one of the following:
  • auto
  • rotate
  • none
number
Labels rotation in degrees.
object
Axis ticks configuration. An object for axis tick configuration.
[number, string, object]
Ticks count. Equivalent to Vega axes tickCount prop.
number
number.
array[['string', 'number']]
Ticks values. Equivalent to Vega axes values prop.
[string, number]
Each item in array.
string
Chart X axis title.
object
required
Slot value represented in the y axis. SlotValues could be of kind column, aggregated column, listIndex, nodeCount or metric.
string
The kind of then slot value.Values must be one of the following:
  • AGGREGATED_COLUMN
  • COLUMN
  • LIST_INDEX
  • NODE_COUNT
  • METRIC
string
The name of the slot value. Accepts variables of type category, boolean or number, as well as nodeCount or a metric.
string
Aggregation method to apply to the column. Only for values with AGGREGATED_COLUMN kind.Values must be one of the following:SUM AVG VARIANCE STDEV MIN P25 P50 P75 MAX MODE UNIQUE_VALUES LIST LIST_UNIQUE CONCATENATE COUNT ELEMENT_COUNT ELEMENT_MIN ELEMENT_MAX ELEMENT_SUM ELEMENT_AVG ELEMENT_VARIANCE ELEMENT_STDEV
object
Y Axis config options. Configuration options specific to Y axis, including base axis properties.
boolean
Whether to hide grid lines in the axe or not.
boolean
Whether to include zero in the axe or not.
boolean
Whether to use a logarithmic scale.
string
Axis labels numeric format.
number
Maximum width in pixels for axis labels before truncating with ellipsis.
object
Axis ticks configuration. An object for axis tick configuration.
[number, string, object]
Ticks count. Equivalent to Vega axes tickCount prop.
number
number.
array[['string', 'number']]
Ticks values. Equivalent to Vega axes values prop.
[string, number]
Each item in array.
string
Chart Y axis title.
[array, array]
Selection applied to chart in the x axis. The chart will be zoom in over this selection.
array[number]
array.
number
Each item in array.
[array, array]
Selection applied to chart in the y axis. The chart will be zoom in over this selection.
array[number]
array.
number
Each item in array.