Types of visualization

There are many different types of visualization that you can create in Tableau Public, and we will focus on several of the most effective ones in detail. There are some that you should not use without practice, careful construction, and deliberate labels, such as bubble graphs, tree maps, and word clouds. We will not cover those here, since they have very limited uses.

Line graphs

Line graphs show data trends over time. Line charts, along with bar charts, are the most popular chart types used in data visualizations. For this type of time series chart, place a time or date dimension on the Columns shelf and a measure on the Rows shelf (the horizontal line chart is the most commonly used/useful line chart).

Line charts can then be modified and made more complex by adding a dimension on the Color shelf, which adds one or more additional lines to the chart. You can add different measures to the Color shelf as well and measures or dimensions on the Size shelf. But usually, adding too much complexity to the graph detracts from the understanding of the data. The following steps will help you create a line graph:

  1. Create a line graph that shows the average military expenditures as a percentage of the GDP between 2000 and 2010 by loading the World Bank Indicators data.
  2. Then, drag Date to the Columns shelf from the Dimensions pane.
  3. Drag Region from the Dimensions pane to the Color shelf.
  4. Drag Military Expenditures (% GDP) from the Measures pane to the Rows shelf.
  5. Click on the context menu on the pill for Military Expenditures (% GDP) and select average the measure, as shown in the following screenshot:
    Line graphs

From this line graph, we learned that the Middle East has had the most fluctuation in its average military spending over the past 15 years.

Continuous versus discrete date-time elements

This section on line charts is a good place to discuss continuous versus discrete date-time elements. Line charts can be set up either with a continuous time series, or a discrete time series. Most line charts used for visualizations are continuous and unbroken, as the one in this section is. However, time can also be set as discrete, and this will break apart the time series into sections (also called panes or panels), such as by year, quarter, and month. Dashboards are sometimes developed with a discrete time series to allow for a fast comparison of quarters or months. A time-data element can be set as discrete or continuous by right-clicking on the date-time data element and setting it to continuous or discrete. Doing so will radically change the line chart by switching to either a continuous line or a broken line based on the parts of the date selected. Most journalists and bloggers who use Tableau Public will want to use the continuous feature of date-time data to create unbroken line graphs, but experiment with continuous and discrete to check whether it adds value for your readers.

Tables

Tables are usually created to show a fine level of detail for your data. In most business organizations, people have traditionally consumed analytics created in tabular reports, which can be highly inefficient. Tables display counts or measures relative to categorical variables, such as department spending, the number of college graduates in a city, pollution levels in a stream, and so on. They are useful when you wish to look up individual data point values and compare them across one or more levels of dimensional detail. Tables are the most effective when they are used at a high level and they contain data summaries rather than very long and detailed tables. You should also add filters to table charts to narrow down the data displayed to give readers a focus point. Tables are often called crosstabs. Pivot tables are a specific type of table; they are not discussed here.

There are three table views in Tableau—text tables (sometimes called crosstabs), highlight tables, and heat maps. Any of these three chart types can be selected and modified easily from one chart to another, or added to and varied as needed. The text table is a good place to start experimenting when building a table.

Tip

The tables on the US government's spending were obtained from Tableau Software. Download the Tableau Public workbook from Tableau by visiting http://tinyurl.com/1962-2012spending and download the source data from Tableau Software by visiting http://tinyurl.com/spending-source-data.

Text tables are common tables, as seen in excel, for instance. This type of chart is available for creation from the top row of the Show Me tool. The following screenshot is an example of a text table. This is a simple table that shows the US government's spending as a percentage of the total spending per Department, for the US President's administration. For the table, we set the SUM(Percent of Total Spending) to the Text shelf, and this exposes the numeric values in the table rows and columns.

Note that the details of the spending (the numeric values) are easily seen, and there is no highlighting or context around the values (in terms of telling the reader whether the numbers are high or low). No shape or color marks are used. Also note that we set up various filters on the Filter shelf for this table view, including filters for only the top spending departments, and also limited to the last three presidential administrations (Clinton, Bush, and Obama). Because the data is only current through 2012 (and Obama started his first presidential term in 2009), we also set up a filter for Administration Year and filtered to show only years 1 to 4 corresponding to each president's 4-year term of office. This lets us compare equal numbers of years for each president:

