Visualization and Storytelling
A chart is an argument. It claims "this pattern exists and matters," and it either persuades an audience or wastes their attention. The craft has two halves — encoding data honestly, and knowing what your audience needs to decide — and the second half is where most technical people underinvest.
Encoding: match the chart to the question
- Comparison across categories → bar chart. Horizontal when labels are long. Sorted by value, not alphabet — alphabetical order is a fact about spelling, not about your data.
- Change over time → line chart. Points imply discrete samples; lines imply continuity; don't lie with either.
- Relationship between two variables → scatter, with a trend line only if you mean it.
- Distribution → histogram or ECDF (box plots hide bimodality; violin plots confuse executives — know your room).
- Part-to-whole → stacked bars used sparingly. Pie charts get one job: two or three slices, one obvious winner.
The honesty rules
- Bar charts start at zero. Bars encode length; truncating the axis fabricates a difference. (Line charts may zoom — they encode slope — but say so.)
- One y-axis. Dual axes let you "prove" any correlation by stretching until the lines kiss.
- Label the units, date range, and denominator. "Attacks up 40%" means nothing without "of what, since when, out of how many."
- Don't encode with area or color intensity what you could encode with position. Humans compare positions superbly, areas poorly, color barely.
Declutter like you mean it
Default chart output is noise: borders, gridlines, legends, ten colors fighting. My working method is subtraction: remove every element that isn't carrying information, mute what remains to gray, then spend color on exactly one thing: the point. If everything is highlighted, nothing is. A chart is finished when its title can be the sentence you'd say aloud — "Failed logins spike every Monday at 6 a.m." — and the ink underneath merely proves it.
Tools, briefly
matplotlib for control and publication output; seaborn for statistical plots with sane defaults; plotly when interaction genuinely helps (large scatters, drill-downs). For dashboards, Streamlit turns a Python script into an app in an afternoon. The tool matters far less than the editing.
The narrative frame
Reports and readouts fail from structure, not charts. The structure that works is a pyramid: answer first ("we should throttle at the edge; here's why"), evidence second, methodology in the appendix for the two people who'll ask. Write for the executive who reads only the first paragraph, the manager who reads the charts, and the engineer who reads the footnotes — in that order, in one document.
Checkpoint
Take a chart you've already made. Rewrite its title as the claim it proves, strip every non-load-bearing element, gray the context, color the point. Show both versions to someone and watch which one they understand in five seconds. That five seconds is the whole discipline.