Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
73 views

CODE201911 Practices DataVisualizations

This document discusses best practices for data visualization dashboard design. It recommends that dashboards be designed with the end user in mind through strategic choices around visuals, positioning, colors, and instruction prompts to guide users. Nudging techniques can also be used to subtly influence user behavior through the dashboard. The document walks through optimizing an initial infant mortality dashboard as an example, applying design principles to make it more effective and user-friendly.

Uploaded by

Sang Vu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

CODE201911 Practices DataVisualizations

This document discusses best practices for data visualization dashboard design. It recommends that dashboards be designed with the end user in mind through strategic choices around visuals, positioning, colors, and instruction prompts to guide users. Nudging techniques can also be used to subtly influence user behavior through the dashboard. The document walks through optimizing an initial infant mortality dashboard as an example, applying design principles to make it more effective and user-friendly.

Uploaded by

Sang Vu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

ONLINE QUICK ID 1911101

Best Practices for Data Visualizations:


A Recipe for Success
Over the last decade, many companies debuted data visualization platforms that enable organizations to analyze trends and
understand their businesses better. Tools such as Microsoft Power BI, Tableau, Amazon QuickSight, and QlikView represent just a
few of the many potential applications businesses could leverage. Given that CODE Magazine focuses on computer programming,

many of us easily fixate ourselves on the potential capabili- • Choosing visuals to convey strategic points
ties for creating queries, developing custom programming • Positioning and the number of charts/visuals
code, or creating extensive calculations on the back-end be- • Instruction prompts
hind the scenes. However, the majority of business users use • Colors to point out key trends
these data visualization platforms to dynamically interact
with this top layer of application: the dashboard. To develop Users want you to do the analysis of the components before-
these user-friendly dashboards, we need to think more like hand, but they want to interact with the data themselves
designers instead of programmers. using the instructions you provide. If the pieces don’t fit
together, or if the instructions don’t make sense, building a
Helen Wall successful final product becomes much more difficult.
www.helendatadesign.com The Importance of Dashboard Design
Helen Wall is a power user of The best-designed and implemented dashboards appear The Starting Dashboard
Microsoft Power BI, Excel, and effortless; we like them more, but yet can’t quite explain I chose Tableau for this example because I think it enables
Tableau. The primary driver exactly why. Their likeability comes not by accident, but by a focus on making changes with best design practices in
behind working in these tools mindfully following design principles implemented with the mind, given that the tool focuses on the visuals themselves.
is finding the point where end viewer in mind. Good design isn’t an accidental result, It also works on Apple products at the time of publication
data analytics meets design but rather a strategic decision to choose to make the small for this article, and Microsoft Power BI, unfortunately, does
principles, thus making data design choices that have a huge impact on the end result. not. You can use different versions of Tableau, but for the
visualization platforms both an purposes of this article, I’ll use Tableau Public Desktop,
art and a science. She considers Nudging which is free to download. You can download the starting
herself both a lifelong teacher In order to maximize the likelihood that users make your file from Tableau Public Online to follow along with the
and learner. She is a LinkedIn dashboard part of their everyday processes, you need to changes I make in this article, and then save it by uploading
Learning instructor for Power design dashboards that guide users through not only key it to your own Tableau Public Online account.
BI courses that focus on all as- visuals and figures, but also how they collectively interact
pects of using the application, with each other. A dashboard can check all of the user’s I obtained the infant mortality data from the impressive
including data methods, dash- requirements, yet still not yield much value to the user be- data section of the Gapminder website developed by the
board design, and programming
cause there’s a dissonance between what the y tell you they late Hans Rosling. The data set contains the infant mortal-
in DAX and M formula language.
would like and how their actual behavior responds to the ity rates by country and by year from 1800 until 2015. Note
Her work background includes
an array of industries, and in
dashboard. How do you bridge this gap? Let’s put this dis- that there are incomplete data sets because some countries
numerous functional groups, cussion in the context of the nudging proposition. may not have data (or at least useable data) for all of these
including actuarial, financial years. I categorized each country into its own region of
reporting, forecasting, IT, Nudging is defined as tiny prompts that alter our behav- the world, as you can see in the region mapping key file in
and management consulting. ior—specifically social behavior. Richard Thaler extensively Figure 1.
She has a double bachelor’s examined nudge theory in his book Nudge. Examples of
degree from the University of nudging techniques include: The Gapminder site defines infant mortality as the number
Washington where she studied of deaths in the first two years of life for every 1000 live
math and economics, and also • Encouraging recycling, by placing a larger recycling births. Although you may think this project is taking a mor-
was a Division I varsity rower. bin in a more prominent location than a smaller gar- bid direction, you’ll see that the Tableau dashboard helps
On a note about brushing with bage bin in many cities and businesses. communicate a much more positive outcome. A decrease in
history, the real-life characters • Sending out electricity bills that compare usage to these rates means that the survival rates are increasing and
from the book The Boys in the that of neighboring housing units to encourage users improving global health outcomes.
Boat were also Husky rowers to limit their electricity usage.
that came before her. She • Charging even the nominal amount of a few cents for To walk through the steps of applying best visualization de-
also has a master’s degree in single-use plastic bags encourages people to bring sign practices, let’s begin with a less-than-optimal Tableau
financial management from their own reusable bags when shopping or not use one dashboard I created, as seen in Figure 1. I can make stra-
Durham University (in the at all. tegic design and formatting changes that transform it into
United Kingdom).
a more effective dashboard built with the end user in mind.
Much like Ikea furniture comes in a box with pre-cut pieces
and instructions for assembly, you want to present your You will need several components to try this out on your
dashboards to the user in a similar manner. Think of the in- own, including the Tableau Public dashboard links below
struction manual as the nudging component to the product. and the link for the two Excel files and the PNG image that
This translates to techniques in designing data visualiza- are available on the CODE Magazine page associated with
tions (which I’ll discuss later) such as: this article.:

