This section deals with using using Python code. can also be used through R code.

Bokeh is a service and Python interactive visualization library that lets users easily create interactive charts and dashboards, that can optionally be shared through an online service. There are several ways you can use in DSS:

  • To display interactive (pan/zoom/…) charts within a Jupyter notebook
  • To display interactive (pan/zoom/…) charts on a Dashboard

Documentation for is available at


You need to install the plotly package. The recommended method for doing so is to use a code environent. See how to install Python packages

Displaying charts in a Jupyter notebook

To display charts in a Jupyter notebook, use:

import plotly.offline as py


For example, to display a simple line:

import plotly.offline as py
import plotly.graph_objs as go

scatter = go.Scatter(x =[1,2,3], y = [10, 15, 13])
data = go.Data([scatter])


Displaying charts on a dashboard charts generated using Python code can be shared on a DSS dashboard using the “static insights” system.

Each figure can become a single insight in the dashboard. Each chart will retain full zoom/pan/select/export capabilities;

To do so, create static insights

from dataiku import insights

# f is a figure, or any object that can be passed to iplot()

insights.save_plotly("my-plotly-plot", f)

From the Dashboard, you can then add a new “Static” insight, select the my-plotly-plot insight

Refreshing charts on a dashboard

You can refresh the charts automatically on a dashboard by using a scenario to re-run the above piece of code.

This call to dataiku.insights code can be:

  • In a DSS recipe (use a regular “Build” scenario step)
  • In a Jupyter notebook (use a “Export notebook” scenario step)
  • As a custom Python scenario step