Tutorial | Build and edit a story manually#

Get started#

Dataiku Stories empower business users to quickly build contextualized, interactive, and up-to-date data presentations so that they can more easily understand and share the stories hidden in their data. Through drag-and-drop visual interfaces, business users can collaboratively create meaningful reports with filters, annotations, and interactive elements that are automatically refreshed with new data.

Note

For more information, see the Concept | Dataiku stories article.

Objectives#

In this tutorial, you will:

  • Set up the relevant environment to build your story.

  • Create a story and edit its content for a clean final presentation.

Prerequisites#

To complete this tutorial, you’ll need:

  • Dataiku 13.3 or later.

  • Having at least the Contributor role for a workspace.

  • The image for illustration purposes when building the title slide.

Create the project#

  1. From the Dataiku Design homepage, click + New Project.

  2. Select Learning projects.

  3. Search for and select Build and edit a story manually.

  4. If needed, change the folder into which the project will be installed, and click Install.

  5. From the project homepage, click Go to Flow (or type g + f).

Note

You can also download the starter project from this website and import it as a zip file.

Use case summary#

Let’s say our Human resources team wants to analyze the attrition rate in the company to improve employee retention.

In this tutorial, the objective is to use the story feature to share the stories hidden in the data. The HR team could present the findings to company managers to take action against turnover.

Note

This tutorial relies on the IBM HR Analytics - Employee Attrition & Performance dataset that has been artificially manipulated to add some geographical data.

Select and configure a workspace#

The very first thing to do to build a story is to ensure we have a workspace to store our stories and their associated datasets. In this section, we will:

  • Select a workspace.

  • Add the relevant dataset to make the data available for our story creation.

Select a workspace#

Let’s start by selecting the workspace. To do so:

  1. From the waffle (Waffle icon.) menu, click Workspaces.

  2. Select a workspace you can use for this tutorial, in which you have at least the Contributor role.

Note

If you don’t have any workspace, see How-to | Create a workspace.

Add the data for building the story#

Now that you have selected the relevant workspace, we need to publish the curated dataset containing the Human Resources data that will be used in this business user scenario.

To do so:

  1. From the workspace home page, click the Add Content button in the top right corner.

  2. Click Dataset to indicate the type of content to add.

  3. In the Project field, select your project.

  4. In the Dataset field, select HR_Employee_Attrition_Enriched_prepared.

  5. Click Add Content to validate. The dataset is added to the workspace homepage.

Dataset added to the workspace.

Create the story#

  1. From the workspace homepage, click the Add Story button.

  2. In the Title field, enter HR Report.

  3. Select the HR_Employee_Attrition_Enriched_prepared dataset as the Datasets to synchronize.

  4. Click Create. The story opens in a new tab, with the following interface.

Overview of the story upon creation.

Note

For the interface description, see the Reference | Story user interface article.

Add a title slide#

Let’s use the first slide as a presentation title slide that will only include a background image and a title.

Add an image as the background#

First, let’s add the background image.

  1. In the header menu, click Media > Import an image to add an image.

  2. Go to the directory where you’ve downloaded the image and select the image.

  3. Resize it so that it fully covers the slide.

    Tip

    Use the corner selection handles to resize the image without distorting its proportions.

  4. Right-click it and select Elements order > Sent to back.

  5. Click and select Lock to avoid any changes.

    Tip

    You can also double-click and select lock.

Dataiku screenshot of the lock icon.

Add text for the title#

Now, let’s add the title.

  1. In the header menu on top of the story, select Text > Extra large.

  2. Enter the slide title: HR Report.

  3. In the Style tab, under the Text dropdown, set the font size to 36.

  4. On the popover action bar, click on the color icon, and set it to white (as the background image is dark).

    Customizing the text format.

Build content slides with charts#

See a screencast covering similar steps to those required here.

