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 1 of 23
The ideaTheory

Four hundred numbers, or one line

The class visualisation workbook holds 400 days of air quality for one city: AQI, PM2.5, PM10, CO, SO2, NO2, O3, and the day of the week.

Read the 400 AQI numbers one by one and you will learn almost nothing. Draw them as a single line against the date and the winter spike jumps out in one second.

That is all a chart is: an arrangement that lets your eye do the counting. The skill is choosing the arrangement that answers the question you actually have.