Building effective visuals

QuickSight visuals are interactive and support customization, sorting, and filters. In this section, we will see the different options and recommendations. The following are the options under QuickSight:

  • Bar chart
  • Line chart
  • Pivot table
  • Scatter plot
  • Tree map
  • Pie chart
  • Heat map
  • Autograph

Changing visual type

To change the current visual of a chart, follow the steps as follows:

  1. Select the analysis you wish to change.
  2. Next, expand the Visual types section and you will see all available options as shown in the following screenshot:

    Changing visual type

    Figure 4.14: Visual types

  3. Now you can select the chart you want to change to.
  4. Alternatively, you can select the autograph option, which is represented by the lightning sign. QuickSight will use the most appropriate visual type based on the dataset.

Bar charts

QuickSight supports a wide range of bar charts for single-measure, multi-measure, stacked, or stacked 100% in horizontal or vertical orientation. In the next few sections we will discuss how to best use bar charts.

Simple bar charts

For single/multi measures against one dimension, select the simple bar chart, either horizontal or vertical. Let's see an example of multi-measure bar charts with the USA-Census-S3-DataSet:

  1. Select the visualization type: horizontal bar charts.
  2. Select measures and dimension fields. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Format the columns for sorting, currency, format, decimal places, and units as desired.
  4. Optionally, change the display range by dragging and/or moving the selected window as identified by 5 in the following screenshot:

    Simple bar charts

    Figure 4.15: Simple bar chart

This completes the creation of a simple horizontal bar chart.

Stacked bar charts

For metrics that have several categories, you can use stacked bar charts. To explain this, we will use the AWS cost, usage, and report data that has details on where the AWS dollars were spent for your account.

Note

To enable AWS cost, usage, and report data to automatically extract and upload to your S3 account, refer to this link https://aws.amazon.com/about-aws/whats-new/2016/08/aws-cost-and-usage-report-data-is-now-easy-to-upload-directly-into-amazon-redshift-and-amazon-quicksight/.

Let's look at the steps to build a useful stacked horizontal bar chart showing the unblended cost aggregated by hour, grouped by the AWS service code as shown in the next screenshot:

  1. Select the visualization type: vertical stacked bar chart.
  2. Select measures, dimension, and group fields. The best way to set them is to use the Field wells options as shown in the following screenshot, identified with the number 3. The Group/Color field should be the category.
  3. Next, format the columns for sorting, currency, format, separator decimal places, and time aggregation (hour in this case) as shown in the following screenshot:

    Stacked bar charts

    Figure 4.16: Stacked bar chart

This completes the stacked bar chart creation. To use a scale based on 100% instead of the value, select the vertical 100% bar chart option. The resultant chart is shown in the following screenshot:

Stacked bar charts

Figure 4.17: Stacked bar with 100% option

Line charts

Line charts are a great way to visualize trends of multiple metrics over a period time. QuickSight provides two types of line charts - simple line and area line chart. Let's review them with an example.

Simple line chart

We can use a line chart to compare values for one or more measures over a period of time. To create a line chart with cost and rate aggregated on a daily basis, follow the steps as follows:

  1. Select the visualization type: line chart.
  2. Select time-based field for X-axis and measures for values. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Next, format the columns for sorting, currency, format, separator decimal places, and time aggregation (day in this case) as shown in the following screenshot:

    Simple line chart

    Figure 4.18: Simple line chart

  4. Optionally, you can create a multi-dimension chart by selecting one measure as value and one field for dimension. For example, if we want to see UnblendedCost by various product codes in the preceding dataset, you will get a chart as shown in the following screenshot:

    Simple line chart

    Figure 4.19: Line chart multiple dimension

    Note

    When selecting multiple dimension line charts, only one measure can be reported as a value.

Area line chart

Area line charts can also be used to compare one or more measures over time like the simple line chart; the key difference is the appearance; here a colored area instead of a line represents each value.