Tables

The heat maps are tables that are used to communicate visual cues such as shape and area by referring to up to two quantity measures. The larger the shape (and usually, the deeper the color), the higher the measure value. This type of chart is available for creation from the top row of the Show Me tool. The following graphic is an example of a heat map, with the SUM(Spending) on the Color shelf (in this case, the darker the red color gradient, the more dollars were spent) and the SUM(% of Total Spending) is tied to the Size shelf (this controls the size of the square). In this case, the larger the square, the more the percentage of the total spending for each government department during successive US presidential administrations. The actual values of spending are obscured here so that the reader is not able to quickly compare the actual values.

The colors used can be easily customized for each graph by double-clicking on the gradient color bar titled SUM(Spending). The shape can be customized by selecting another shape in the dropdown list under the Marks title section. Filters that were similar to the Text table were set up. But this time, no filtering for presidents was created. All the presidents listed in the source data set are represented, from Kennedy to Obama, as shown in the following screenshot:

Tables

Highlight tables are often thought of as heat maps to the industry, as they use color gradient depth, saturation, or hue to highlight a quantity measure (such as highs and lows). The difference between a highlight table and a heat map is the lack of shape and size marks and the ability to see the underlying details in the highlight table. The following screenshot is an example of a highlight table. Note that the darker the color hue, the greater the percentage of spending to the total. The SUM(% of Total Spending) is duplicated in the Marks card for both the Color shelf and the Text shelf. This allows the color hue to be affected in proportion to the numeric value and also lets the value itself be shown in the rows and columns.

The colors used, and the other borders and elements, are completely customizable in the tables described in this section. The colors of this chart can be easily customized for each graph by double-clicking on the gradient color bar titled (in this case) SUM(% of Total Spending). The filters that have been created are identical to the first table named the Text table in this chapter section:

Tables

Bar charts

Bar charts are used to compare values and are perhaps the most useful of the chart types. Bar charts allow you to compare values across categorical dimensions (such as age groups, sex, race, cities, states, expense categories, departments, and so on; the list is endless), but they do not display the underlying data details as can be done in a table. Bar charts are used to compare values across dimensions. As we discussed in an earlier section in this chapter, length can be easily and naturally interpreted by readers. Therefore, bar charts are one of the more commonly used and appreciated charts used today.

Tip

The global population data used in the following section was downloaded from the World Bank by visiting http://data.worldbank.org/data-catalog/Population-ranking-table.

There are several types of bar charts in Tableau—horizontal bars, stacked bars (they compare parts to a whole and are the same as pie charts), side-by-side bars (they compare two categories), Gantt charts, histograms (they measure the frequency of events and plot distribution diagrams), and bullet graphs (a relatively new compact chart invented by Stephen Few, a visualization expert; you should become familiar with his work). In this section, we will only talk about a couple of these bar charts, but I invite you to experiment on your own and learn about these other chart types if you find them appealing.

The following screenshot shows a horizontal bar chart that depicts the top 10 countries by population. The chart reveals that China and India are the two largest countries by population (with over 1 billion citizens each), followed by the USA, Indonesia, and other countries with a much lower population:

Bar charts

Some key design elements that should be pointed out in the previous horizontal bar chart are we used Country as the dimension and SUM(Population) as the measure. To limit the graph to the top 10 countries in terms of population, we added the Country field to the Filters shelf and chose to filter the top 10 countries by population in the descending order, as shown in the following screenshot:

Bar charts

After filtering the data to get information about the top 10 countries in the year 2010, we sorted the bars by clicking on the quick-sort button on the x axis to sort the countries in descending order by total population.

The chart shown in the following screenshot is a stacked bar chart. In this chart, we have pivoted several fields in the previous two exercises to show, by region, the 10 most populous countries in the world. The stacked bar chart is a part-to-whole comparison chart that often works better than a pie chart because it relies on the bar's lengths rather than an interpretation of the angles:

Bar charts

Stacked bar charts are best used when there are just a few different dimensions, because too many dimensions and corresponding colors are difficult to interpret. We created this stacked bar chart by performing the following steps:

  1. Drag the Region field from the Dimensions pane to the Columns shelf.
  2. Drag Population: Total(count) from the Measures pane to the Rows shelf.
  3. Maintain the filters on Year for 2010 and the top 10 countries according to the total population.
  4. Drag Country from the Dimensions pane to the Color shelf.
  5. Click on the Color shelf on the Marks card and add a black border, which separates the bars more definitively.
  6. Clicked on the ABC icon in the toolbar to see the mark labels.