54 Best Practices for Data Visualizations: A Recipe for Success codemag.com


Figure 1: Initial infant mortality dashboard

• Starting Tableau dashboard: https://public.tableau. and they enjoy the process, you’re telling them that you
com/views/VisualizationBestPracticesstartingfile/ value their ability to analyze the data trends and take own-
Dashboard1?:embed=y&:display_count=yes&:origin=viz_ ership in this process. Psychologists define this as the “Ikea
share_link effect” (https://www.bbc.com/worklife/article/20190422-
• The Excel file from Gapminder data with the infant how-the-ikea-effect-subtly-influences-how-you-spend)
mortality rates where the customers (in this case dashboard viewers or
• The Excel file for country to region mapping users) feel they achieve the greatest value for their invest-
• The Gapminder logo ment. This is the Holy Grail for many businesses.
• Ending Tableau dashboard: https://public.tableau.com/
shared/8TZ3K2TWW?:display_count=yes&:origin=viz_ On the flip side, you need to do a lot of work on your end to
share_link get the users to feel this empowerment and ownership in the
process. Making the process easy for the user involves putting
You need to update the Tableau file to point to the Excel file yourself into their thought patterns to analyze the unknowns
on your own dashboard: and numbers before they even see them in the dashboard.
These areas for you to analyze beforehand for them include:
1. Download the Tableau Desktop Public application (free ver-
sion) or you can use Tableau Desktop if you already use that • The meaning and magnitude of data set numbers
2. Download both Excel files and the Gapminder logo to a • The relationship between data points and data fields
folder in your own desktop or documents folder. • Optimal ways to see the data in visuals and charts
3. Open up the Tableau link for the starting dashboard
with your own Tableau application How do you want to measure the infant mortality rate? Does
4. Go into the Data Source tab of the Tableau file, click on a higher rate indicate a better or worse metric? You need
each of the connections for the rates and region key, and to establish that you want to see lower infant mortality
set the folder connection to the path on your own desktop. numbers because this means that more babies are surviving
out of infancy, which also indicates improving public health
After you update the sources, the rest of the visualization will outcomes. You can’t assume that the reader already knows
update as well, and you can begin the transformation process. this, and you need to explicitly say what the numbers mean
in context of the bigger picture.
The “Ikea Effect”
Looking at Figure 1, can you tell at first glance what the Furthermore, you also need to indicate how you’re aggregat-
initial dashboard is analyzing? Inconspicuous legends and ing these infant mortality numbers. Each point in the data
axis labels serve as the only indications that you’re studying source represents the infant mortality for a given year and
infant mortality rates. The user shouldn’t have to guess at country. If you wanted to determine the global infant mortal-
what you’re trying to do. ity rate for 1990, for example, you need to analyze the data
points for all of the countries that year. It doesn’t make any
Building successful data visualizations involves striking a sense to sum them together because they represent rates and
balance between giving dynamic options to the viewer and not absolute values. It makes more sense to average all of
your own design and analysis process. When viewers feel like these data points to get this global mortality rate the years
they do most of the work by interacting with the dashboard and countries we want to see as an aggregated number.

codemag.com Best Practices for Data Visualizations: A Recipe for Success 55


Figure 2: Updated bar chart

