Measure the lie factor of a truncated axis

short · 30 min · Objective 4.1

Task

February had 147 orders and March 176. Calculate how much bigger March's bar looks when the axis starts at zero and when it starts at 140, and turn the difference into a single number: the lie factor.

Steps

  1. Confirm the two counts from data/orders.csv.
  2. A bar's height is its value minus the axis's starting value. Record in lab/lie/heights.txt the ratio of March's bar to February's as ratio from 0: N and ratio from 140: N, to two decimal places.
  3. The lie factor is the change the graphic shows divided by the change in the data, each as (March minus February) divided by February. Record lie factor from 140: N to two decimal places.

Verify

These checks run in a POSIX shell with Python 3: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. On Windows, python3 is often a Microsoft Store placeholder that prints “Python was not found”; run alias python3=py in Git Bash first.

grep -E '^(ratio from 0|ratio from 140|lie factor from 140): ' lab/lie/heights.txt

From zero March's bar is 1.20 times February's, as the data is; from 140 it is 5.14 times, and the lie factor is 21.00 -- the chart exaggerates the rise twenty-one times over. Tufte's rule of thumb calls anything outside 0.95 to 1.05 a distortion. Bars must start at zero, because a bar's length is the value.

This is an independent study companion for CompTIA Data+ DA0-002 and is not produced by or endorsed by CompTIA.