Geographic maps

Geographic maps are a useful chart type that can answer various questions related to locations. Before you select this chart type, consider the fact that having geographic data elements such as longitude, latitude, state, county, city names, or addresses does not mean that you have to use them in every case. Sometimes, a bar chart or another chart type can express a data story as well as a geographic map in, case map data does not actually add value. For example, sometimes it is better to group states, counties, or cities into regions and treat those as categories by using bar charts.

Tableau Public has a powerful geocoding function that is built-in and requires no additional programming (though many third-party providers exist for more robust maps with street and topographic map support). Geocoding is the process of recognizing geographic data, such as addresses, cities, counties, state country names, latitude, longitude, and so on, with the help of software and automatically encoding text strings and numeric values as geographic dimensions.

We built the following map to show the maximum life expectancy by country in the World Bank Indicators data set by performing the following steps:

  1. Multi-select Country in the Dimensions pane and Life Expectancy at Birth (total) in the Measures pane.
  2. Click on the Show Me card.
  3. Select the filled map.
  4. On the Marks card, click on the context menu for Life Expectancy at Birth (Total) and change it to a maximum, which means that it shows the maximum value for each country within the data set.
  5. Click on the context menu for the Color Legend, click on Edit, and select a color palette that's friendly to people who are color-blind, as shown in following screenshot:
    Geographic maps

From this map, we learned that the countries of central Africa have relatively worst life expectancies in the world.

When the data is loaded in Tableau Public, the software automatically encodes geographic fields with their average latitude and longitude. When you select one of these newly encoded fields, a small globe icon will be associated with the data element. You can click on one of the map icons on the Show Me dialog box, or you can double-click on any of those fields to add it to the visualization pane. The filled map icon is the most commonly used one for data visualizations.

Scatter plots

Scatter plots are a type of chart that show relationships between two measures to establish correlations and comparisons, find trends in data, and expose outliers. Scatter plots are one of the most effective forms of communicating mathematical relationships, and they are one of the seven basic tools of quality control.

You can build a scatter plot by adding a measure to the Rows shelf and a measure to the Columns shelf, or double-clicking on each of the measures in succession—the first measure will be placed on the Rows shelf and the second one on the Columns shelf. You can swap the measures (rows swapped with columns) by pressing the Ctrl key and clicking on the measures and select the Swap menu command icon. Alternatively, you can right-click and click on Swap on the shortcut context menu. Then, add one or more dimensions to the Marks card, dragging various dimensions to the various shelves, such as Color, Size, or Shape. This will put the scattered measures in context with the dimensions and allow for an analysis of the relationships.

Aggregation of the measures plays an important role here. The default behavior of Tableau Public is to aggregate measures (for example. by using sums or averages). This may be fine for most analyses, but you may want a clearer picture (or you may want to expose outliers) by looking at all the data points. You can override this aggregation behavior by disaggregating the data, which will display all the values in the data source for that measure. To do so, go to the Start button and select Analysis. Then, click on Aggregate Measures and deselect that menu command. Note that disaggregation may remove the information displayed from the tool tip when hovering over a data point. You can add the contextual values displayed in the tool tip by dragging dimensions and measures from the Data window to the Detail or Tooltip shelves in the Marks card.

If too many values are displayed, you can add the measures to the Filters shelf and set parameters in the filter dialog box to limit the number of data points (marks) that are being shown.

We created the scatter plot shown in the following screenshot, which shows the relationship of GDP and mobile phone users between 2000 and 2010 in Asia by country from the World Bank Indicators data, by performing the following steps:

  1. Drag Finance: GDP (current. USD) to the Columns shelf, which puts it on the x axis and makes it the independent variable.
  2. Drag Business: Mobile Phone Subscribers from the Measures pane to the Columns shelf, which makes it the dependent variable.
  3. Drag Date from the Dimensions pane to the Color shelf.
  4. Click on the context menu for the Color legend and assign the Cyclic color palette.
  5. Drag Region to the Filters shelf and select Asia.
  6. Drag Country to the Label shelf.
  7. Drag Population: Urban (count) to the Size shelf on the Marks card, which further encodes the default circles with the relative urban populations.