Let's review the steps to create an area line  chart with cost and rate aggregated on a daily basis; following are the steps:

  1. Select the visualization type as area line chart.
  2. Select time-based field for X-axis and measures for values. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Next, format the columns for sorting, currency, format, separator decimal places, and time aggregation (day in this case) as shown in the following screenshot:

    Area line chart

    Figure 4.20: Area line chart

Pivot tables

Pivot tables are great for those who want to slice and dice measures across different dimensions in pure number form. Pivot tables allow sorting and statistical functions for further analysis. Let's review the steps to create a pivot table for sum of cost and rate grouped by, first, the date of service and then by the product.

  1. Select the visualization type as pivot table.
  2. Select time and product as the rows and measures rate and cost as values. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. This will populate the pivot table. Optionally sort the computed measures if needed.
  4. The final chart is shown in the following screenshot:

    Pivot tables

    Figure 4.21: Pivot table

Adding statistical functions

Optionally, to the pivot table, we can add statistical functions like running total, and percentage of table to the pivot table cells. Following are the functions that are available in calculations:

  • Running total: This gives the sum of a given cell value and values of all cells prior to it
  • Difference: This gives the difference of a given cell and the immediate prior cell
  • Percentage difference: This gives the difference between a cell value and the value of the cell prior to it divided by the value of the cell prior to it
  • Rank: This provides the rank of the cell value compared to the values of other cells
  • Percentile: This provides the percent of the values that are at or below the value for the given cell

To select the statistical function for a value, click on the right side of the value that brings up a pop-up and then select Add table calculation as shown in the following screenshot:

Adding statistical functions

Figure 4.22: Pivot table statistical options

The calculations can be applied in one of the following ways:

  • Table across: The calculation applies across the columns of the pivot table. This is the default
  • Table down: The calculation applies down the rows of the pivot table
  • Table across down: The calculation applies across the columns and then down the rows of the pivot table
  • Table down across: The calculation applies down the rows and then across the columns of the pivot table
  • Group across: The calculation applies across the columns of the pivot table, with subtotals by group
  • Group down: The calculation applies down the rows of the pivot table, with subtotals by group
  • Group across down: The calculation applies across the columns and then down the rows of the pivot table, with subtotals by group
  • Group down across: The calculation applies down the rows and then across the columns of the pivot table, with subtotals by group

The following screenshot shows how to access these menu options for a given calculated function:

Adding statistical functions

Figure 4.23: Pivot table statistical function selection

This completes usage of pivot tables. Now let's review how to build and use scatter plots.

Scatter plot

Scatter plots are a great way to visualize two or three measures for a dimension. Let's take an example for visualizing the USA census data and see how a scatter plot allows quick analysis of two measures: median income and population count for the zip code dimension.

Following are the steps to create a scatter plot:

  1. Select the visualization type as scatter plot.
  2. Select PopulationCount as measure for X axis, MedianIncome as measure for Y axis, ZipCode as the dimension for Group/Color of the bubbles and MeanIncome as size of bubble. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Next, format the measures and dimensions for currency and number respectively.
  4. This will populate the scatter plot as shown in the next screenshot.
  5. A scatter plot cannot be sorted.

    Scatter plot

    Figure 4.24: Scatter plot

Note

You must use aggregation for measures in the X axis, Y axis, Size, or Field wells, and cannot apply aggregation to the dimension you choose for the Group/Color.

This completes usage of a scatter plot. Now let's review how to build and use tree maps.

Tree map

Tree maps are another intuitive visualization for one or more measures against a single dimension. It is a graphic that has a collage of several rectangles where each rectangle size represents the proportion of the value for that item to the whole of the dimension for the selected measure. Rectangles also have color-coding for easily differentiating the values for the measure with darker colors indicating higher values and lighter colors indicating lower values.

Let's take an example for visualizing the USA census data and see how a tree map allows quick analysis of two measures: median income and population count for the zip code dimension.

