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.