Let’s add new slides with charts for the analytics content.

  1. In the slide navigator at the bottom of the page, click the + button to add a new slide.

  2. In the header menu on top of the story, select Text > Extra large and enter the following slide title: Knowing Our Employees.

  3. Adjust the text box size and in the Style tab of the inspector:

  4. Align the text to the left.

  5. On the popover action bar, click on the color icon, and set it to blue (top left blue in the palette).

  6. Add the following charts by dragging and dropping the columns from the data bar to the slide and setting up each chart using the Setup tab of the inspector panel:

    Columns used Chart title Chart type Aggregation type
    Chart 1
    • EmployeeCount
    • Gender
    Gender
    Pie Sum on EmployeeCount
    Chart 2
    • EmployeeCount
    • EducationField
    • Gender
    Education fields Horizontally stacked bars Sum on EmployeeCount
    Chart 3
    • EmployeeCount
    • Department
    • Gender
    Distribution per department Butterfly Sum on EmployeeCount
    Chart 4
    • EmployeeCount
    • JobRole
    • Gender
    Job role per gender Bars Sum on EmployeeCount
    Chart 5
    • EmployeeCount
    • JobSatisfaction
    • Gender
    Job satisfaction Histogram Sum
    Chart 6
    • DistanceFromHome
    Average commute Metric Average

    Note

    When selecting the aggregation function, you can set a unit in the Unit field, such as km for the commute distance.

  7. Position the charts properly on the slide and potentially customize their styles.

The final slide could look like that:

Slide 2 overview.

Now let’s add a second slide to analyze the turnover in the company.

  1. Add a new slide with a text box for the title: Analyzing Current Turnover.

  2. Add the following charts by dragging the columns from the data bar to the slide and setting up each chart using the Setup tab of the inspector panel:

    Columns used Chart title Chart type Aggregation type
    Chart 1
    • EmployeeCount
    • Attrition
    Global attrition
    Pie Sum on EmployeeCount
    Chart 2
    • EmployeeCount
    • Department
    • Attrition
    Attrition per department Bars Sum on EmployeeCount
    Chart 3
    • EmployeeCount
    • JobLevel
    • Attrition
    Attrition per job level Butterfly Sum on EmployeeCount
    Chart 4
    • EmployeeCount
    • YearsAtCompany
    • Attrition
    Attrition based on seniority in company Vertically stacked bars Sum on EmployeeCount
    Chart 5
    • EmployeeCount
    • YearsInCurrentRole
    • Attrition
    Attrition based on seniority in role Vertically stacked bars Sum on EmployeeCount
    Chart 6
    • EmployeeCount
    • BusinessTravel
    • Attrition
    Attrition based on travel frequency Vertically stacked bars Sum on EmployeeCount
  3. Position the charts properly on the slide and potentially customize their styles.

At this stage, your slide could look like that:

Customizing the text format.

Tip

In the inspector, use the Chart options section to customize the charts (size, value display, position, margins, etc.).

Add some actions on click#

As any good story needs a good storyline, you can create links between slides to manage the navigation thanks to different actions provided when clicking on a text field or a shape available on a slide:

  • Reload data

  • Clear filters

  • Previous page

  • Next page

  • Go to slide

  • Fullscreen

Let’s add a Next page action to an arrow shape on slide 2. To do so:

  1. In the slide navigator, return to slide 2.

  2. In the header menu, click Shape > Arrows and select the right arrow.

  3. Position it at the bottom right of the slide.

  4. In the Style inspector on the right, set the Stroke color to pink or any color of your choice.

  5. Navigate back to the Setup inspector, scroll down to the Actions section, and in the Actions on click field, select Next Page.

Adding the next page action to a shape.

What’s next?#

Congratulations! You’ve just created and modified your story manually with basic elements (text, charts, images) and learned how to present it.

Now, check out Tutorial | Explore and filter the data in your story to see how to edit and filter the source data from the story itself to fine tune the data visualization.