Lines

In CDP Data Visualization, a line chart displays information as a series of data points, or markers, connected by straight line segments. It reveals trends or change over time. Line charts show relationships within a continuous data set, and can be applied to a wide variety of categories. While line charts are similar to scatter plots, the line chart orders the measurements along the primary axis and it is often used to visualize a time series.

The following steps demonstrate how to create a new Lines visual on the World Life Expectancy dataset.

For an overview of shelves that specify this visual, see Shelves for lines visuals. For customization options, see Settings for lines visuals.

  1. Start a new visual based on dataset World Life Expectancy.
    For instructions, see Creating a visual.
  2. In the VISUALS menu, find and click Lines.

    The shelves of the visual changed. The mandatory shelves are X Axis and Y Axis.

    The fields placed on these two shelves may be easily swapped by switching X and Y.

  3. Populate the shelves from the available fields (Dimensions, Measures) in the DATA menu.
    • Under Dimensions, select year and drag it to the X Axis shelf .
    • Click the Y Axis shelf and select the life_expectancy field from the DATA menu by clicking it. This adds the field to the shelf.
  4. Click the field on the X Axis shelf, and in the FIELD PROPERTIES menu, select Order and Top K > Ascending.
  5. If the field on the Y Axis appears as a sum aggregate, change the aggregate to avg(life_expectancy):
    1. Click the field on the Y Axis shelf to open the FIELD PROPERTIES menu.
    2. Select Aggregates > Average.
    3. Click the x icon at the top of the FIELD PROPERTIES menu to close it.

    The shelf now contains the modified field with avg() aggregation function.

    Alternatively, you can change the aggregation at the level of the dataset, as described in Changing field aggregtion.

  6. Click REFRESH VISUAL.
    The Lines visual appears.
  7. Alias the year field as Year, and the life_expectancy field as Life Expectancy:
    1. Click the field to open the FIELD PROPERTIES menu.
    2. Select Alias and enter the alias name of the column in the text box as it should appear in the visual.
    3. Click the x icon at the top of the FIELD PROPERTIES menu to close it.

    The shelf now shows the column with its alias name.

  8. Optional: To see the individual countries in different colors, place the country field on the Colors shelf.
    To make the visual easier to understand, you can apply an Alias to it.
  9. Click REFRESH VISUAL again.

    The single line is broken out into country components, and CDP Data Visualization automatically provides a color legend.

  10. Optional: On the Tooltips shelf, add several fields from Dimensions and Measures.
    This enables you to see specific descriptive information in your visuals, such as input values, segment affiliation, and calculations.
  11. On the Filters shelf, add several Dimensions and Measures from the DATA menu.

    This enables you to dynamically control the data input and discover the data at a more granular level.

    For example, from Dimensions, drag country, un_subregion, un_region, year, and population onto the Filters shelf.

  12. On the Filters shelf:
    1. Click the population field to open the FIELD PROPERTIES menu.
    2. Select []Enter/Edit Expression.
    3. Enter [population]>10000000.
    4. Click VALIDATE & SAVE.
  13. Click REFRESH VISUAL.

    The updated Lines visual appears. Some of the lines do not originate at the beginning of the time series. This is because their population were lower than the 10,000,000 threshold that you set in the population filter.

  14. To limit the dimensions available to the Drill Into feature (it appears on dashboards that include the visual), specify the fields that can remain visible by placing them on the Drill shelf.
  15. Click the (pencil ) icon next to the title of the visual to change the title to 'World Population - Lines'.
  16. At the top left corner of the Dashboard Designer, click SAVE.