Start studying
Module 8 · Visualisation Module contents
Module 8  ·  Card 12 / 13intermediate

Heatmaps in Data Visualisation

A heatmap is a grid of cells in which colour shows the value of each cell.

Rows and columns are 2 categories or ordered values, such as day of the week and hour of the day.

For example, a heatmap of orders by day and hour shows the busy lunchtimes and quiet nights at a glance.

A correlation matrix is often drawn as a heatmap with a diverging palette, so strong positive and negative pairs stand out.

Colour is hard to read precisely, so heatmaps show patterns well and exact values poorly unless the numbers are added.

Learn in depth ↓
Module 08 · Visualisation · 13 concepts
In depth  /  15 lines

Heatmaps in Data Visualisation, in more detail

Heatmaps show a value for every combination of 2 variables, using colour in place of numbers.

They exist because a table of numbers is hard to scan, while a grid of colours shows hot and cold areas instantly.

The grid is usually 2 categories crossed, such as product by month, with one number in each cell.

Building one usually starts with a pivot table, or a groupby on both columns.

A sequential palette suits counts and totals, with darker cells for higher values.

A diverging palette suits values with a meaningful middle, such as a correlation running from minus 1 to 1.

A correlation matrix heatmap shows every pair of numeric columns at once, so strongly related pairs stand out.

Row and column order matters, because placing similar rows together makes patterns visible.

Ordered categories such as hours and weekdays should keep their natural order.

Colour is read imprecisely, so close values look the same and exact comparisons are hard.

Writing the number in each cell fixes that for small grids but clutters large ones.

A single extreme cell can stretch the colour scale and wash every other cell into the same shade.

Capping the colour scale, or using a log scale for the colour, keeps the rest of the grid readable.

In practice heatmaps suit time grids, correlation matrices and any table of counts by 2 categories.

The usual mistake is a rainbow palette, which suggests sharp boundaries in values that change smoothly.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
A team wants to see which hours of which weekdays get the most orders. Which chart shows this best?
Visualisation

13 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close