If you buy furniture from Ikea, you assemble it yourself Effective chart options include:
from pre-cut pieces that come in a box that designers
planned out and tested ahead of time. Similarly, in dash- • Bar charts
boards, you want to analyze the data and plan out the • Line charts
dashboards before passing it off to the user to interact • Scatter plots
with in a pre-packaged box in the form of a dashboard. If • Box and whisker plots
you don’t include a necessary piece or if the sizing doesn’t • KPI metrics
work, neither you nor the viewer get the desired finished • Heat maps
product or result. Much like Ikea furniture comes in a box • Highlight tables
with pre-cut pieces and instructions for assembly, you
want to present your dashboards to the user in a similar You can see the infant mortality rates by region represented
manner. Users want you to do the analysis of the com- as a pie chart in the upper left-hand corner of Figure 1. This
ponents beforehand, but they want to interact with the chart presents two big issues when you view it:
data themselves using the instructions you provide. If the
pieces don’t fit together or if the instructions don’t make • You can’t easily distinguish between the slices of the
sense, the likelihood that they will embrace this dash- pie because you have to guess the angles rather than
board as their own goes down substantially. actually measuring the numbers.
• The chart represents the infant mortality rate as a sum
of the rates, which can mislead the audience because
Good Design Isn’t an Accident regions with more data points and complete data will
How do you approach designing your best possible version have a bigger slice, even if they have lower infant
of the dashboard? What do you consider for the job at hand? mortality rates.
You want to analyze the data initially to create components
for the dashboard that fit together with each other. Much The bar chart (Figure 2) does a much more effective job
like an Ikea furniture pack, you design and test the pieces of showing the average infant mortality rate by region
to make sure they fit together beforehand. (changed from the sum aggregation in the pie chart), and
you can easily rank and compare these rates between re-
When you like the way something looks, you can’t always gions directly within the chart.
quite explain why. The “why” comes through your decision
to strategically choose to apply design principles to it. De- To change a pie chart into a horizontal bar chart:
signing an effective dashboard that users embrace interact-
ing with is not an accident, but rather a well-planned ap- 1. Move the “Region” dimension to rows.
proach that keeps the user in mind. 2. Change the chart from a pie chart to a horizontal bar
chart in the Show Me options menu.
Choose the Right Visuals for the Job at Hand 3. Change the aggregation of the infant mortality rate
The first step in this process is selecting visuals that repre- from Sum to Average.
sent the data correctly, and also effectively communicate
the results and trends in the data. There’s no one chart that You also lose the time dimension this way because you’re mea-
works for all data and no one data set that works for all suring the average infant mortality rate for all years for coun-
charts. I encourage you to experiment with charts within tries within each region in Figure 2 rather than in a certain year.
the data visualization application to compare how they
represent the data and what visual works best for your in- Because you want to measure a time value, you can use a
tended result. line graph or a bar graph. What if you took this infant mor-

56 Best Practices for Data Visualizations: A Recipe for Success codemag.com


tality data by region and put the trends in a bar chart us- To convert from a vertical bar chart into a line chart: In the
ing a time dimension x-axis? You can see the results of this Show Me options menu, select the line chart. You can see
visual in Figure 3, where each region is distinguished within the updated chart in Figure 4.
each year on the x-axis with a color as well as a label.
The world map you saw in Figure 1 represents the infant
This chart option still poses some issues, including: mortality rate by country, with the color representing the
region, and the size of the bubble representing the sum of
• Because you now have both the region and time on the infant mortality rate for that country across all years.
the x-axis, the axis becomes very long and difficult to Notice that the map shows the bubble size as the sum of the
read. Even adjusting the fit, you still need to process infant mortality rates, which misleads the viewer, so you’ll
a lot of data points. need to update the aggregation to average across all years
• If you compare the trends by year for a certain region for each country. You may also find it difficult to distinguish
(say Europe), how can you quickly tell if the infant between the sizes of the bubbles or to determine trends or
mortality rate improves from the previous year? discrepancies within a region because the bubble sizes are
small to start with on the dashboard.
To change from a horizontal bar chart (Figure 2) to a verti-
cal bar chart (Figure 3) with time on the x-axis: I changed the map type to the filled map you see in Figure
5, where the darker colors represent higher infant mortal-
1. Movethe Regions dimension to columns and the aver- ity rates over a two-hundred-year range, and the lighter
age Infant Mortality aggregation field to rows, and colors represent lower infant mortality rates. You can also
you now see the chart automatically update. see higher rates concentrated among neighboring countries
2. Add Years to the columns in front of the Regions, and in sub-Saharan Africa. Notice that the visual automatically
you now see a bar chart with a very long x-axis. dropped the region dimension completely from the map vi-
3. Take the Regions dimension from the fields and place it on sual. The filled map makes it easier to compare rates be-
the Color Marks card, and you now see regions in two plac- tween neighboring countries because you can see color dif-
es of the chart: one for the x-axis and one for the color. ferences much more easily than bubble-sized differences.

You can’t stack up the region bars in Figure 3 because you To change from a bubble chart (Figure 1) into a shaded
want to average rather than sum the rates. Showing the filled chart (Figure 5):
average infant mortality rates by region as a line chart miti-
gates the size and readability issues that you encounter for 1. Select the Show Me option menu and pick the maps
this scenario with bar charts. chart icon
2. Change the aggregation from Sum to Average for the
The line chart in Figure 4 allows you to easily rank the regions Color Marks card option.
for each year, and you can see the infant mortality rate trends
by region because each point in the graph joins to the point for Now I’m going to tackle the two charts you saw in Figure
the next year and the previous year and so on. More importantly, 1 that show the infant mortality rates by country as a bar
you can also easily see that the rates trend downward across all chart and the average infant mortality rate by year as a data
regions, which means that global health outlooks are improving, table by combining them into a single visual rather than
even if you continue to see disparity among the regions. two, which makes it easier to easier. You can see some key

