Skip to main content
Create analytics (regression, classification, clustering and so on) from a data frame, and read its result.

Before you start

  • Exploratory Desktop is running and the project is open (Choose a project). Check with expl status.
  • You know the id of the data frame and its column names (expl dataframe list and expl dataframe get-schema <dataframe_id>).
  • analytics add and analytics edit work only when Allow create, edit and delete is on in System Settings > MCP / CLI. They do not ask for confirmation; deleting analytics does. See Confirmation and long-running operations.

Steps

1. Pick the type of analytics

The result lists each analytics type with its id, label and slots. Choose by the label and by what you want to find out. Do not guess the id.

2. Look up its slots and settings

Replace <analysis_type> with an id from step 1. The result shows the slots (where the columns go) and the settings of that type, with the names and the allowed values. Only these names work.

3. Create it

--analysis-type and --slots are required. --slots is a JSON object that puts column names in the slots, with the slot name as the key: a string for a slot of one column, an array for a slot of several columns. --settings takes a JSON object of the setting names from step 2 (a true or false setting is the string “TRUE” or “FALSE”).
Write slots.json with the slot names that get-template returned and the column names of get-schema. For example, for the correlation type (do_cor), which has one slot named columns that takes several columns:
Settings go in settings.json in the same way, for example {"cor_method": "spearman"}. Other types have other slot and setting names, so copy them from get-template. The command creates the analytics and runs it. The result carries the id (analyticsId) and the state of each output.

4. Read the result

list returns the analytics of a data frame, with the output types each one has (availableOutputTypes). get returns the type, the settings and the outputs, with the data as CSV. To read another output, pass a value of availableOutputTypes with --output-type.

5. Change it

Pass only what changes: --slots, --settings, --title, --analysis-type and so on. It runs the analytics again; if that fails, the definition goes back to the one before.

If it fails

For the arguments of any command, run expl <command> --help or expl tools describe "<command>". To do the same through MCP, see Create analytics in Use.