Basic Scatter Visual

The following steps demonstrate how to create a new scatter visual representation on dataset World Life Expectancy [data source samples.world_life_expectancy].

  1. Start a new visual based on dataset World Life Expectancy [data source samples.world_life_expectancy]; see Creating Visuals.
  2. In the visuals menu, find and click Scatter Plot (row 3, column 2).

    selecting scatter chart type
  3. Note that the shelves of the visual changed. They are now X, Y, Colors, Size, Transition, Tooltips, and Filters.

    The mandatory shelves for scatter visuals are X and Y, representing the X-axis and Y-axis. Note also that the fields placed on these two shelves may be easily swapped by switching X and Y.

    shelves of scatter visual type
  4. Populate the shelves from the available fields (Dimensions, Measures, and so on) in the Data menu.

    • Under Measures, select gdp_per_capita and drag it over the X shelf on the main part of the screen. Drop to add it to the shelf.
    • Under Measures, select life_expectancy and drag it over the Y shelf on the main part of the screen. Drop to add it to the shelf.
  5. In both cases, remove the aggregate to see individual data points.

    • On the shelf, on sum(gdp_per_capita) field, click the right arrow) icon, expand the Aggregates menu, and click on the checkmark next to the Sum option to remove the aggregate.

      remove the aggregate
    • Note that the shelf now contains the modified field gdp_per_capita.

      gdp-per-capita field without the aggregate
    • On the shelf, on sum(life_expectancy) field, click the icon (down arrow), select Aggregates, and then select Remove Aggregate.

      remove the aggregate
    • Note that the shelf now contains the modified field life_expectancy.

      life-expectancy field without the aggregrate
  6. Click Refresh Visual.

    The scatter graph appears.

  7. Notice that while we can see the general shape of data and a few outliers, there is too little distinguishing information to help us understand the trends.

  8. Let's use the Colors shelf to see if a pattern emerges.

    Under Dimensions, select country and drag it over the Colors shelf on the main part of the screen. Drop to add it to the shelf.

  9. Again, click Refresh Visual, and examine the resulting graph.

  10. Notice that we can now see the trend for some of the countries very clearly, over time. The visualization is less than ideal, yet obvious details emerge:

    • 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.
  11. Add aggregation back onto the measures on the X and Y shelves. This time, we want to see the average of the dimensions.

    • On the X shelf, on gdp_per_capita field, click the (down arrow) icon, select Aggregates, and then select Average.
    • On the Y shelf, on life_expectancy field, click the (down arrow) icon, select Aggregates, and then select Average.
  12. [Optional] Turn on the Changing Legend Style and Removing the Legend feature.
  13. Click Refresh Visual.

    The scatter graph appears.

  14. Note that the distribution is an average of ALL years covered by the dataset, from 1990 through 2010. Still, some outliers are already clearly visible: Qatar and Kuwait for exceptionally high GDP per capita, Tokelau for high life expectancy at very low GDP per capita, and Sierra Leone, with the lowest life expectancy in the world.

    Contrasting Average Life Expectancy and GDP Per Capita, World-Wide
  15. Click (pencil icon) next to the title of the visualization to edit it, and enter the new name.

  16. Change the title to World Population - Scatter.
  17. At the top left corner of the Visual Designer, click Save.

    clicking to save

It is useful to remember at this point that GDP per capita is actually influenced by the population of the country.

Let's next look at how we can show the population variation on this graph, by Adding Size to Scatter Visuals.