Figure 3: A vertical bar chart over time and region

codemag.com Best Practices for Data Visualizations: A Recipe for Success 57


pieces of information in both graphs, such as easily iden- for each of these coordinates, it doesn’t technically matter
tifying the countries with lower infant mortality rates and whether you select sum or average as the aggregation.
also that the infant mortality rates go down substantially
over the last fifty years. You also need to ask yourself if you think that the table
visual in Figure 6 serves as the most effective way to easily
Figure 6 shows a data table summarizing the infant mortal- view and analyze the data. Although you may find it nice
ity rate with the countries on the row labels, the years in to more easily see with numeric values how the rates are
the column labels, and the corresponding values effectively improving for each country over a two-hundred-year time
as cell coordinates in the middle. If you looked around the frame, looking at a lot of numbers without visual cues or
Gapminder Excel file storing this data, you might notice that assistance can get fatiguing.
it looks like the original data set with the countries listed
alphabetically in the rows and the years listed chronologi- You can still use the idea of a table but instead, what if you
cally as columns at the top. Because there’s only a single rate use a highlight table instead, as you see in Figure 7? This

Figure 4: A line chart over time with colors for region

Figure 5: Filled map

58 Best Practices for Data Visualizations: A Recipe for Success codemag.com


Data Aggregation
Options
Within data visualization
platforms like Tableau, you
Figure 6: Infant mortality rate by country and year in a single table can aggregate data through
functions such as counting,
count distinct, sum, average,
minimum, or maximum.

Selecting an aggregation
option allows you to analyze
trends in the data set.

Figure 7: Highlight table

visual shows both the rate as a text value and a color, and you 3. In the values area (or the Text Marks card), you have an
can see that the color effectively illustrates an improved in- average of infant mortality rate. It doesn’t matter if you
fant survival rate in recent years for all countries in this view. use sum or average here because for each row and col-
umn coordinate in the data table, you only have a single
Now change it into a single table (Figure 6) with rows and corresponding value, but it makes the most sense to just
columns combined with the data in the chart, and then into select the average aggregation to line up with the other
a highlight table (Figure 7): visuals. If you inspected the Excel file, you may remem-
ber this is what the data table looks like.
1. Move the Year dimension from rows to columns. 4. To convert to a highlight table, select the highlight
2. Add the Country dimension to the rows, so that you table icon from the Show Me menu. If it switches the
now have a data table with years in the column labels rows and columns when you convert the visual type,
and countries in the row labels. just move them back into the correct positions.

codemag.com Best Practices for Data Visualizations: A Recipe for Success 59


Figure 8: Updated highlight table with year bins

2. Convert this new field from a measure to a dimension


by right-clicking on the new measure and selecting
Convert to Dimension.
3. Now, right-click on this new dimension Year (YEAR),
select Create > Bins, and a new dialog box will open up.
4. Use 10 (as in ten years) for the size of the bin and keep
the name as Year (Bins).
5. You can now see a little histogram icon next to the field
Figure 9: Years measure calculation name in the dimensions list (see Figure 10).
6. Now add the new year bin to the data table next to the
Year dimension in the column shelf, and remove the
Notice that the empty values show colors, which you don’t Year dimension because you no longer need it.
want to see. You’re not done with this visual yet, and it won’t
look like this after you finish making modifications to it. Sort the Labels
The highlight table you created (shown in Figure 10) shows
Use Bins to Simplify Visuals the trends by country, where you determine the order of the
Notice in the data table you just created in Figure 9 that be- countries in the labels simply by their alphabetical order. You
cause you’re measuring rates over more than two hundred might find this a helpful set up if you want to easily find Bel-
years, you can’t see all the years without having to use the gium in the list for example, but you can’t identify the coun-
scroll bar. You also already know that you don’t have consis- try with the lowest rates without having to navigate through
tent data back to historical periods farther in the past and the list. I think it makes the most sense to put the country
even across contiguous time spans. Averaging the infant mor- with the best outcome since 2010 at the top and rank the rest
tality rate across ten-year time segments rather than a single of the countries as they fall into the subsequent order for
year using bins in Tableau creates some noted advantages: infant mortality rates, as you see in Figure 11.

• If a country has gaps in a time range, averaging out To sort the country order:
the rates within a ten-year segment allows you to
smooth out those inconsistencies. 1. Go to the last column where the 2010 through 2015
• It also makes it possible to see the entire time range years aggregate and click on the header. You’ll see the
in a single view, as you can see in Figure 8. I chose to sorting icon that looks like a little bar chart appear.
use ten years because it allows me to have enough ag- 2. Click on the little horizontal bar chart icon once, where
gregated rates within a reasonable time range without you see the highest rate for Angola, then click on it
missing too many data points. again to see it listed by lowest infant mortality rate

To create bins for the years and update the highlight table Make the Labels Easy to Read
(Figure 8): If you cut off the label names in a visual, do you expect the
viewer to fill in the missing letters and guess the name?
1. Add a newly calculated field for the year and enter the In Figure 11, you can’t see the entire country name for
formula Year (YEAR) = YEAR([Year]) (see Figure 9). the healthiest country. Even if you know to add an “in” to

