Creating a basic scatter visual
CDP Data Visualization enables you to create a basic Scatter visual.
The following steps demonstrate how to create a new Scatter visual representation, showing the trend of life-expectancy and GDP per capita for selected countries.
-
Start a new visual based on the
World Life Expectancy
dataset. The data source for this issamples.world_life_expectancy
.For instructions, see Creating a visual. -
In the visuals menu, find and click Scatter.
-
Populate the shelves from the available fields of Dimensions and
Measures in the DATA menu.
-
Under Measures, select
gdp_per_capita
and drag it to the X shelf. -
Under Measures, select
life_expectancy
and drag it to the Y shelf.
-
Under Measures, select
- In both cases, remove the aggregate to see individual data points.
-
On the shelf, on the
sum(gdp_per_capita)
field, click the (right arrow) icon to open the FIELD PROPERTIES menu. - Expand Aggregates and click the check mark next to Sum to remove the aggregate.
-
Repeate it for the
sum(life_expectancy)
fieldThe shelves now contain the modified fields.
-
On the shelf, on the
-
Click REFRESH VISUAL.
The Scatter visual appears.
-
Use the Colors shelf to see if a pattern emerges.
Under Dimensions, select
country
and drag it to the Colors shelf . -
Click REFRESH VISUAL and examine the resulting graph.
- Zimbabwe, in gray, shows an appreciable increase in life expectancy, but relative to other countries, very little economic improvement (measured as GDP per capita).
- United States, in purple, shows the expected improvement in both longevity and in GDP.
- Kuwait, in light green, is a true outlier that shows phenomenal increase in GDP per capita, but suffers a noticeable decrease in life expectancy from about the mid-century to present day.
-
Add aggregation back to the measures on the X Axis and
Y Axis shelves. This time, you want to see the average of the
dimensions.
-
On the shelf, on the
gdp_per_capita
field, click the (right arrow) icon to open the FIELD PROPERTIES menu. - Expand Aggregates and select Average.
-
Repeate it for the
life_expectancy
fieldThe shelves now contain the modified fields.
-
On the shelf, on the
- Optional: Turn on the Changing legend style and removing the legend feature.
-
Click REFRESH VISUAL.
The Scatter visual appears.
Figure 1. Contrasting Average Life Expectancy and GDP Per Capita, World-Wide -
Click the pencil/edit icon next to the title of the
visualization to enter a name for the visual.
In this example, the title is changed to 'World Population - Scatter'. You can also add a brief description of the visual as a subtitle below the title of the visualization.
- At the top left corner of the Dashboard Designer, click SAVE.
It is useful to remember at this point that GDP per capita is actually influenced by the population of the country.
As a next step, look at how you can show the population variation on this graph, by Adding size to a scatter visual.