Skip to content
BI & Data ScienceCharts, maps and dashboards

Formulas for this chapter

Relative frequency

relative frequency = count in category / n Excel: =COUNTIF(range, category) / COUNTA(range)

Turning a raw categorical column into a distribution that can be charted. The relative frequencies must sum to 1.

count in category
Number of observations with that value
n
Total number of observations, not the number of categories

Row and column percentage in a cross-tab

row % = cell / row total column % = cell / column total

Reading a cross-tabulation. Decide first which conditional question you are asking; the two percentages answer different questions and rarely agree.

cell
Count in one row-column combination
row total, column total
Margin totals of the cross-tab

Equal-interval class width for a choropleth

class width = (max - min) / number of classes

Choosing shading bands for a map. Compare against quantile bands before publishing: the same data looks calm or alarming depending on the choice.

max, min
Largest and smallest values in the variable
number of classes
How many shading bands the legend will have
Step 3 of 23
The real wordsTheory

Preattentive attributes

Preattentive attributesVisual features the eye processes before conscious attention: colour, form (size, shape, orientation, length), spatial position and movement.

Practical consequence: one red bar among twenty grey ones is found instantly, and needs no legend. Twenty differently coloured bars need a legend and are found slowly.

Spend the reader's attention once. Colour the thing you want them to notice, and leave everything else neutral.