60 Best Practices for Data Visualizations: A Recipe for Success codemag.com


Figure 10: 10-year bins dialog box

complete “Liechtenstein,” that may not be an option if you You also add the year filter to the filled map chart as you
have more than two hundred or so options (country names) can see in Figure 15, with the option to select multiple or
to guess the finished name outcome, which Figure 12 will all years within the view rather than showing the average
spare you the pain of having to do. infant mortality rate across all available years. This allows
the viewer to create a custom view of the map based on their
To expand the size of the country column: selected year, and dynamically update the colors on the map
that represent the infant mortality rates averaged across
1. Hover over the border between the country name and the selected year or years.
the values section until a double arrow appears.
2. Drag the arrow until the column width expands to com- To add the Years filter:
fortably fit the country names in the immediate view,
as you see in Figure 12. 1. Go into the map worksheet and put a filter on the filters
shelf. Figure 11: A table sorting by
You can also wrap the text fields, but I wouldn’t recommend 2. Select all the years, and then select to show the filter. lowest mortality rate in 2010
that approach for the highlight table because it increases 3. Setting this up as a drop-down list has many benefits, to 2015 to highest rate
the height of these wrapped fields and throws off the sizing including taking up less space. I’d also recommend the
for the entire visual, and can make it more difficult to read. drop-down list because you can see that the single list
takes up a great deal of space and doesn’t do much
Use Filters Within Visuals for you.
The line chart you created in Figure 4 looks like colored
spaghetti lines over a two-hundred-year time frame, which The drop-down list is shown in Figure 16.
can make it slightly difficult to analyze. Because incomplete
data drives much of this fluctuation, if you want to use this I’ll revisit the filter options in much more detail later when
line chart visual as an effective analysis tool, it seems sen- you set up the dashboard.
sible to filter down the chart to only show the trends from
1950 and onward, as you see in Figure 13. Applying Color Effectively
In Tableau and many other data visualization platforms,
To adjust the line chart: the application automatically assigns a color palette to the
chart. However, using the default option may not present
1. Go to Sheet 1 and add Years to the Filters Marks card. the best color scheme. To leverage color effectively, you
2. Select Years and the condition as greater than or equal want to limit the color scheme you use (as contradictory as
to the 1st of January in 1950, as you see in Figure 14. that sounds) because strategically applying just a few colors
3. Filter out the null region from the table (remember not only makes the visuals easier to read, but also allows
these are countries that you don’t have a matching users to focus on key trends and numbers.
region for because they are so small) by dragging the
Region dimension to the Filter card. Color-blindness is a visual disability that affects the eyesight
4. Also filter out nulls by excluding them from the data by abilities of one in ten men and a smaller group of women. You
clicking on the null values at the bottom of the chart may be color-blind yourself or work with someone who is, or
and selecting Filter data. you may not even realize that this impairment is among your

codemag.com Best Practices for Data Visualizations: A Recipe for Success 61


Figure 12: Adjusting column widths for country label names

Figure 13: Filtered line graph visual

colleagues and peers. If you look at the diagram in Figure 17, You update the filled map in Figure 15 to use a diverging
you can see how orange and blue navigate around issues with Orange-Blue color scale with a very light gray serving as the
vision impairment pretty easily. Green and red, on the other color representing the midpoint. Although blue represents
hand, look the same for those with color-blind impairments. lower infant mortality rates and orange represents high infant
Also, remember that, like, many other disabilities, it occurs in mortality rates, the key part about setting up this color scale
a spectrum rather than an absolute impact. is selecting what value to use as the midpoint (Figure 20).

Accounting for those with color-blindness can serve as a In 2015, the country of Angola experienced the highest infant
starting point to selecting your own color palette. Tableau mortality rate of all the countries, at 96 deaths in the first two
has a color palette that you can see in Figure 18, specifically years of a baby’s life for every 1000 live births. I decided to set
offering ten color options to choose from. the center or midpoint of the color scale to this rate because
it allows the viewer to put in context how historical infant
You want to give a unique color for each region so that even mortality rates across all countries compare to today. It allows
those who are colorblind can distinguish the regions in the the viewer to see that although unfortunately Angola still lags
line charts, as seen in Figure 19. behind other countries in population health in today’s world,

62 Best Practices for Data Visualizations: A Recipe for Success codemag.com


it still represents an improved infant survival from historical You can then apply this same Orange-Blue color scale pal-
infant mortality rates across a two-hundred-year time span as ette to the highlight table from Figure 12 to better analyze
you see in Figure 20, including a lower mortality rate than a two aspects of the infant mortality rate data: rankings be-
developed country, like Germany, saw historically. tween countries and improved health outcomes over time.
You use the same midpoint as for the filled map with An-
To change the colors on the filled map (Figure 21): gola’s 2015 infant mortality rate of 96.