Following are the steps to create a tree map chart:

  1. Select the visualization type as tree map.
  2. Select PopulationCount as measure Size of the blocks, MedianIncome as measure for color, and ZipCode as the dimension for grouping. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Next, format the measures and dimension for currency and number respectively.
  4. This will populate the tree map as shown in the following screenshot:

    Tree map

    Figure 4.25: Tree map

This completes usage of a tree map. Now let's review how to build and use pie charts.

Pie chart

Pie charts are another popular charting option for a single measure and dimension where the graph is a circle which is divided into several slices. Each slice/wedge in a pie chart represents the proportion of the value for the item to the whole. Let's take an example for visualizing the USA census data and see how the measure population count is visualized by zip code. Following are the steps to create a pie chart:

  1. Select the visualization type as pie chart.
  2. Select PopulationCount as value and ZipCode as the dimension for grouping. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Next, format the measures and dimensions for currency and number respectively.
  4. This will populate the pie chart as shown in the following screenshot:

    Pie chart

    Figure 4.26: Pie chart

This completes usage of pie charts. Now let's review how to build and use heat maps.

Heat map

A heat map shows a measure in a table format where each cell is an intersection of two dimensions in color. The color-coding easily differentiates the values for the measure with darker colors indicating higher values and lighter colors indicating lower values.

Let's take an example for visualizing the AWS usage metrics and see the measure usage amount in seconds for every intersection of operations and time (rounded to hours). Following are the steps to create a heat map:

  1. Select the visualization type as heat map.
  2. Select Operation as the dimension for Rows, LineItemStartTime for Columns and UsageAmount measure for the Values. The best way to set them is to use the Field wells options, as shown in the following screenshot identified with the number 3.
  3. Next, set the aggregation for values as sum (you can select other options if you desire).
  4. This will populate the heat map as shown in the following screenshot:

    Heat map

    Figure 4.27: Heat map

This completes all standard chart selections. Now let's review how to use autograph feature.

Autograph

Autograph is a great feature when you are experimenting with a new dataset and want QuickSight to automatically figure out which visual type will work best for the data. Let's see the steps for this feature using the AWS Usage Metrics dataset.

  1. Select the lightning icon from the Visual types.
  2. Next, select UnblendedCost and Operation field and see the chart automatically get created as shown in the following screenshot:

    Autograph

    Figure 4.28: Autograph

  3. In this scenario, autograph selected a horizontal bar chart with the highest cost operation shown on top.

This completes the autograph section. Next we will review general configuration and options to improve appearance.

General options

In this section, we will review some options to personalize and enhance the look and feel of your visual.

Configuring the visual title

The visual title is displayed by default. Use the following steps to modify the title:

  1. From the analysis page, select the visual you want to format.
  2. Next, on the right side of the visual you will see a v sign, which when clicked will show the Format Visual pane on the left as shown in the following screenshot:

    Configuring the visual title

    Figure 4.29: Visual formatting options

  3. On the left-hand side, QuickSight shows details on what formatting options are allowed; for title you can turn on/off. If you want to change the title text, just double-click on the title and change the text.

Configuring legends

By default, QuickSight will display the legend. Use the following steps to hide the legend or change its position:

  1. From the analysis page, select the visual you want to format.
  2. Next, on the right side of the visual you will see a v sign, which when clicked will show the Format Visual pane on the left as shown in the following screenshot:

    Configuring legends

    Figure 4.30: Legend changes

  3. Now you will see legend configuration options on the left-hand side that can hide the legend or move it to the right/bottom/top of the visual.

Configuring the axis range

