Discover this year's submissions to the Dataiku Frontrunner Awards and give kudos to your favorite use cases and success stories!READ MORE

Create univariate analysis card with plugin

DavidB42
Level 1
Create univariate analysis card with plugin

Hi,

I am using a plugin to read an input dataset, filter rows based on a column, and generate an output dataset from the filtered values. I would also like the plugin to create a univariate analysis card, for all columns in the output dataset.

I found the following on Github https://github.com/dataiku/dataiku-api-client-python/pull/48

worksheet_settings.add_card({"type": 'correlation_matrix', "columns": [{"name": "Age", "type": "CONTINUOUS"} , {"name": "Fare", "type": "CONTINUOUS"} ], "heatmapParams": {}})

 What is the corresponding command to create a univariate analysis? And without having to list all columns?

Thanks!

David


Operating system used: Windows 10

0 Kudos
1 Reply
Emma
Dataiker
Dataiker

Hey @DavidB42

The simplest way to find the necessary parameters is to use an existing card from your statistics worksheet and copy the structure that you see, using: 

yourcard.get_raw()

 

In this case, because you asked about univariate cards the command is:

worksheet_settings.add_card({
'type': 'univariate_header',
'xColumns': [{'name': 'COL_NAME', 'type': 'CATEGORICAL'}]})

Remember to save and run the worksheet after creation to ensure that it displays. 

Hope that helps! 

Emma 

0 Kudos

Labels

?
Labels (1)

Setup info

?
A banner prompting to get Dataiku