A Tale of Two Data Sets...

In modules 1, 2, and 3, we will work with two different data sets. This page will give you some information about them. We will use a dataset of life expectancies and a data set of census information.

For the assignments in Modules 1, 2 and 3, we will use two data sets: one of life expectancies and one with census information by county. We’ve used these in the past, and they’ve led to good assignments. They are big enough to be non-trivial for design, but small enough that implementation isn’t hard. And they are on topics that are straightforward enough that everyone can be a domain expert.

For Module 1 (Design Exercise 1), you will sketch from both data sets. You won’t need to actually look at the numbers (and you shouldn’t write programs to look at them). We are giving you access to the data so that you can see what the form of the data is. If you want to peek at the data (using some tools you are familiar with), that’s OK, but not required (or even recommended).

For Module 2 (Design Warmup 2, Design Exercise 2), you will work with the Life Expectancy data set. Here you will actually implement visualizations - either with programs or tools.

For Module 3 (Design Warmup 3, Design Exercise 3), you will work with the Census data set. (we might create a new version). Again, you will produce visualizations from the data.

Some comments on class mechanics and data sets

For these assignments, we are forcing you to use our data sets. Hopefully, they are “general interest” enough that you are interested.

We chose these data sets because they are simple enough to work for class, but complex enough to be interesting. They are (intentionally) problematic in several ways (we don’t want to make things too easy). We are intentionally giving you (slightly) messy data sets.

Last year, we tried using 2 data sets on many different assignments, but it led to a bit of “data set fatigue”. This year, we will expose you to both data sets in Module 1, but then use one data set in each of the later modules.

We have intentionally chosen one data set in “wide” format and one in “tall” format.

Wide vs. Tall

I expect most people know this, but here is a nice explanation provided by Gemini with the prompt You are a teaching assistant for a graduate level Data Visualization Class. Explain the difference between “wide” data and “tall” data (in terms of the tabular form that data is provided in)

As a teaching assistant in your Data Visualization class, I’m here to clarify the fundamental difference between “wide” and “tall” data formats. Understanding this distinction is crucial because the shape of your data often dictates how easily you can create certain types of visualizations.

The Core Difference at a Glance

In short, the distinction boils down to how you organize your variables and observations in a table.

  • Wide data is characterized by having each observational unit (like a person, a country, or a test subject) represented by a single row, with each measurement or variable for that unit in its own separate column. This format is often described as being more “human-readable” at a glance.

  • Tall data (also known as “long” data) represents each measurement for an observational unit as a separate row. This means a single observational unit will often be represented across multiple rows. This format is generally more “machine-readable” and is often the preferred format for data visualization software.


A Practical Example

Let’s consider a simple dataset tracking the sales for two products, “Product A” and “Product B,” over three years.

Wide Data Format

In the wide format, each year has its own row, and each product’s sales figure gets its own column.

YearSales_Product_ASales_Product_B
2022150200
2023170220
2024180250

You can see that the data table grows “wider” as you add more variables (in this case, more products).

Tall Data Format

In the tall format, we have a column to identify the product and another for its corresponding sales value.

YearProductSales
2022Product A150
2022Product B200
2023Product A170
2023Product B220
2024Product A180
2024Product B250

Notice how the table grows “taller” as you add more observations for each year.


Why This Matters for Data Visualization

For many data visualization tools and packages (like Tableau, ggplot2 in R, or Seaborn in Python), the tall data format is strongly preferred. This is because it aligns with the principles of “tidy data”, a concept popularized by data scientist Hadley Wickham. The key principles of tidy data are:

  1. Each variable forms a column.
  2. Each observation forms a row.
  3. Each type of observational unit forms a table.

In our tall data example, Year, Product, and Sales are all distinct variables, and each has its own column. This structure makes it much easier to create visualizations where you want to, for example:

  • Map the Product variable to different colors in a line chart to compare sales over time.
  • Create faceted plots (small multiples) for each Product.
  • Easily filter or aggregate your data by Product.

With the wide format, these operations can be more cumbersome, often requiring you to manually specify each “Sales_Product” column for plotting.

Summary Comparison

FeatureWide DataTall Data
StructureEach subject has one row with multiple columns for variables.Each subject has multiple rows, one for each observation.
ReadabilityOften easier for humans to scan and understand quickly.Can be less intuitive to read at a glance.
FlexibilityAdding new variables requires adding new columns.Adding new observations is as simple as adding new rows.
Data VizCan be less flexible for many visualization tools.The preferred format for most modern visualization libraries.

As you progress in data visualization, you’ll frequently find yourself needing to reshape your data from a wide format to a tall format to make your visualization tasks easier and more efficient. This process is often referred to as “melting” or “pivoting” your data.

To make access easy, we are hosting the data sets on GitHub. The repo is: https://github.com/uwgraphics/765Data/

If you aren’t a GitHub user, we will provide direct links to the files you need.

Life Expectancy Data

I was inspired to use this data set by colleagues at the University of Vienna who used it for an assignment in their class.

There are two versions of this data:

  • World Bank Data - This is only 1960 to the present, but has almost all countries for almost all years, and it is broken down by sex.
  • Our World in Data - This data set has varying historic data at irregular intervals (there is data for some countries over hundreds of years!), and almost all (current) countries from about 1950-present.

See the GitHub Repo: https://github.com/uwgraphics/765Data/ for the data and a README.

Here is a walkthrough of me looking at the data in Tableau (I will probably do this in class again): Life Expectancy Walkthrough in Tableau. Even if you don’t plan to use Tableau, this can give you some ideas about the data, and about the process of exploring it.

Census Data

This data set has a variety of data about the US, broken down by county. It has information such as population, unemployment numbers, and education levels. It covers a number of years, but for different variables, the years covered are different.

The US Department of Agriculture (USDA) provides county level aggregation of population data aggregated at the county level. They gather education data, income data, poverty data, and population data. Later in the semester, we might gather more detailed data from other sources. (We will also provide the data at the state level).

The USDA provides this data as 4 separate sheets, but together, they provide a very rich and complex data set full of stories. To help you get started faster (and focus on visualization, not data cleaning), the Cat (the 2025/2026 TA) has joined the data into one “convenient” large file.

This year, please get the data (and readme) from the GitHub Repo: https://github.com/uwgraphics/765Data/ (if you don’t have experience working with GitHub, please ask for help).

If you want to see an example of trying to work with this data in Tableau, check out my Tableau tutorial at: Tableau Tutorial for CS765: Getting Started with Census Data (although, this was last year’s data and assignment). Again, you might want to look at this as a way to get a sense of the data, even if you don’t plan on using Tableau.

Final Thoughts…

Working with two datasets with different challenges will force you to think about how different tools work with data in different forms. We urge you to try using different tools over the course of the assignments. The assignments will force you to work with both data sets.

GenAI Disclosure:

I asked Gemini to write the difference between wide and tall data. It did a really nice job.