Data Before You Visualize

Why transformations and levels of measurement matter for choosing the right visualization

1

Transformations Unlock Hidden Patterns

Imagine you have raw workout data: a timestamp and the calories burned during each session. On its own, this data is just a long list of dates and numbers. But by applying a few transformations, we can reveal patterns that were invisible in the raw data.

Extract Day of Week
Date → Monday, Tuesday, etc. (nominal)
Bin Time of Day
Time → Morning, Afternoon, etc. (ordinal)
Aggregate
Calories → Average per cell

These three transformations turn raw timestamps and numbers into two categorical variables with a summarized measure, which is exactly what a heatmap needs.

Average Calories Burned by Day and Time of Day
Low High
What the heatmap reveals: Evenings show the highest calorie burns across all days. Saturday evenings peak at 555 calories. Weekday early mornings are consistently lower, suggesting lighter workouts. Weekends shift intensity to midday. None of this is visible in the raw data without these transformations.
Key takeaway: Transform raw data, set the correct levels of measurement, then choose a chart that reveals the pattern. The heatmap only works because we created two categorical dimensions and a numeric summary.
2

Why Nominal vs. Ordinal Matters

Imagine you are tracking hours spent by different teams (A, B, C) across project stages. If those stages have a natural order, a line chart makes sense because the lines trace a meaningful progression. But if the categories have no inherent order, the same line chart becomes misleading.

Appropriate Stages have a natural sequence
The x-axis categories (Kickoff → Design → Development → Testing) follow a logical sequence. The lines show a meaningful trajectory: hours peak at design, then drop through development and testing. You can read trends along the line because the order matters.
Key takeaway: Line charts imply a connection and progression between points. Use them when your x-axis categories have a meaningful order (ordinal). When categories are nominal, use a bar chart instead to avoid suggesting false trends.
3

Why Ordinal vs. Interval Matters

Imagine you survey customers using a 1–5 satisfaction scale. This data is ordinal: you know that 4 is better than 3, but you cannot say the difference between 1 and 2 is the same as between 4 and 5. How you treat this scale changes what visualizations make sense and what claims you can make.

Appropriate Show the distribution of responses
A bar chart of counts per rating level is honest to ordinal data. You can see that most customers rated 4, and relatively few rated 1 or 5. No assumptions about equal spacing are needed.
Key takeaway: With ordinal data, show distributions (bar charts, counts). Be cautious about computing averages and trend lines, as those operations require interval-level assumptions. If you choose to treat ordinal data as interval (which is common in practice), acknowledge that assumption.
4

Why Interval vs. Ratio Matters

Imagine you manage four regional sales teams. You have two metrics: each team's NPS (Net Promoter Score, ranging from −100 to +100) and their total sales revenue. Both are numbers, but they behave very differently when it comes to proportional visualizations.

Appropriate Revenue has a true zero; proportions are meaningful
Revenue is ratio data: $0 means no sales, and $200K is genuinely twice $100K. A pie chart showing each region's share of total revenue is valid. "The East region contributes 35% of total revenue" is a meaningful, accurate statement.
Key takeaway: Ratio data (with a true zero) unlocks proportional visualizations: pie charts, treemaps, stacked percentage bars, and area charts. Interval data does not support these, because without a true zero, "twice as much" and "30% of total" have no meaning. When you see a proportional chart, ask: does zero mean "nothing"?
5

Discrete vs. Continuous: Dates Are Flexible

Dates are special because their level of measurement changes depending on how you use them. A raw date (2025-02-15) is interval. A day of the week (Monday) is nominal. A month number (1 to 12) can be ordinal. A day count (days since start) becomes ratio. This flexibility is why visualization tools often let you choose whether to treat dates as continuous or discrete.

Line Chart Dates as continuous — shows change over time
Treating dates as continuous emphasizes the flow of time. You can see spikes, seasonality, and the overall downward trend from early 2006 onward. This answers: "How did sales change over time?"
Key takeaway: The same date field can be visualized as continuous or discrete, and each choice answers a different question. Continuous shows trends and flow. Discrete enables comparison and sorting. Choose based on the question you want to answer.
6

Same Ratio Data, Bar vs. Line

Here is a rule you have probably heard: a bar chart has to start at zero. It is true, but people often remember it as "all numeric data has to start at zero," and that is not the rule. The zero baseline is about the chart you chose, not the data you have. Say you are tracking wind speed across a morning. It runs from 6 knots up to 18 knots. That is ratio data with a real zero, so a bar chart is allowed. Watch what happens when the axis does not start at zero.

Misleading A bar reads by length, so cutting the axis lies about size
The wind went from 6 knots to 18 knots. That is three times as strong, which is real and worth knowing. But start the axis at 5 and the 6-knot bar almost disappears while the 18-knot bar towers over it. The last bar now looks about thirteen times the first. A bar says what it means with its length, so the moment you cut the baseline, the length stops matching the number. You did not change the wind. You changed how big it looks.
Key takeaway: The zero baseline belongs to the mark, not the data. A bar means size through length, so it has to start at zero, which is why bars only tell the truth for ratio data. A line means change through position, so it does not need a zero and works for interval and ratio both. Ratio data earns a zero baseline. It does not force you to use one. Before you argue about whether a chart should start at zero, ask what the mark is doing: length, or position?