Planning Data Visualizations
Best Practices
Overview
This guidance is intended for WCMS developers, but it may benefit anyone involved in the development of data visualizations in the WCMS. We recommend that you review the complete document, but for review purposes, we have provided section links below.
- TP4 UX Best Practices [PPT - 14 MB]For general guidance on colors, layouts, and overall presentation, see this overview of TP4 best practices.
Learn About WCMS Data Visualizations
If you haven’t done so recently, become familiar with the various visualization types available in the WCMS. For each visualization, this Gallery provides an overview and some best practices for implementation and usage.
You should also encourage the content owners to become familiar with this information.
Work with Content Owners
You should always work with the content or data owners to ensure that their key public health messages are supported the best ways possible through data visualization. The content owners may have well-developed ideas about how their data should be presented, but those ideas have to be translated into configuration options. And there may be options that the content owners don’t know about.
In some cases, the content owners may know only the messages they want to convey. They may have no well-defined ideas about how to present the data. Your knowledge of the WCMS visualization tool can help them as they explore their options.
Analyze the Data Structure and Content
Before building a data visualization, WCMS developers should analyze the data to understand its content and structure at least at a basic level. With this understanding, the developer is in a better position to work with the content owners as they decide which data visualizations to use.
To demonstrate the analysis process, this document walks you through the kinds of data visualizations that can be produced with a single dataset and provides some tips along the way. The dataset is illustrated in the Excel screenshot below. (The data file is available [XLS – 34 KB] in case you want to experiment with the data.)
First, here are a few notes about the data:
- The data in this example are organized in columns by U.S. state, gender, age group, and cases per 100K, but the same data could be structured in other ways. For example, the gender values or age group values could have their own columns (see example of an alternative structure). We’re featuring this ultra-vertical structure because it’s very flexible, as you will see. But content owners may have good reasons for providing similar data in different structures.
- Typically data are bound by time. The example dataset has no time values, so the timeframe would be provided by visualization context (such as the page title, visualization title, or the legend header).
- The Gender and Age Group columns include “All” values. Generally, the WCMS does not aggregate data (although aggregation enhancements are underway). If a visualization is intended to show “All” values for a category of data, those values must be aggregated in the source data. (Exceptions are data bites and waffle charts. Both support some aggregation, as explained later in this document.)
- Many data visualizations do not require data structures as complex as the example. For many of the example visualizations in this Gallery, the source files are quite simple. (For each example, there is a link to the source data.) Typically, complexity comes into play when the content owner wants to provide filtering options to visualization users or to create multiple visualizations from the same source file (as in a dashboard). Both scenarios are discussed in this document.
While we can’t cover every combination of data content and structure, we hope that the following visualization examples — all from the data above except where noted — will help you understand how data structure and content relate to decisions about visualization usage.
One Data Source — Multiple Visualization Types
Data Maps
The first thing you may have noticed about the example dataset is that it contains normalized data by state. That means that a choropleth map of the U.S. is an option, if it supports the public health messages. (This document uses static images of data visualizations, but “live” examples are available throughout the Gallery.)
With data like the example, filters are typically necessary, in this case for gender and age group. (Note the filter selectors under the map legend.) The configuration of filter selectors, as illustrated below, is necessary because there are multiple rows of data for each state.
More information on data maps, including explanations of equal-interval classification vs. equal-number (quantile) classification, is available in this Gallery.
Bar Charts
As mentioned above, the source data file allows for a lot of flexibility in data visualization. This is particularly true of bar charts. The top chart shows the gender categories as data series (i.e., the bars); the chart on the bottom shows age groups as the data series. (Note that this alternative dataset is more limiting in that it supports only the bottom example. That’s because the values for the data key — which determines the X axis categories — are specified in the WCMS as a single column.)
Another example of the tool’s flexibility is in the configuration of the data series. The source data includes “All” values for gender and age group, but bars for the “All” values have been omitted.
Note that both bar charts require a filter on the State column. Otherwise, the tool could not determine which combination of age group and gender data to display.
What about stacked bar charts?
For the example dataset, stacked bars for gender (i.e., where each bar segment represents male or female data) would be an option, but ideally, each bar in a stacked chart should be the same height (or width for horizontal charts). This means that the best use of the stacked bar is to represent percentage data in which the total for each bar is 100 or any data in which the total value for all bars is the same. The image on the right shows a bar chart with the same denominator for all bars.
Stacked bars for the age groups would not work very well simply because of the number of segments. The best practice is to stick with two or three data series in each bar (e.g., gender).
Pie and Donut Charts
I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Data Bites and Waffle Charts
I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Line Graphs
Typically, line graphs are used to show trends over time, so the example dataset isn’t appropriate for line graphs. If a date column were added, we could show data by genders over time or by age groups over time. With the extra column, the data would require two filters: (1) state and (2) gender or age group, depending on the data being charted.