Spotfire® User Guide

Adding binned columns

You can use the Add binned column tool to group data, using the installed client. There are several different binning methods available.

About this task

See Binning for information about what binning is and how you can use it.
Tip: You can click on a column selector and select Auto-bin column to create a temporary, automatic binning on an axis.

Before you begin

The Add binned column tool can only be used in the installed client, but you can use Binning functions in calculated columns and in custom expressions to obtain similar bins in the web client as well.

Procedure

  1. On the menu bar, select Data > Add binned column.
    Tip: You can also click Add at the bottom of the Data in analysis flyout, or click the plus sign on the final data table node in the Data canvas, and select Add binned column.
  2. If you have more than one data table in the analysis, select the Data table to work on.
  3. Select a Column to bin.
    You can search for columns by typing in the field provided when the drop-down list is expanded. The values from the selected column will be sorted into several bins or categories based on your selections.
  4. Select a Bin method:
    Specific limits

    Lets you explicitly enter values, separated by semicolons, of the limits to use for each bin.

    For example, typing "20;30;40" will result in the following bins:

    x ≤ 20

    20 < x ≤ 30

    30 < x ≤ 40

    40 < x

    Even intervals

    Lets you specify the desired number of bins and divides the value range into equal intervals.

    This method works for all data types except string. The current data range is divided up into the specified number of bins. Empty values will be empty in the new column, and when loading linked data tables, new values will be placed inside one of the available bins.

    Even distribution of unique values

    Lets you specify the desired number of bins and divides the bins so that each one contains an equal number of unique values.

    The suggested division works for all data types and is made so that the bins each contain an equal number of unique values. Extra values are placed in the final bins, so if you have four values and you want three bins with one value in each bin, your final value will be placed in the third bin. Empty values will be empty in the new column, and when loading linked data tables the bin ranges will be modified to fit the new data range.

    Based on standard deviation

    Lets you divide the range into sections as described by the selected standard deviation multipliers.

    This method works for numeric columns only. The range is divided into sections as described by the selected standard deviation multipliers. Bins are created using any of the standard deviations +/- 0.5, 1, 2, 3, 6. In the example below, the range is divided into the following six subsections (µ denoting the average value for the column and s the corresponding standard deviation):

    lower limit -> (µ-3s)

    (µ-3s) -> (µ-s)

    (µ-s) -> µ

    µ -> (µ+s)

    (µ+s) -> (µ+3s)

    (µ+3s) -> upper limit

    Empty values will be empty in the new column, and when loading linked data tables the standard deviation will be recalculated.

    Substring

    Lets you group the values by the first or last characters in the column to be binned. The exact number of characters to take into account must be supplied.

    Example:

    Suppose the column to be binned contains family names, beginning with Adams and ending with Winter. To bin the rows according to the first letter in the name, use the Substring option considering one character from the beginning. Bin names are generated from the substring, and if Ignore case is used, the bin names are all formatted as upper case.

    Empty values will be empty in the new column, and when loading linked data tables the new values will be placed in suitable bins, taking the substrings into consideration.

    Values

    Lets you group categorical values into bins. Each added bin is listed, and so are the included values. You can Add, Edit and Remove bins as needed.

    To illustrate, suppose there are four values in a column; Boston, Los Angeles, Seattle and New York. You can, for example, let Boston and New York form a bin, and give the new bin value a name.
    Tip: You can quickly create a categorical grouping by marking items from the categories of interest and selecting Group from Marked Categories from the pop-up menu.
  5. Type a New column name for the binned column.
  6. Click OK.

Results

A new column is created.

You can edit a binned column from the expanded Data in analysis flyout or from the data canvas, same way as for other calculated columns.