Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Task Abstraction for Visualization Design

DS 2023 | Communicating with Data

Overview

Before choosing a chart type or writing any code, a visualization designer should answer the fundamental question: what is the user trying to accomplish?

Task abstraction is the practice of describing user intentions and goals at multiple levels of specificity — from a broad analytic purpose down to the precise data manipulations that purpose requires.

Task abstrction helps you design better visualizations, both static and interactive.

A chart, dashboard, or infographic built around clearly stated questions is easier to design, build, and evaluate than one built by intuition.

Visual Analytic Activity

The heart of task abstraction is the idea that user behavior can be conceptualized as a hierarchy of actions that go from abstract ideation and intent to concrete activity with a specific tool.

It describes in formal terms how we move from ideas to artifacts.

The Task Hierarchy

One conceptualization of this hierarchy comes from Gotz and Zhou (2008).

They de visual analytic activity in four tiers, from most abstract to most concrete.

TierWhat it describes
TaskA high-level analytic goal, stated in domain terms
Sub-taskA specific analytical question that contributes to the task
ActionA concrete analytic move — a data or visualization operation
EventA single software interaction that carries out the action

Tasks

A task-level question describes what a user wants to accomplish in the data.

A well-formed task-level question is:

  • Independent of any specific chart or interaction. Do not name a chart type, a widget, or a gesture.

  • Meaningful to a domain expert. A public-health researcher should recognize it as a real question without knowing what a scatter plot is.

  • Open-ended enough to allow more than one design. If only one chart obviously answers it, the question is probably a sub-task in disguise.

  • Nouns and verbs can be mapped onto available data and known operations. This means avoid vague terms like “relate” or “most” and instead consider translating these into concepts like correlation or relative frequency. The language here will depend on the familiarity of the domain expert with statistical and scientific methods.

For example

Avoid: “Can the user select a country from a dropdown to see a bar chart of spending over time?”

  • This question names a widget (dropdown) and a chart type (bar chart). It skips past the analytic goal and lands directly on a design decision.

Aim for: “How has healthcare spending changed across countries over the past two decades?”

  • This describes the analytic goal without committing to any design. It could be answered with a line chart, a heat map, a choropleth, or a small-multiples display.

Sub-Tasks

A sub-task breaks a high-level question into a specific analytical components that need to be accomplished to answer the question.

This is because most tasks are compound.

  • Each sub-task is a concrete analytical question — such as, “what is the distribution of variable A?”. It focuses on a single facet or angle of the task that a single chart or computation could address.

  • Each sub-task must focus on it’s own angle.

  • Components may or may not have an obsvious sequence, but they should be doable in steps. They often feed into each other or get combined in later steps.

Again, as with tasks, a sub-task should be stated in plain language, without naming any chart type or widget.

Writing a Good Sub-Task

A good sub-task is specific enough that a single chart or computation could answer it, but abstract enough that it names no chart type or widget.

If it names a bar chart, a dropdown, or a filter button, it has slipped into design. Push it back up.

Worked Example

Task: How does a country’s healthcare spending relate to its citizens’ life expectancy?

Sub-task question
Sub-task 1Which countries achieve high life expectancy despite low spending?
Sub-task 2Does the relationship plateau above a certain spending threshold?

Both sub-tasks address the same task from different angles. The first focuses on exceptions; the second on the shape of the overall relationship.

Actions

Actions, also called operations, are the specific data questions that serve a sub-task.

Each operation may be expressed as an Action–Target pair, since every action is directed toward something, called a target.

  • The Action itself is drawn from a vocubulary, such as Amar et al.'s ten analytic primitives (see table below).

  • The Target is the variable or data feature the action is applied to.

Note the two operations for the same task must use different primitives.

Action vocabularies

A well-known vocabulary for action verbs is from Amar, et al, 2005. These are called “analytic primitives”, where primitive means primary and irreducible.

ActionThe question it answers
Retrieve ValueWhat is the exact value of this item?
FilterWhich items satisfy a condition?
Compute Derived ValueWhat is an aggregate — a sum, average, or ratio?
Find ExtremumWhat is the maximum or minimum?
SortIn what order do these items rank?
Determine RangeWhat are the minimum and maximum values overall?
Characterize DistributionWhat is the overall shape of these values?
Find AnomaliesWhat is unusual or unexpected?
ClusterWhich items are most similar to one another?
CorrelateDo two variables move together?

These are based on observed user interactions with data visualization tools.

Gotz and Zhou 2008 propose something more granular, based on grouping actions by intent.

DataVisual
ExplorationFilter, Inspect, Query, RestoreBrush, Change-Metaphor, Change-Range (Zoom, Pan), Merge, Sort, Split
InsightCreate, Modify, RemoveAnnotate, Bookmark

Meta Actions (apply across the grid): Delete, Edit, Redo, Revisit, Undo

Targets

The Target names the data feature the action is applied to. Common targets:

TargetWhat it refers to
OutliersValues far from the norm
TrendsPatterns of change over time or across a dimension
DistributionsThe spread and shape of a set of values
ClustersGroups of similar items
ExtremaThe maximum or minimum of a set
CorrelationsRelationships between two or more variables

Events

Finally, events are the hardware and software levers we pull to produce concrete results.

Specific ActionPython (Pandas + Matplotlib)
Selectdf[['x','y']]
Filterdf.query()
Sortdf.sort_values()
Splitunstack(), subplots=True
Change-Metaphorplot.bar → plot.line
Zoomset_xlim()
Annotateannotate(), text(), axvline(), axhline()
Bookmarksavefig()

A worked example

Task: How does healthcare spending relate to life expectancy?

Sub-taskOperation questionActionTarget
Which countries achieve high life expectancy despite low spending?Which countries spend less than $1,500 per capita on healthcare?FilterSpending
Does the relationship plateau above a certain threshold?What is the average life expectancy at each spending level?Compute Derived ValueLife Expectancy

The two operations use different Amar primitives. Filter selects a subset of items; Compute Derived Value produces an aggregate across groups.

The Full Picture

Here is a complete hierarchy for one example.

Subtasks are coded as SnS_n and actions as AnA_n.

LevelQuestionForm
TaskHow does healthcare spending relate to life expectancy?Plain domain question
S1S_1Which countries achieve high life expectancy despite low spending?Specific analytical question
    A1A_1Which countries spend less than $1,500 per capita?Filter + Spending
S2S_2Does the relationship plateau above a certain spending threshold?Specific analytical question
    A2A_2What is the average life expectancy at each spending level?Compute Derived Value + Life Expectancy

Each level is more specific than the one above it.

The two sub-tasks approach the task from different angles.

The two operations use different Amar primitives.

Summary

  • A task is a high-level analytic goal, stated independently of any chart or interface.

  • A sub-task is a specific analytical question — one concrete angle on the task.

  • An action is an operation that can be expressed as an Action–Target pair, where the Action is an Amar et al. analytic primitive and the Target is the data feature it is applied to.

  • The two sub-tasks for the same task must approach it from different angles.

  • The two operations for the same task must use different Amar primitives.