1. Go to Sheet 2 and click on the Color Marks card. As you see in Figure 22, although all the countries in the most
2. A dialog box opens up where you select the Orange- recent time frame of 2010 to 2015 have better infant survival
Blue color scheme, and then select to reverse the col- rates than Angola (indicated with the blue cell color), when
ors so that blue indicates lower rates and orange indi- you look back at historical trends for these rates, some of the
cates higher rates (Figure 20). most developed countries today, like Japan and Singapore,
3. To change the midpoint that the color scale uses, go to had higher infant mortality rates only fifty years ago than
the Advanced options and put a check mark next to the Angola does today. Even developed European countries, like
center options, where you can now type in 96 as the France, Germany, and Austria, also have much lower rates.
value to center the color scale. Although you may lament about the difference between the

Figure 14: Setting up a Year filtering condition

Figure 15: Adding years filter to map

codemag.com Best Practices for Data Visualizations: A Recipe for Success 63


Figure 16: Setting up a Years filter on the filled map:

how all of these visuals come together in a single consolidated


dashboard with which the viewer can dynamically interact. After
making several strategic design and formatting decisions for the
visuals, you end up with the dashboard you see in Figure 23.

You want the dashboard to line up in a way that’s easy to


read by purposely deciding:
Figure 17: Normal vs. color-blind vision • To make all of the chart big enough to view without
scrolling or panning in.
• To place visuals, such as the highlight map, to the side
healthiest and the sickest countries today, you need to re- to effectively create a border.
member that these outcomes still represent a much healthier • To use a maximum of three large visuals to avoid clutter.
world for everyone now than less than half a century ago.
You now need to make adjustments to get everything to
In highlight table, to update the color scheme (Figure 22): fit together after updating each visual to get the updated
dashboard, as you see in Figure 24.
1. Click on the Color Marks card to open up the selection
options. To make these changes:
2. Select Orange-Blue diverging, reverse the color scheme,
and then, on the Advanced options, select Center and 1. Remove Sheet 4 from the dashboard by selecting the
put in 96, which is the infant mortality rate for Angola visual so you can see a box around it and then click on
in the most recent year, 2015. the X in the upper right-hand corner.
3. To remove the extra blue spaces for the null values, right 2. Take the Region key on the upper right-hand side and
click on the mortality rates with the colors and select drag it over so that you can see it on the top of the line
Filter. Then select the Special options by choosing the chart, and then adjust it to make it smaller. You can
button on the far right and selecting Non-null values. also adjust the width of the region names by clicking
4. You also want to remove the text values, so select the into the legend and when you see an arrow pop up,
second infant mortality aggregation with the text icon drag the width of the text field to where you want.
next to it and delete it. 3. Now drag the infant mortality color gradient to under-
neath the map and to the left of the highlight table.
If you run into problems where Tableau won’t let you remove Drag the top of the scale up to put the label above it.
the color from the null cells (I ran into this a time or two when 4. Remove the layout container from the right-hand side
testing), I suggest trying to recreate the visual again or going of the screen where the legends used to be by clicking
back to previous steps and removing the null values at that on it, then clicking on the X.
point (you may have to test different options). If the visual 5. To make the highlight table bigger so you can see it
flips the rows and columns but removes the nulls, you can in a bigger picture on the dashboard, select the con-
easily flip it back into the positions you want. tainer and pull it over until it almost takes over half the
screen on the right-hand side.
Placing the Visuals on the Dashboard 6. To get the highlight table to fit on an entire view, select
So far, you’ve updated the chart type and formatting of indi- the chart, then click on the down arrow at the edge,
vidual visuals, but you now need to take a step back and see select Fit and choose Entire View.

64 Best Practices for Data Visualizations: A Recipe for Success codemag.com


Put Titles and Labels on the Dashboard option, and the floating option frees up even more space to use
Although you already made strategic design and formatting for the rest of the visuals on the dashboard.
decisions to improve the dashboard, you still need to effec-
tively label these components or visuals so that the viewer You’ll want to add:
understands relatively quickly exactly what each component
represents, as you see in Figure 25. Although you may know • A title to the entire dashboard to explicitly tell the
what Sheet 1 does because you designed the visual, you viewers what data they’re working with and give them
can’t assume that the viewer does as well. a nudge to indicate that falling infant mortality rates
represent improved health outcomes, and also to give
You can also add the year filter to the map chart that allow you them context on the trends and encourage them to
to see the infant mortality rates around the world for the se- learn more.
lected year or years. This allows the user to dynamically change • Titles on individual visuals, where needed, to provide
their own map view in the dashboard themselves, as you saw in context on what they see and how to potentially think
Figure 25. The drop-down list takes up less space than the list about the results and interact with the data.

We Prefer to Eat Pie


Rather than See It
in a Visual
Although pie chart visuals
allow you to see the rough
breakdown of the “pieces
of the pie,” you can’t easily
compare the size of the
actual pieces within just a
few seconds. Can you tell
more than which piece of
the pie chart represents
the largest value?

If you want to know the totals


