Skip to main content

Explore Data with the Chart Builder

The Chart Builder is a great way to start exploring your data and identifying trends. In this example, we'll explore the data about the passengers aboard the Titanic.

Load Our Data

First, let's load the "Titanic Dataset" into our session.

titanic dataset

Create a Simple Scatter Chart

First, let's explore the relationship between a passenger's age and the fare they paid to board the Titanic. We can use the steps below to create a scatter plot showing each passenger's age and the fare they paid. We'll also split the passengers by gender and add a slider (which lets us manipulate the value of a specific variable) so we can see how each of the passenger classes compare:

  1. Click Plot Chart in the skill menu to open the Chart Builder.
  2. Select "Scatter Chart" for the type.
  3. Under Required Fields, enter "Age" for the X-Axis and "Fare" for the Y-Axis.
  4. Under Optional Fields, enter "Gender" for the Group and "Pclass" for the Slider.
  5. Click Submit.

scatter plot

We can see that, predictably, the fares are lower as you move from first class to second class to third class. What's interesting here is that the fares for women (the blue dots) seem to be generally be higher for men (the gold stars) across the classes. Let's explore that trend with some light computations and a new chart.

Compute and Then Plot

Let's compute the average fare paid by each gender for each passenger class. Navigate back to the Data tab, then:

  1. Click Aggregate > Compute in the skill menu.
  2. Enter "average" for the aggregate, "Fare" for the column, and "AvFare" for the new column name.
  3. Select "Gender" and "Pclass" for the grouping columns.
  4. Click Submit.

compute form

The resulting "titanic_Compute" dataset looks like this:

compute dataset

Now, let's use a bar chart to compare the average fare paid by men and by women in each passenger class:

  1. Click Plot Chart in the skill menu to open the Chart Builder.
  2. Select "Bar Chart" for the type.
  3. Under Required Fields, enter "Pclass" for the X-Axis and "AvFare" for the Y-Axis.
  4. Under Optional Fields, enter "Gender" for Group.
  5. Click Submit.

compute plot

Edit a Chart

We make our chart more clear by changing the title name, axis names, and adding a note of our findings:

  1. Click the Edit mode button in the bar chart's More menu.

    edit mode button

  2. Under Customize, rename the Chart Title to "Average Fare v Passenger Class for each Gender" and rename the Y-Axis to "AvFare".

    edit title and axis names

  3. Double-click Add Text and enter "On average, women's fares are higher than men's regardless of class".

    add text

  4. Click Submit.

We can see that the trend we noticed earlier holds true. This chart clearly illustrates that, on average, women paid more than men regardless of their class.