Integrating Tableau Extensions with DataRobot

May 14, 2020
by
· 5 min read

This post was originally part of the DataRobot Community. Visit now to browse discussions and ask questions about the DataRobot AI Platform, data science, and more.

This tutorial shows how to integrate Tableau extensions with DataRobot. By the end, you will be able to:

  1. Generate automated insights using the DataRobot Insights extension.
  2. Run sensitivity analysis using the DataRobot What-if extension.

Requirements

  • You must have a full version of Tableau (2018.2 and later) to use these extensions. You cannot use a Tableau Public account to access the DataRobot extensions. See Tableau help for using extensions.
  • For Tableau Server and Tableau Online, you need to ensure that DataRobot’s app and prediction server URLs are whitelisted:
tableau 1
tableau 2

DataRobot Insights Extension

  1. Open a new Tableau book and add a new data source. You can upload a local Excel file as well.
  2. Create a new worksheet and try to visualize some interactions between the columns. For this example, we use AVG(Target) in columns and the Purpose of the loan in rows to see how the outcome is dependent on different categories.
  1. Create a new dashboard using the worksheet created above.
tableau 4
  1.  Drag the Extension button to the dashboard.
tableau 5
  1. Click My Extensions and select the DataRobot Insights extension. If you don’t see the extension file, you can download it from the Extensions Gallery (https://app.datarobot.com/tableau/insightshttps://app.eu.datarobot.com/tableau/insights, or similar on-premise domain location).
    tableau 5
  2. Select the DataRobot_Insights.trex file.
    tableau 5


    And click OK for Allow Extension.
    tableau 5
      
  3. Establish a connection between DataRobot and Tableau by providing the API Token.

    Click the account profile link to go to your DataRobot settings.

    tableau 5

  4. From the Account Profile page, select Developer Tools.
    tableau 5
  5. Copy the API token.
    tableau 5
  6.  Paste the API token in the Tableau extension (1) and click Login (2).
    tableau 5
  7. Select the worksheet, set the target column (Find insights related to), and click Start to launch automated insights.
    tableau 5

DataRobot will analyze all the features, and find associations between these features and the target column. This process could take from a few seconds to a few minutes depending on the volume of data.

tableau 13

After analysis

Once the computation is finished, you will see the correlations between the features and the outcome in an interactive manner.

tableau 14

These insights can be incredibly important to get a sense of what the data looks like before starting to build models. It can give an early indication of whether or not there’s any any predictive signal in the data.

In situations where there too many columns, these insights could be used for reducing the dimensionality of the data by eliminating columns that do not have any association with the target.

Important: Tableau restricts this extension to operate on 10,000 rows. If you think that more data is required for meaningful insights, then it is recommended that you connect DataRobot directly to the source data.

DataRobot What-if Extension

Note: The What-If extension requires a DataRobot Prediction Server and works for binary classification and regression models; time series and multiclass are currently not supported.

  1. Open a new workbook and create a new dashboard. This time there is no need to add data sources because you will access the DataRobot model deployment directly.
tableau 15
tableau 15
  1. Drag the Extension button to the dashboard again.
tableau 16
tableau 16
  1. This time, upload the DataRobot_What-if.trex file when asked for the extensions file.
tableau 17
tableau 17
  1. Connect to DataRobot by providing the API key (as you did for the DataRobot Insights extension).
  2. Paste the API token in the Tableau extension (1) and click Login (2).
tableau 18
tableau 18
  1. Once the connection is made, you will see all the deployments associated with your DataRobot account. Choose the deployment on which you want to run the scenarios (1) and click Start Simulation.
  2. In this area of the page you can create scenarios by entering values for different variables that the model uses for computing predictions. After entering the values, click Update prediction. This will display the predicted probability along with Prediction Explanations.
  3. Click + Add to comparison to add this scenario to the comparison list.
tableau 19
tableau 19
  1. Create more scenarios by tweaking the values of variables of interest and click Update prediction and + Add to comparison for each of these scenarios.
  2. On the Compare tab (next to the Simulate tab), you now see a side-by-side comparison of these different scenarios.
tableau 21
tableau 21

The consumers of these predictions can modify attributes and analyze how the outcome changes. In addition to providing a glimpse into the future, the what-if analysis also leads to faster decisions.

How to Enable Debug Mode on Tableau

If you have issues connecting Tableau to DataRobot, it can be very useful to enable Tableau’s debug mode, which allows you to gather more information so that you can narrow down the issue.

The below steps describe how to enable Tableau’s Debug Mode for Tableau 2019.1 or greater. If you are using Tableau 2018.2 or 2018.3, refer to Tableau’s trex debugger for the Chromium browse (available for download).

For Tableau 2019.1 or greater:

  1. Start Tableau Desktop and enable debugging:
    from a command prompt, start Tableau using –remote-debugging-port=8696

    For example:
    C:\Program Files\Tableau\Tableau 2019.3\bin>tableau.exe –remote-debugging-port=8696
  2. Open the Tableau Dashboard that includes the DataRobot Extension.
  3. Open Chrome browser and browse to http://localhost:8696.

    The image below will appear, listing the pages to inspect.



    1. Select the extension to inspect; in this example, it is the DataRobot What-If extension.
    2. Complete the fields in the Tableau dashboard and select the dashboard button that calls the DataRobot integration. (For the What-If extension, this is the Update Predictions button.)
    3. Switch back into the Chrome inspect page to view the network requests from Tableau Desktop and the associated status. Note, this will be in the Network tab on the page.

      The two images below show success cases:

      tableau-23.png
      tableau-24.png
      The first image provides the details around the call (the request URL, response headers, and status) and the second image provides a preview of the response message.
    4.  The next two images show an error condition and the resulting message back from DataRobot:

      tableau-26.png  
      The first image is showing a status code of 422 while the second image from the Preview tab displays the message back. In this case, the Tableau Extension is not properly handling the formatting of currency data types.

Looking for More Information on Tableau Extensions?

Check out the DataRobot blog, Introducing DataRobot Insights Extension for Tableau. Or go to our public documentation portal and navigate to the Using the Tableau Analytics Extension with Deployments section for more details.

ON-DEMAND WEBINAR
DataRobot + Tableau

Unlocking AI for BI

Watch now
About the author
Linda Haviland
Linda Haviland

Community Manager

Meet Linda Haviland
  • Listen to the blog
     
  • Share this post
    Subscribe to DataRobot Blog
    Thank you

    We will contact you shortly

    We’re almost there! These are the next steps:

    • Look out for an email from DataRobot with a subject line: Your Subscription Confirmation.
    • Click the confirmation link to approve your consent.
    • Done! You have now opted to receive communications about DataRobot’s products and services.

    Didn’t receive the email? Please make sure to check your spam or junk folders.

    Close
    Newsletter Subscription
    Subscribe to our Blog