By default, the axis range starts at zero and ends near the highest value of the measure being displayed; if you want to modify the steps proceed as follows:

  1. From the analysis page, select the visual you want to format.
  2. Next, on the right side of the visual you will see a v sign, which when clicked will show the Format Visual pane on the left as shown in the following screenshot:

    Configuring the axis range

    Figure 4.31: Formatting axis

  3. On the left-hand side you will see the Format Visual pane, which has the axis range settings. Here you can change the range to auto, based on data range, or a Custom range as shown in the preceding screenshot, 10000 to 150000.
  4. The chart automatically updates itself to the new range.

    Note

    For horizontal charts, you can configure the X-axis, for vertical charts you can configure the Y-axis and for scatter plots you can configure both axes.

This completes the section for axis configuration, next we will review how to change colors.

Changing visual colors

QuickSight allows you to change the default colors. Use the following steps to change the colors of your charts:

  1. From the analysis page, select the visual you want to format.
  2. Next, choose any element on the visual to get the various properties for the chart, which will also have the option to change Chart Color as shown in the next screenshot.
  3. In the example shown in the screenshot we have a stacked vertical bar; you can change the chart color for a specific year or for all years.

    Changing visual colors

    Figure 4.32: Changing colors

  4. Let's repeat this for all years and see the resultant chart as shown here:

    Changing visual colors

    Figure 4.33: Updated colors on chart

This completes the section for configuring colors. Next we will review how to enhance charts with drill downs.

Adding drill down to charts

Certain datasets have hierarchies, and the charts will really be live if one can start from the summary and then drill down to details. For example, for the college enrollment data, we have information at the city level along with the states that they belong to; follow the steps to see how the chart drill down can be configured from the state to city level.

  1. First, let's review the chart without drill down. The chart has the visual type of vertical stacked bar chart with axis as stateabbr (state abbreviation), value as sum of enrollment, and group by as year as shown in the following screenshot:

    Adding drill down to charts

    Figure 4.34: State level report without drill down

  2. Now expand the Field wells pane and then drag the CITY field from the left Fields list to the X axis below the STABBR field. Make sure that, when you drag the field, you select Add drill-down layer and do not select the Replace option. You should see City below the STABBR. The following screenshot shows these steps in detail:

    Adding drill down to charts

    Figure 4.35: Drill down configuration

  3. Now when you click on the vertical bar for the state of CA, you should see an option to drill down to CITY. When you click on that drill option, you will see the chart refresh with data shown for cities for the state of CA as shown in the next screenshot:

    Adding drill down to charts

    Figure 4.36: Drill down to city

Note

At this time, drill down is not available for pivot tables.

This completes the general formatting options for visuals in QuickSight; next, we will review guidelines on selecting the right kind of visuals based on your needs.

Selecting the right visualizations

Choosing the right amount of data and chart type is crucial for effective visualization and reporting. First, one should know what questions the business would ask about the data. Next, there are certain recommended charts based on the patterns of these responses.

Does the business want to compare values?

Let's say the need is to compare revenue over time, or to compare customer counts by different states in the country. For such use cases, select horizontal bar, vertical bar, or line charts.

Do you need to compare compositions of a measure?

Let's say we have a need to show revenue by region and also show the various product categories constituting the sales in the region. For such use cases, select horizontal stacked bar or vertical stacked bar.

Do you need to see distributions and relationship between two measures?

Let's say we have a need to see the relationship between two measures like population median salary and crime rate. For such use cases, select scatter plot which will be useful for understanding the safest cities and the median salary. Other alternatives for such a question are tree map and heat map.

Do you want to see trends with multiple measures?

If you have a need to see trending of multiple measures over time, choose Line charts simple or area type. For example, consider a scenario where you want to see the increase/decrease of crime along with increase/decrease of overall population for the last 5 years.

Do you want to slice and dice multiple measures over different dimensions?

If you have a need to summarize, analyze, and present numbers based on different dimensions, pivot tables are an excellent option. For example, if you want to report sales metrics by product category and geographical region and for different years, you can pivot with rows representing geography (like states of the USA), columns being product category, and the intersection of each row and column being the actual metrics. Pivot tables also support sub-totals to help the analysis.

..................Content has been hidden....................

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