and rank of the aggregated
numbers and you can’t easily
do that analysis, you need to
use another chart. You can
easily perform this endeavor
Figure 18: Color-blind palette in a bar chart. If you’re
analyzing two numbers,
you can put the totals and
their percentages in a small
table or even a KPI metric,
which saves space and
becomes easy to read for
a small amount of data.

Figure 19: Updating region key colors

codemag.com Best Practices for Data Visualizations: A Recipe for Success 65


• The Years filter that enables you to see different views 2. Make the title in size 14 font and the subtitle details
of the filled map by selecting the years you can see. in size 10.
3. Add names to the visuals. Double click on the title for
Determine whether you can remove some titles, too, such as Sheet 1 and in the dialog box, enter Since 1950, infant
the map title, because you already know it’s a map mortality trends across all regions trend downward, and
set the font size to 12.
The steps to add titles are: 4. Next, double click on Sheet 2 and delete all the text in
the dialog box so you no longer have a title on the map.
1. In the Dashboard 1 tab, select the Dashboard menu at 5. Double click on Sheet 3 to change the name of the
the top, select Show Title where you can input the name highlight table to All countries show improvements
Infant Mortality Rates Trend Downwards for ALL Coun- in the infant mortality rates, from the healthiest
tries Over the Last Half Century and the subtitle Gap- countries to the sickest and set the font size to 12.
minder data helps us prove that the world is getting 6. Select the map visual container, then click on the down
better for almost everyone (see Figure 26). arrow on the outside frame, select Filters, and select

Figure 20: Orange-Blue diverging color palette

Figure 21: Diverging color palette filled map

66 Best Practices for Data Visualizations: A Recipe for Success codemag.com


Figure 22: Blue-orange heat applied to highlight table

Figure 23: The updated dashboard

the Year of Year from the list, where you now see the down, which indicates an improved population health out-
filter on the far right. look. Similar to the way you set up the blue-orange color
7. Select this filter container, click on the down arrow, scale for the filled map and highlight tables in Figure 21
and choose Multiple Values (dropdown). Then click on and Figure 22 with the highest mortality rate in 2015 as
the down arrow again, select Floating, which means the midpoint in the diverging color scale, you can also use
that you can move the filter over the map to select the a reference line as another way for the viewer to analyze
year, and you can drag it over to the bottom of the map these rate trends. In 1950, you can see that the healthiest
where it doesn’t directly sit on top of any countries in region, Europe, had an infant mortality rate of 58.9 as you
the map. see in Figure 27. By setting a constant reference line at this
point on the y-axis, you can see that although other regions
Adding Elements of Analysis may lag behind Europe in terms of relative improved health
In the line chart in Figure 19, you saw that since 1950, outcomes, you can use this number as a benchmark to show
average infant mortality rates across all regions trend what you could call a time delay in this trend

codemag.com Best Practices for Data Visualizations: A Recipe for Success 67


To add a reference line to the line chart: how to enable the user (the customer) to experience the “Ikea
Effect” discussed earlier, where they do most of the work by in-
1. Click on the y-axis and right click to Add reference line. teracting with the dashboard, but still feel that their investment
2. Select the entire table, select a constant line, enter the in using the dashboard was worthwhile. Like a furniture pack
value of 58.9, choose to see no label, and then use a with components ready for assembly, as the developers of the
thick dashed line, as you see in Figure 28. dashboard, you analyzed, measured, and packaged the pre-made
components for the customer before they even receive them.
Use Tooltips as a Hidden Design Weapon
Tooltips allow you to increase the capabilities within inter- Now you need to communicate the instructions for how to
active data visualization applications because you can hide assemble the product by telling the user how to interact
some of the information away from the immediate view of the with the visuals within the dashboard. You can’t assume
user, but they pop up when the user scrolls over the relevant that because you know how to interact with the data that
data points in a visual. I sometimes think of it like a third they will as well. We need to provide clear instructions that
dimension that you can add to a two-dimensional dashboard. guide them in how they can change filters or click on coun-
You can add data to tooltips that you don’t see in the visual tries in the map to change the dashboard view.
as well. You can also customize the wording and structure of
the tooltips, as seen in Figure 29. To help the viewer navigate the dashboard and make the most
of using the dashboard, you should use nudging techniques to
In the highlight table, I find it difficult to read the row and col- give them instruction prompts for how to use the visuals. These
umn headers in the visual because there are so many of them nudging techniques appear as instructions in the visual or fil-
in a small space. By pushing the details into the tooltips, as ter title to gently guide them with their selection options and
you see in Figure 30, you can ultimately format a clean visual encourage them to explore the dashboard. You want to avoid
without compromising the design or details behind it. wordy instructions or difficult procedures to follow. You need
to simply tell the viewer what you want them to do, without it
To edit the text and values within the tooltips: coming across in an authoritarian way. Examples include nudg-
ing instruction cues that you see in Figure 31 include:
1. Click on the Tooltips Marks card that opens up a new
dialog box on the Sheet 1 tab for the line chart. • Adding the Gapminder logo by selecting on the Dash-
2. Edit the tooltip to refine and summarize what you want board tab of the pane on the far left-hand side of the
to say (you can type in the tooltip box to rename the screen, and then selecting Image from the options at
labels or create sentences). Change the year for the bins the bottom, where a new container opens up in which
to Decade and delete Avg from the mortality rate de- you can select the image path in the dialog box.
tails. You can also change the details in the map to make • The logo now appears in the dashboard but looks
them easier to scroll over. strange because of the position it currently resides
in, so you need to highlight the container and move
Creating Interactivity Through Instruction Prompts it to the top left-hand corner of the screen before
Businesses decide to leverage data visualization tools like Tab- the title details. This can be quite tricky, so put the
leau because of the interactive capabilities that enable the end logo in with a container and move the dashboard
users to explore and analyze data trends. You want to think about title into the blank container.

Figure 24: Dashboard with fitted visuals

68 Best Practices for Data Visualizations: A Recipe for Success codemag.com


• Selecting a year from the filter to change the map in the highlight table. Make this addition font size 8
view. so the users can see it, but it’s not too prominent.
• Clicking on a region to filter the entire view. 2. In the filter for the map, double-click on the year filter,
• Thumbing over a color cell block in the highlight table and change the title to say Select year to see trends in
to see more details. map. You can also double-click on the legend below to
update the Avg in the legend title to Average.
To add instruction prompts and the final formatting details 3. Now in the highlight table, double-click on the title
to the dashboard (Figure 29): and add the text Hover over a cell to see the country,
year, and infant mortality rate. Again change the font
1. In the title of the line chart, double-click to edit the size to 8.
title, and, underneath the title, add the instructions by 4. You also want to remove the labels from the highlight
entering the text Select a Region from the legend to table because you can’t even read them in the first
see the related countries in the map and their trends place. Right-click on both the column labels and the

Figure 25: Dashboard titles and visual titles

Figure 26: Adding dashboard titles

codemag.com Best Practices for Data Visualizations: A Recipe for Success 69


row labels separately and choose to remove labels for the chart to see the entire logo as well as the other visuals
both of them. without them pushing one another out.
5. Also remove Sheet 4 because the dashboard doesn’t 7. Now you need to set up the interactivity between the
use it as a visual. charts so the instruction prompts work. To do so, go to
6. You can add the Gapminder logo to the dashboard by first Sheet 2 and make sure to add the Region to the Details
putting an empty container (found on the bottom left) Marks card, so that the region legend can filter this map.
and dragging it onto the canvas. Push it into the position Do the same to the highlight table by going to Sheet 3
next to the dashboard title so they share the same space. and adding the Region to the Details Marks card.
Now keep this layout container selected and choose Im- 8. Now go back to the dashboard and select the line chart
age from this same selection option box, and point to the to highlight its container. Select the filter icon to set
location where you saved the Gapminder logo. Now adjust up this chart as a filter for the other charts.

Figure 27: Updated line chart with reference line

Figure 28: Reference line dialog box conditions

70 Best Practices for Data Visualizations: A Recipe for Success codemag.com


Figure 29: Tooltip dialog box

Figure 30: Highlight table with updated tooltips

9. Make sure that you can see all your visuals. The best Now that you’ve set up the dashboard, you can put yourself in
way to do this is to make sure to leave enough white the position of the user and test it out. In Figure 32, you see
space between the legend fields and the visuals, and Asia selected as the region in the line chart legend. This creates
then upload to Tableau Public Online to make sure a new view of the data that highlights key trends and analysis
it fits as you anticipated. If it doesn’t, go back to the for the Asia region. You can also select a single year in the map
dashboard and make adjustments based on what you to see the Asian countries’ health for that year. Choosing Asia
saw pushed out of place. This make take a little bit of filters all three charts, and you can see in the highlight table
practice! the disparity between the rankings within the Asian countries.

codemag.com Best Practices for Data Visualizations: A Recipe for Success 71


Figure 31: The final dashboard with instruction prompts

Mitigating the Blind Spots of


Those with Color-Blindness
Roughly one in 10 people
experience visual color-
blindness and you need to be
mindful of them. Some of you
reading this are color-blind.

Although it can seem


overwhelming to create a
color palette specificly for
color blind viewers, you can
follow a few simple rules to
avoid falling into problems.
As a rule of thumb, I avoid
green and red together,
and instead substitute orange
and blue for heat maps,
for example.

Figure 32: Filter entire dashboard for Asia region

You maximize your dashboard’s influence by taking the ini- I encourage you to take these best practices techniques
tial Tableau dashboard and strategically making changes and use some creativity to set up and experiment with vi-
to update the design, formatting, and interactivity. This, sual options, then see how the users respond and go from
in turn, increases the user’s understanding and interac- there!
tions with the dashboard interface and the likelihood they
will use it by letting them take ownership in changing the Helen Wall
views. Designing an effective dashboard gives flexibility.

72 Best Practices for Data Visualizations: A Recipe for Success codemag.com

You might also like