From this, we learned that the relationship between the GDP and Mobile phone subscribers in China is linear and that in other countries such as Japan, it is relatively consistent. It is also not surprising that the urban population of China is the largest, since it has the largest population. In the next chapter, you will learn how to create calculated fields that show you the percentage of the total that is urban rather than just a discrete number.

Scatter plots

Pie charts

Pie charts allow you to show the composition of parts to a whole, like slices in a pie. Pie charts should be used sparingly because humans cannot interpret angles and area that well. Noted visualization experts, including Stephen Few and Edward Tufte, are generally against using pie charts, except in limited circumstances. It is often said for data, authors consider using a stacked bar chart instead.

That being said, pie charts can sometimes be used effectively under certain circumstances. Limit the number of slices to 5 (at the most), and make sure that the slices are not too small and are visible. You can use pie charts effectively to give a general sense of how one dimension compares to another, but don't use it to report measures that are close in value. It is too difficult for people to interpret when the measures (the pie slices) are of similar sizes. Tableau Public, unlike other data visualization software packages, does not support 3D pie charts and drill-downs into pie slices. This is a good thing because these characteristics lead to confusing and misleading pie charts.

We made the pie chart shown in the following screenshot, which still uses the World Bank Indicators data to show the relative percentage of mobile phone users in the world by region:

  1. On a new worksheet, change the mark type to a pie on the Marks card.
  2. Drag Region to the Color shelf.
  3. Click on the context menu on the Color shelf to change the color palette to Cyclic.
  4. Drag Business: Mobile Phone Subscribers to the Size shelf on the Marks card.
  5. Click on the Color controller on the Marks card and add a black border.
  6. Drag both Region and Business: Mobile Phone Subscribers to the Label shelf on the Marks card.
  7. Click on the context menu for Business: Mobile Phone Subscribers on the Label shelf of the Marks card, select Quick Table Calculation, and choose Percent of Total.
  8. Filter Date by setting it to 2010.
  9. Click on the Context menu on the Color legend, select Sort, and sort Regions in the descending order by Business: Mobile Phone Subscribers:
    Pie charts

This pie chart shows that half of the mobile phone users in the world are in Asia. The pie chart is easy to use, and it does not mislead users. It provides them with the context that they need to sort through the information points quickly.

Using groups and sets

It can be useful to group dimension members into groups to report on these groups, as compared to others. For example, in the Life Expectancy Map that we built earlier, it might be helpful to add Canada, USA, and Mexico into a group or set named North American Countries.

A group is a simple set that is composed of the dimension members that you choose. In the following example, we set up the North American group by performing the following steps:

  1. Right-click on the Country field in the Dimensions pane.
  2. Select Create and then choose Group from the context menu.
  3. Give the group a name.
  4. Manually select the three countries that we want to put into the group.
  5. Click on the Group button and then name the group.
  6. Click on OK.

Note that the group field appears at the bottom of the Dimensions pane. It is considered to be metadata. It exists in the Tableau Public workbook, but it does not appear in your original data source.

In the following example, we added the group to the Color shelf on the Marks card of the map. Countries are colored by their membership in the group. Either they are in, or they are out, as shown in the following screenshot:

Using groups and sets

Similarly, we can create a set that groups members of a dimension by their adherence to the criteria that you establish.

We can create a set that identifies the top 25 countries by life expectancy, which will be used again to modify the map, from the World Bank indicators data source by performing the following steps:

  1. Right-click on the Country field in the Dimensions pane.
  2. Click on Create and then select Set.
  3. Rename the Set to Country Set.
  4. Click on the Condition tab rather than manually selecting the members of the Set so that it will be updated if and when we get new data.
  5. Create a condition that includes the top 25 countries by Health: Life Expectancy at Birth (total years).
  6. Click on OK, as shown in the following screenshot:
    Using groups and sets

We dragged the set from the bottom of the Dimensions pane and dropped it on the top of the field on the Color shelf on the Marks card, thus replacing it. Countries that are in the top 25 countries filtered according to life expectancy are colored blue, and all the others are gray, as shown in the following screenshot:

Using groups and sets
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset