Tools and workflow for good charts: from spreadsheet to code

TL;DR

Difficulty: Intermediate

Judge a chart tool by the cost of making the chart again next month, not by how fast you make it once.

  • Ask Wilke's three questions: is the chart repeatable, does the tool suit exploring or presenting, does it keep content apart from design?
  • One off charts: whatever you are fastest with. Recurring charts: a template, or a script with one theme file.
  • Save SVG for the web, PDF for print, PNG for slides, never JPEG.
  • Join data and chart in one pipeline with checks, version control, alt text and data tables.
  • Automate the frame, never the headline: the finding is written by a person every time.

Most business charts are rebuilt by hand every month, and the polish is redone every time. This chapter compares the tools of spring 2025 fairly, from Excel and Datawrapper to ggplot2, Python and D3, and shows how to make good charts the default with templates, a pipeline and the right file formats. The example roaster cuts its monthly report from 14 hours to 3.5.

The twelfth chart costs more than the first

Most people choose a chart tool by asking how fast they can make one good chart. That is the wrong question, because almost no business chart is made once. The revenue chart, the churn chart and the sign ups chart come back every month, with new data, for the same people. So judge a tool by the twelfth chart, not the first.

A spreadsheet wins the first chart easily. You select a range, click insert, and a chart appears in seconds. Then you spend twenty minutes making it look like last month's: removing the border, greying the gridlines, fixing the colours, rewriting the title. Next month you do all of it again. A script or a saved template loses the first chart: it takes hours to set up. But from then on the same chart appears in seconds, already in your house style, every time.

I call the time it takes to produce a chart again, with next month's data, its rerun cost. The rerun cost decides what a reporting habit really costs you over a year, and it is almost invisible when you pick the tool. This chapter is about lowering it: which tools exist as of spring 2025, what each one is good at, how to choose, and how to build a workflow where good charts are the default instead of a monthly act of willpower. It builds on everything earlier in this series, above all decluttering a chart step by step, because a template is simply decluttering done once and kept.

Example: Harbour Coffee Roasters's monthly report. Our invented example business is Harbour Coffee Roasters, a speciality roaster in Cork (harbourcoffee.example) that sells one off orders online, coffee subscriptions and wholesale to cafés. Revenue is €2.8 million a year: subscriptions 45%, one off orders 25%, wholesale 30%. Every month the analyst, Ronan, builds a report for the founder, Siobhán, with nine charts: revenue by channel, subscriber sign ups, churn by plan, churn by first delivery speed, the top coffees in repeat orders, wholesale cafés by region, the order value distribution, delivery times and gross margin. Ronan builds all nine by hand in a spreadsheet. In the illustrative figures I use throughout this chapter, that costs him 14 hours a month. The first chart of the year costs him the same as the twelfth. That is the problem this chapter solves.

Three questions to ask of any tool

Claus Wilke, a biologist and the author of Fundamentals of Data Visualization, closes his book with a chapter on software. He refuses to crown a winner. His starting point is that the best software is "the one that allows you to make the figures you need"1. People defend the tools they know, he notes, and that is not unreasonable: switching costs real time and a painful stretch of being slower than before.

But he gives three principles to judge any tool by, and they are the most useful frame I know1:

  1. Reproducibility and repeatability. Can you make the figure again from the raw data, and can someone else?
  2. Exploration versus presentation. How quickly can you try many views of the data, and how much control do you have over the final one?
  3. Separation of content and design. Can you decide what the chart shows independently of how it looks?

Each gets its own section below, with Harbour's report as the example.

Example: scoring Ronan's spreadsheet against the three questions. Ronan's current spreadsheet fails the first question: when Siobhán asks in May how the March churn chart was made, Ronan is not sure which rows he excluded. It passes the second question for exploration (he can flip a range into a chart quickly) but struggles for presentation (every chart needs manual polish). It fails the third: the content (which data, which chart type) and the design (colours, fonts, gridlines) are tangled together inside each chart, so changing the house colour means editing nine charts by hand. Three questions, one pass, two failures. Now we know where the 14 hours go.

Reproducible is not the same as repeatable

Wilke borrows two words from science and gives them a precise meaning for charts1. A chart is reproducible when the plotted data and every transformation applied to it are written down exactly, so that someone else could make a chart that says the same thing, even if their fonts and colours differ. A chart is repeatable when you can recreate exactly the same picture, down to the pixel, from the raw data. Repeatability is the stricter test. If a chart has random elements, such as jitter (small random offsets that stop dots from hiding behind each other), repeatability even needs the random seed to be recorded.

Why does this matter in a business? Because the question "how did you get this number?" always comes, usually from the person with the budget, usually months later. Wilke tells how he once could not remember how he had made a figure for his own paper when he needed to revise it, and how that pushed him away from interactive, point and click tools towards figures generated by scripts from raw data1. Interactive tools often keep only the final chart, not the steps that led to it.

Example: the March churn chart. In April, Siobhán questions the Explorer churn figure in the March report: 7.8% a month, against 2.6% for the Usual plan. Is it right? In the spreadsheet version, Ronan had pasted the subscription export into a tab, deleted test accounts by hand, filtered out gift subscriptions, and built a chart from a range. None of those steps is recorded. To check the figure, he has to redo them from memory and hope he deletes the same rows. In a scripted version, the steps are lines in a file: read the export, drop accounts flagged as test, drop gifts, compute churn per plan, draw the chart. Ronan opens the script, reads the filter, and answers in five minutes. The chart was repeatable, so the number was defensible.

Exploring and presenting are two different jobs

Wilke separates two phases1. In exploration you look at a new dataset from many angles to understand it. Speed is everything and looks do not matter: missing labels and a messy legend are fine as long as you can see the pattern. In presentation you know what you want to say and you make one polished chart for an audience. Control is everything.

A good exploration tool, he argues, lets you change which variable goes to which visual property (position, colour, size) without starting again, and moves easily from a scatter plot to a box plot to a heatmap. Many plotting libraries are organised by chart type instead, each with its own interface and its own input format, which slows exploration because you have to remember how each one works1. This is the practical face of the idea from mapping data to visuals: a chart is a set of mappings from data to aesthetics, and a tool that is built on that idea lets you swap mappings freely.

Cole Nussbaumer Knaflic makes a related point from the business side. In Storytelling with Data she describes Tableau as good for exploratory analysis because it creates many views quickly, and she builds her explanatory charts, the ones for an audience, in Excel2. Two phases, two tools, by choice.

Example: finding the first delivery effect. When Ronan explored the subscription data, he made about forty rough charts in an afternoon: churn by plan, by month of sign up, by region, by coffee, by delivery time. Most were ugly and none was for Siobhán. One showed that subscribers whose first delivery took more than three working days churn at 11.0% a month in their first three months, against 3.1% when the first delivery arrived within three working days. That was the finding. For exploration Ronan needed forty charts fast. For presentation he needs one chart, made well, and made again every month. Forcing both jobs into one tool and one way of working is why the spreadsheet felt slow for one and sloppy for the other.

Keep the content apart from the design

Wilke's third principle is that good software lets you think about content and design separately1. Content is the data, the transformations, the mapping from data to aesthetics, the scales, the axis ranges and the chart type. Design is the background, fonts, symbol sizes, gridlines and where the legend, ticks and titles sit. In ggplot2, the R library he used for the whole book, design lives in a theme: you make the chart once and apply any theme to it, and other people can write and share themes as packages1. Publishing has always worked this way, he notes: writers write, designers set the look, and the two do not wait on each other.

The reason this matters for speed is simple arithmetic. If design is baked into each chart, a change of style costs one edit per chart. If design is a separate file, it costs one edit in total.

Example: Siobhán changes the brand colour. In June Harbour refreshes its brand and the accent colour moves from a dark green to a deep teal. In Ronan's spreadsheet that is nine charts to recolour by hand, plus every chart in the archive that gets reused. With a theme file, Ronan changes one line, the hex code of the accent colour, reruns the report and all nine charts come out in the new colour. Content untouched, design swapped once.

Where today's tools came from

Today's chart tools grew out of two ideas that the Handbook of Data Visualization recorded in 2008, when both were still being worked out.

The first is the chart as code built from reusable parts. In their Handbook chapter on programming statistical graphics in Java, Junji Nakano, Yoshikazu Yamamoto and Keisuke Honda list what a graphics library must do: read data from common formats such as CSV and Excel files, export charts for paper and the web (they name JPEG and SVG), draw the basic statistical charts, combine them into new ones, and support interaction such as brushing and linked views, where selecting points in one chart highlights them in another3. They build their library with object oriented design patterns so that new chart types can be added without rewriting the old ones. Every modern library answers the same list.

The second is the chart as text on the web. In the chapter on web based statistical graphics, Yoshiro Yamamoto, Masaya Iizuka and Tomokazu Fujino observe that most statistical graphics on the web were static pictures, and that interactive ones needed Java or Flash4. Their answer was SVG, Scalable Vector Graphics, an XML format. Because SVG is a text file, software can write it, a person can read and edit it, and each shape can carry its own data value and label, which a bitmap cannot4. JavaScript can then make it interactive.

Three years later, Mike Bostock, Vadim Ogievetsky and Jeffrey Heer published D3 (Data Driven Documents), which binds data directly to elements of the web page, including SVG shapes5. Flash is gone, and the SVG idea won. A parallel line ran through grammar: Leland Wilkinson's The Grammar of Graphics described any chart as data mapped to marks, scales and coordinates6, Hadley Wickham turned it into a layered grammar and the ggplot2 package7, and Arvind Satyanarayan and colleagues built Vega Lite, a grammar for interactive charts written as a short JSON description8.

Example: the first delivery chart as text. Ronan's chart of 11.0% against 3.1% churn, saved as SVG, is a text file. Inside it, each bar is a rect element with a position and a height, and the labels are text elements that say "11.0%" and "3.1%". A screen reader can read those labels, a search engine can index them, and if Ronan has to correct a number he could, in an emergency, open the file in a text editor and see it. Saved as a JPEG, the same chart is a grid of coloured pixels with no idea that it contains two bars. That difference, spelled out in a Handbook chapter in 2008, is why I care which format a chart leaves your tool in.

The tools in spring 2025, named fairly

Here is the field as of May 2025, grouped by how you work with them. Every tool here can make a good chart. They differ in what it costs to repeat one, in who can use them, and in where the result ends up.

ToolBest atWatch out forRepeatable how
ExcelEveryone has it, full control of one chartManual polish each time, formatting lives in each chartChart templates, a fixed data tab
Google SheetsSharing, charts linked into Docs and SlidesFewer formatting controlsLinked charts that update from the sheet
DatawrapperClean, accessible charts for the web, fastFew chart types for exploration, vector export on paid plansDuplicate a chart, swap the data
FlourishInteractive and animated templates, story stepsHeavier pages, less fine controlTemplates, replace the data
TableauFast exploration by dragging fieldsLicence cost, Tableau Public data is publicSaved workbooks on a refreshed source
Power BIDashboards on company data, Microsoft shopsReport design takes disciplineReport themes as JSON files
Looker StudioFree dashboards on Google Analytics and SheetsLimited control of chart detailsReport templates, live data sources
R with ggplot2Statistical charts, themes, full reproducibilityLearning curveScripts plus a theme
Python: matplotlib, seaborn, PlotlyAnalysis and charts in one languageDefaults need work, several styles of interfaceScripts plus a style sheet or template
JavaScript: D3, Vega Lite, Chart.jsCharts that live on a website or appDeveloper skills, accessibility is your jobCode in the site itself

The sections below give each group its reasons and its example.

Spreadsheets: Excel and Google Sheets

Fair play to the humble spreadsheet: Knaflic made every chart in Storytelling with Data in Excel, and argues that you do not need fancy tools to visualise data well2. Her advice is to pick one tool and learn it so well that it stops limiting you. Excel can save a finished chart as a chart template (a .crtx file) and apply it to new charts, which carries the formatting across9. Google Sheets lets you paste a chart into Google Docs or Slides as a linked object and refresh it with one click when the sheet changes10. Knaflic noted in 2015 that Google's charts then had formatting limits that made some decluttering hard2, so check that the controls you need are there before you commit.

The honest weakness of both is the same: the steps between the raw export and the chart range (pasting, deleting, filtering) are done by hand and not recorded.

Example: the spreadsheet done properly. Before any script, Ronan could cut his 14 hours with spreadsheet discipline alone. He creates one workbook with a raw tab where each month's export is pasted unchanged, a calc tab whose formulas compute the nine series from the raw tab, and a charts tab where nine charts point at fixed ranges in the calc tab. He formats one chart in Harbour's style and saves it as a chart template, then applies it to the other eight. Next month he only pastes the new export into raw. This does not make the cleaning repeatable, but it removes the rebuilding and most of the reformatting.

Chart builders for the web, such as Datawrapper and Flourish

Datawrapper and Flourish are web tools made for publishing: you upload or paste data, choose a chart, write the title and notes, and publish or embed. Datawrapper is used widely by newsrooms. Its free plan creates and embeds charts and exports PNG images, while PDF and SVG export sit on the paid plans11. It has an alternative description field for screen readers, a colour blindness check and a data download option for readers on every plan12. Flourish specialises in templates, including animated and interactive ones and step by step stories.

Example: Harbour's blog chart. Siobhán wants to publish one chart on the Harbour blog: December subscription sign ups run 2.6 times the monthly average because of gifts, while July and August run 30% below. Ronan builds it in Datawrapper in fifteen minutes, writes the title "December brings 2.6 times the usual sign ups", fills in the alternative description, and embeds it. Readers can download the numbers behind it. For a single published chart, that does grand: building a script for it would be slower and the result no better.

Business intelligence: Tableau, Power BI and Looker Studio

Business intelligence (BI) tools connect to live data and build dashboards that update themselves. Tableau is strong for exploration, as Knaflic notes, though she also flags its cost2. Tableau Public is free, but workbooks and data published there are public and anyone can download them13, so it is for open data only, never customer data. Power BI stores a report's look in a theme file in JSON format that can be exported and applied to other reports14, which is Wilke's separation of content and design in a dashboard tool. Looker Studio from Google is free and popular with marketers because it reads Google Analytics and Google Sheets directly. How to design dashboards for reading, rather than staring, is covered in the chapter on slides, documents and dashboards.

Example: the subscriber dashboard. Siobhán wants to see subscriber numbers and churn by plan daily, without asking Ronan. That is a monitoring job, not a story, and a BI tool fits it. Ronan connects Looker Studio to the subscription export in Google Sheets and builds one page: active subscribers (3,600), churn by plan (Usual 2.6%, Explorer 7.8%) and first deliveries over three working days (12%). It refreshes itself. The monthly report stays separate, because the report explains and decides, while the dashboard watches.

Code: R, Python and JavaScript

Code is the most repeatable route, because the script is the record of every step. Programming languages have a steeper learning curve, as Knaflic says, but give control over every element and make it repeatable2.

  • R with ggplot2 implements the layered grammar of graphics7. Design lives in themes15, and Kieran Healy's Data Visualization: A Practical Introduction, free online, teaches it from scratch for social scientists and business analysts alike16.
  • Python with matplotlib is the foundational plotting library, described by its author John Hunter in 200717. Its look can be set once in a style sheet or in its settings18. seaborn, built on matplotlib, adds statistical charts with sensible defaults from tidy data19. Plotly makes interactive charts and keeps design in reusable templates20.
  • JavaScript is for charts that live on a website or inside a web application. D3 gives full control and needs the most code5. Vega Lite describes a chart in a few lines of JSON8. Chart.js draws common charts quickly onto a canvas element, but a canvas is invisible to screen readers, so its documentation tells you to add ARIA attributes or fallback content yourself21.

Example: the same chart in three languages. Here is Ronan's first delivery chart in each. First R with ggplot2, where the theme is a separate, reusable function:

library(ggplot2)

theme_harbour <- function() {
  theme_minimal(base_size = 13) +
    theme(panel.grid.major.x = element_blank(),
          panel.grid.minor = element_blank(),
          plot.title.position = "plot")
}

churn <- data.frame(
  first_delivery = c("Within 3 working days", "More than 3 working days"),
  churn = c(3.1, 11.0)
)

ggplot(churn, aes(x = first_delivery, y = churn)) +
  geom_col(fill = c("grey70", "#1b6b5f"), width = 0.6) +
  labs(title = "A slow first delivery more than triples early churn",
       x = NULL, y = "Monthly churn, first three months (%)") +
  theme_harbour()

ggsave("churn_first_delivery.svg", width = 7, height = 4.5)

Then Python with matplotlib, where the house style sits in a style sheet file that every chart loads:

import matplotlib.pyplot as plt

plt.style.use("harbour.mplstyle")

labels = ["Within 3 working days", "More than 3 working days"]
churn = [3.1, 11.0]

fig, ax = plt.subplots(figsize=(7, 4.5))
ax.bar(labels, churn, color=["#b3b3b3", "#1b6b5f"], width=0.6)
ax.set_ylabel("Monthly churn, first three months (%)")
ax.set_title("A slow first delivery more than triples early churn", loc="left")
fig.savefig("churn_first_delivery.svg")

And Vega Lite, for the version on Harbour's internal web page:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "A slow first delivery more than triples early churn",
  "description": "Bar chart. Monthly churn in the first three months: 3.1% when the first delivery arrived within three working days, 11.0% when it took longer.",
  "data": {"values": [
    {"first_delivery": "Within 3 working days", "churn": 3.1},
    {"first_delivery": "More than 3 working days", "churn": 11.0}
  ]},
  "mark": "bar",
  "encoding": {
    "x": {"field": "first_delivery", "type": "nominal", "title": null},
    "y": {"field": "churn", "type": "quantitative", "title": "Monthly churn (%)"}
  }
}

The three snippets make the same point three ways: the data, the mapping and the look are separate, readable lines. Change the data and rerun, and the chart repeats exactly. Notice that the title, the sentence that carries the finding, is written by a person in each one. I come back to that below.

Code or clicks: where the experts disagree

This is a real disagreement, and both sides have a case.

The case for code. Wilke now makes his figures with scripts from raw data and steers people away from interactive tools as far as possible, because manual steps make a figure hard to repeat1. He also warns against routinely polishing charts by hand in an illustration application, because analyses change late and every manual step must then be redone, or quietly is not1. The reproducible research literature agrees. Geir Kjetil Sandve and colleagues' ten rules for reproducible computational research include avoiding manual data manipulation steps, recording how every result was produced, and keeping your scripts under version control22. In the UK, the Government Analysis Function promotes Reproducible Analytical Pipelines (RAP) on the same grounds: fewer manual steps, auditable work, easier quality assurance23.

The case for clicks. Knaflic argues that her lessons are not tied to any tool, that she made a whole book's worth of good charts in Excel, and that learning your tool well matters more than which tool it is2. Wilke himself has no principled objection to charts drawn or finished by hand, and notes their personal, distinctive look1. And a script that only one person in the business can run is its own risk: if Ronan leaves, a spreadsheet Siobhán can open may serve her better than a Python project she cannot.

My view: the line runs through the rerun cost, not through taste. A chart you make once, for one purpose, belongs in whatever tool you are fastest with: a spreadsheet, Datawrapper, or a pencil. A chart you will make again more than a few times belongs in something that repeats it: a template at the very least, and a script once there are several charts and the data needs cleaning. Hand finishing is fine for a one off chart, such as a slide for an investor meeting. It is a mistake in anything monthly. And whichever route you take, write down how the chart was made. Wilke's advice for anyone stuck with interactive tools is exactly that: keep careful notes of each step so the work stays reproducible1.

Example: Harbour draws the line. Ronan sorts Harbour's charts into two piles. One off charts: the blog chart on December sign ups, a chart for a wholesale pitch, a chart for the annual review with the bank in Cork. These stay in Datawrapper and the spreadsheet. Recurring charts: the nine in the monthly report and the dashboard. These move to a script with a theme, and the dashboard to Looker Studio. Ronan writes a one page note for each one off chart explaining where its data came from. Nothing is forced into a tool that does not suit it.

Which tool for whom: a decision path

The right tool depends less on the chart than on the people: who will make it again, where it will be seen, and how often. A three person business and an analytics team of eight should not choose the same way.

  • A small business with no analyst does best with one spreadsheet, kept disciplined (fixed tabs, chart templates), plus Datawrapper for anything published on the web, plus a free dashboard tool for numbers watched daily.
  • A business with one analyst adds a script for the recurring report, in whichever of R or Python the analyst knows, with the house style in one theme file. The analyst writes a short guide so the report survives a holiday.
  • An analytics team standardises: one language for the reporting pipeline, a shared theme package, a shared chart library, version control, and review of chart code like any other code. The BBC's data journalism team, for example, published its ggplot2 house style as the bbplot package and a cookbook, explicitly to make its graphics more reproducible and easier for newcomers to R24. The Urban Institute publishes its ggplot2 theme as the urbnthemes package for the same reason25.
Tap or click to enlarge

Example: walking Harbour's charts through the path. The monthly churn chart: made again, yes. Watched live, no (Siobhán reads it once a month with commentary). Several charts and messy data, yes, nine charts from three exports, and Ronan can write Python. So: a script with a theme. The blog chart on December sign ups: made again, no. So: Datawrapper, Ronan's fastest tool for a web chart. The daily subscriber view: made again, yes, watched live, yes. So: Looker Studio. Three charts, three different answers, and each one obvious once the questions are asked in this order.

File formats: choose by the last mile

A chart is finished only when it arrives where it will be read, and the file format decides how it arrives. Wilke's chapter on image formats gives the reasons26.

Vector or bitmap. A vector file (PDF, SVG) stores shapes: a line from here to there, a bar this high. It is redrawn at any size and stays sharp. A bitmap (PNG, JPEG) stores a grid of pixels and blurs when enlarged. Vectors have two weaknesses: text can look different if the reader's computer lacks the font, and a chart with millions of points makes a huge, slow file26.

Lossless or lossy. PNG compresses without losing anything and works best on images with large flat areas of colour, which is exactly what a chart is. JPEG throws away detail the eye supposedly will not miss, which works for photographs and fails on sharp edges and text, leaving smudges around lines and letters. Wilke's advice is to avoid JPEG for charts and screenshots entirely: the worst a PNG can do is be large, the worst a JPEG can do is look bad26.

Convert downwards only. Converting a vector to a bitmap loses the vector for good, and putting a JPEG inside a PDF does not make it a vector. So keep the master in the richest format (vector, or high resolution PNG) and export smaller copies from it when needed26.

Where the chart goesFormatWhy
A web page or web appSVGSharp at every size, text stays text, light files for simple charts
A printed or emailed reportPDFVector, prints sharply, fonts can be embedded
Slides, email bodies, chat messagesPNG at twice the display sizeDisplays the same everywhere, no font surprises
A scatter plot with a huge number of pointsPNGA vector file would hold every point and grow slow
A photographJPEGLossy compression suits photographs, never charts

Example: one chart, three destinations. Ronan's script saves the first delivery chart three times from the same code: churn_first_delivery.svg for the internal web page, churn_first_delivery.pdf for the printed board pack, and churn_first_delivery.png at 1,400 by 900 pixels for Siobhán's slides. Before, he copied the chart from the spreadsheet as a picture and it arrived in the slides as a blurry, compressed bitmap, with the "3.1%" label fuzzy at the edges. Choosing by the last mile cost him two extra lines in the script.

A template library: decide the style once

Knaflic recommends collecting good examples you admire into a library for inspiration2. A template library is the working version of that idea: one ready made, already decluttered chart for each chart type your business uses, in your house style. It is where the work from decluttering, colour and focusing attention gets stored, so nobody has to redo it.

A good template library has three parts:

  1. A theme: fonts, sizes, gridlines, the grey for everything unimportant, one accent colour for the point. In ggplot2 a theme function15, in matplotlib a style sheet18, in Plotly a template20, in Power BI a JSON theme14, in Excel a chart template9.
  2. A short set of chart types: the handful your business actually uses, each with its rules. Most businesses need fewer than ten.
  3. A palette with roles: not just colours, but what each colour means, so the accent always means "look here" and the grey always means "context".

The last chapter of this series turns this into a written chart style guide for your business, with rules and a checklist.

Example: Harbour's six templates. Ronan looks at a year of reports and finds that every chart Harbour uses is one of six types: a bar chart of amounts, a line chart over time, a dot plot for comparing plans, a histogram for distributions (order values, delivery times), a small multiples grid for regions, and a single number with a sparkline. He builds one template of each in Python, on one style sheet: Harbour's font, light grey gridlines on the value axis only, grey for context, deep teal for the point. The order value histogram template already knows the data are right skewed (median €37, mean €48, 10% of orders above €105) and marks the median rather than the mean, following the chapter on distributions. A new chart starts from a template, never from a blank default.

Data and chart in one pipeline

The most fragile point of most reporting is not the chart. It is the gap between the data and the chart, where someone copies, pastes, deletes and filters by hand. Close the gap and the chart becomes the last step of a pipeline: raw data in, cleaned data, numbers, charts out, every step written in code.

The practices are well known in research computing. Greg Wilson and colleagues' "Good enough practices in scientific computing" recommends keeping the raw data exactly as it arrived, recording every step that changes it, and keeping work under version control27. Sandve and colleagues add: record how every result was made, keep the exact versions of the software, and connect each figure to the data behind it22. A business report needs the same discipline, for the same reason: someone will ask where a number came from.

Version control means a tool, usually Git28, that keeps every version of your scripts and lets you see what changed, when and why. When the March churn figure looks odd, you can see whether the code changed between February and March. Store the code and the theme in it. Keep raw customer data out of it, in a secure place with proper access controls, because a code repository gets copied to many machines. Building that data layer properly is the subject of data warehousing for marketing automation.

Tap or click to enlarge

Example: the check that caught a gap. Ronan's script compares the revenue it calculates with the total the payment system reports for the month. In the illustrative month I am using, the script's total is €9,800 lower. The script stops before drawing anything. Ronan finds that the wholesale export now lists two cafés under a new account type that his cleaning step did not recognise, so their invoices were dropped. He adds the account type to the cleaning rule, Git records the change with a note, and the rerun matches. In the hand made version, those invoices would simply have vanished from a pasted range, and the wholesale share would have looked smaller than its real 30%.

Automate the frame, write the sentence

Here is the rule I hold to in any reporting workflow: automate everything that is the same every month, and never automate the sentence that says what this month means.

The theme, the chart type, the axes, the export, the alt text skeleton: all identical each month, all safe to automate. The title is different. As the chapter on words on charts argued, a good title states the finding, such as "Explorer churn fell to 6.9% after faster first deliveries", not the topic, such as "Churn by plan". A script can only write the topic, because the finding is a judgement about what matters, and that is the analyst's job. A template that fills in "Monthly churn by plan" automatically has quietly reintroduced the software default this whole series argues against.

So the line in a good pipeline runs between the frame and the sentence. The frame is code. The sentence is a person. Knaflic puts it plainly: your tools do not know your story2. Automation should buy the analyst time to find it, not take the decision away.

Example: three months of headlines. Ronan's script leaves the title of each chart as a placeholder that fails loudly if it is not replaced: the report will not build while any title still reads "WRITE THE FINDING". In month one Ronan writes "A slow first delivery more than triples early churn". In month two, after Harbour switches courier for first orders, he writes "First deliveries over three days fell from 12% to 7%". In month three: "Explorer churn is falling as first deliveries speed up". The chart template was identical all three months. The sentence changed every time, because the story did. The 1.5 hours Ronan spends on headlines and commentary is the only part of the monthly work that did not shrink, and it should not.

Accessible charts come out of the same pipeline

A chart that a screen reader user cannot read, or that a colour blind manager cannot decode, has failed part of its audience. The good news is that a pipeline makes accessibility almost free, because the numbers that draw the chart can also write its description.

The Web Content Accessibility Guidelines (WCAG) 2.1 ask for a text alternative for every non text element, such as a chart (success criterion 1.1.1), and for a contrast ratio of at least 3 to 1 for the graphical parts needed to understand it, such as bars and lines, against their background (1.4.11)29. For complex images like charts, the W3C's tutorial recommends a short alternative text plus a longer description, often a data table, close by30. Excel lets you add alternative text to a chart31, Datawrapper has a field for it and a data download link12, and with Chart.js you have to add it yourself21.

In Ireland, the European Union (Accessibility Requirements of Products and Services) Regulations 2023 bring the European Accessibility Act into Irish law from 28 June 2025, covering many online services for consumers32, and charts on a public website are part of the service. The rules for online businesses are set out in accessibility law for online businesses. This is general information, not legal advice.

Example: alt text written by the script. Ronan's script builds each chart's alternative text from the same numbers it plots, then he edits the first sentence to match his headline. For the first delivery chart it produces: "Bar chart. Monthly churn in a subscriber's first three months: 3.1% when the first delivery arrived within three working days, 11.0% when it took longer. 12% of first deliveries took longer than three working days." Under each chart in the web report, the script also writes a small HTML table of the plotted values. The theme's grey and teal both pass a 3 to 1 contrast check against white, tested once when the theme was made, so every chart passes forever after. Ronan spends half an hour a month on accessibility that, in the spreadsheet days, he skipped entirely.

The worked example in full: before and after

Now the whole example, step by step. These figures are illustrative, invented for the example, not measured: your own will differ, but the shape usually does not.

Ronan times each task of the monthly report for one month before the change, then again three months after it.

TaskBefore, hours a monthAfter, hours a month
Export data from three systems and paste it in2.50.25
Clean and reshape (dates, plan names, test accounts)2.00.25
Rebuild the nine charts3.00.25
Reformat to the house look2.50
Paste into the report and fix sizes1.50.25
Check numbers against the source1.00.5
Write headlines and commentary1.51.5
Alt text and data tables00.5
Total14.03.5
Grouped bars per task. Export 2.5 hours before, 0.25 after. Clean 2.0 before, 0.25 after. Rebuild charts 3.0 before, 0.25 after. Reformat 2.5 before, 0 after. Paste and fix 1.5 before, 0.25 after. Check 1.0 before, 0.5 after. Headlines 1.5 before and after. Accessibility 0 before, 0.5 after. Total 14 hours before, 3.5 after. Tap or click to enlarge

Three things stand out. Reformatting disappears completely, because the design lives in the theme. Checking halves rather than vanishing, because the automatic checks do the totals but Ronan still looks at the charts. And two lines do not fall at all: headlines stay at 1.5 hours, and accessibility rises from nothing to half an hour. The time went where it should.

The change in total time is a percentage change (Foundations: percentages):

Δ=tafter−tbeforetbefore×100\Delta = \frac{t_{\text{after}} - t_{\text{before}}}{t_{\text{before}}} \times 100

where Δ\Delta is the percentage change in monthly time, tbeforet_{\text{before}} is the monthly time before the change and taftert_{\text{after}} the monthly time after it. With Harbour's numbers:

Δ=3.5−14.014.0×100=−75\Delta = \frac{3.5 - 14.0}{14.0} \times 100 = -75

so Δ=−75\Delta = -75: the monthly report takes 75% less time.

But building the script and templates was not free. Ronan spent 30 hours on it, once: learning enough Python, writing the pipeline, building the six templates. When does that pay back? The break even month is a one off cost divided by a saving per month, the same logic as comparing a fixed cost with a marginal one (Foundations: marginal versus average):

n∗=Stbefore−taftern^{*} = \frac{S}{t_{\text{before}} - t_{\text{after}}}

where n∗n^{*} is the number of months until the setup has paid for itself, SS is the one off setup time in hours, and tbefore−taftert_{\text{before}} - t_{\text{after}} is the time saved each month. For Harbour:

n∗=3014.0−3.5=2.86n^{*} = \frac{30}{14.0 - 3.5} = 2.86

so the setup pays for itself during the third month. Over the first year the hand made route costs 12×14=16812 \times 14 = 168 hours, the scripted route 30+12×3.5=7230 + 12 \times 3.5 = 72 hours, a saving of 96 hours. From the second year on, with no setup to repay, the saving is 12×10.5=12612 \times 10.5 = 126 hours a year: more than three working weeks of an analyst's time, returned to analysis.

Two lines. Hand made rises by 14 hours a month, from 14 in month 1 to 168 in month 12. Template and script starts at 30 hours of setup and rises by 3.5 a month, from 33.5 in month 1 to 72 in month 12. The lines cross in month 3, where hand made reaches 42 and scripted 40.5. Tap or click to enlarge

The chart makes the rerun cost visible. In month one the hand made route is ahead by almost 20 hours, which is exactly why people never switch: the first chart really is quicker by hand. By month three the lines have crossed, and by month twelve the gap is 96 hours. The break even point moves with your numbers: a report with three charts and clean data might take a year to repay a script, which is where a spreadsheet template is the better answer.

The rerun test: a check for any chart workflow

Here is a test I find more honest than any feature list. Take one recurring chart and ask a colleague to produce next month's version, using your tool and next month's data, without asking you a single question. Time them. If they can do it in under fifteen minutes and the result looks identical to yours, your workflow is repeatable. If they cannot, you have found where your rerun cost hides.

QuestionPassFail
Can someone else find the raw data?One dated folder, unchanged exports"It's in my downloads"
Is every cleaning step written down?In a script or a written noteDone by memory
Does the style come from one place?A theme, style sheet or templateFormatted chart by chart
Do the numbers get checked automatically?Totals compared with the sourceChecked by eye, if at all
Does the chart leave in the right format?SVG, PDF or PNG by destinationCopied as a picture
Does it carry alt text and its data?Generated with the chartAdded never
Is the headline a finding written this month?A person writes it each timeA default title
Can you see what changed since last month?Version controlOverwritten files

Example: Harbour runs the test. Before the change, Ronan asks Harbour's operations manager to rebuild the churn chart. She gets stuck at step two: which rows did Ronan delete? She gives up after forty minutes. Three months after the change, she opens the project, follows the five line guide Ronan wrote, runs the script on next month's exports and gets an identical chart in eleven minutes. Then she stops at the placeholder title, because the script will not let her finish without writing the finding. That is the test working twice: the frame repeats, and the sentence still needs a person.

Conclusion

Choose a chart tool by the cost of making the chart again, not by the speed of making it once. Wilke's three questions sort any tool: can the chart be repeated, does the tool suit exploring or presenting, and does it keep content apart from design. Use the tool you are fastest with for one off charts, and move recurring charts into a template or a script with one theme. Save each chart in the format its last mile needs: SVG for the web, PDF for print, PNG for slides, never JPEG. Join data and chart in one pipeline with checks and version control, and let the same numbers write the alt text and data tables. Then automate the frame and keep the sentence human: the headline that says what this month means is the one part a tool cannot write.

If you want your monthly reporting rebuilt like this, data storytelling, dashboards and data science are a core part of my work, my prices are published openly, and the code, accounts and data stay yours. The free workshop is a good place to start. The next chapter puts all of this to work on five chart makeovers, from a software default to a decision.

If your monthly charts are still rebuilt by hand, book the free workshop: we work out together which charts deserve a template or a script and what that saves you, and the first two weeks of work are on me.

Sources

  1. 1.

    Claus O. Wilke, Fundamentals of Data Visualization, O'Reilly, 2019, chapter 28, Choosing the right visualization software, https://clauswilke.com/dataviz/choosing-visualization-software.html

  2. 2.

    Cole Nussbaumer Knaflic, Storytelling with Data: A Data Visualization Guide for Business Professionals, Wiley, 2015, introduction pp. 3 to 13 and chapter 10, Final thoughts, pp. 243 to 250, https://www.storytellingwithdata.com/books

  3. 3.

    Junji Nakano, Yoshikazu Yamamoto and Keisuke Honda, Programming statistical data visualization in the Java language, in Chun houh Chen, Wolfgang Härdle and Antony Unwin (eds.), Handbook of Data Visualization, Springer, 2008, chapter III.17, pp. 725 to 755, https://doi.org/10.1007/978-3-540-33037-0

  4. 4.

    Yoshiro Yamamoto, Masaya Iizuka and Tomokazu Fujino, Web based statistical graphics using XML technologies, in Chun houh Chen, Wolfgang Härdle and Antony Unwin (eds.), Handbook of Data Visualization, Springer, 2008, chapter III.18, pp. 757 to 789, https://doi.org/10.1007/978-3-540-33037-0

  5. 5.

    Michael Bostock, Vadim Ogievetsky and Jeffrey Heer, D3: Data-Driven Documents, IEEE Transactions on Visualization and Computer Graphics 17(12), 2011, https://doi.org/10.1109/TVCG.2011.185

  6. 6.

    Leland Wilkinson, The Grammar of Graphics, 2nd edition, Springer, 2005, https://doi.org/10.1007/0-387-28695-0

  7. 7.

    Hadley Wickham, A layered grammar of graphics, Journal of Computational and Graphical Statistics 19(1), 2010, https://doi.org/10.1198/jcgs.2009.07098

  8. 8.

    Arvind Satyanarayan, Dominik Moritz, Kanit Wongsuphasawat and Jeffrey Heer, Vega-Lite: A Grammar of Interactive Graphics, IEEE Transactions on Visualization and Computer Graphics 23(1), 2017, https://doi.org/10.1109/TVCG.2016.2599030

  9. 9.
  10. 10.

    Google Docs Editors Help, Link a chart, table, or slides to Google Docs or Slides, https://support.google.com/docs/answer/7009814

  11. 11.

    Datawrapper, Pricing, https://www.datawrapper.de/pricing

  12. 12.

    Datawrapper Docs, How we make sure our charts, maps and tables are accessible, https://academy.datawrapper.de/article/206-how-we-make-sure-our-charts-maps-and-tables-are-accessible

  13. 13.
  14. 14.

    Microsoft Learn, Use report themes in Power BI Desktop, https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes

  15. 15.

    ggplot2 reference, Modify components of a theme, https://ggplot2.tidyverse.org/reference/theme.html

  16. 16.

    Kieran Healy, Data Visualization: A Practical Introduction, Princeton University Press, 2018, free online edition, https://socviz.co/

  17. 17.

    John D. Hunter, Matplotlib: A 2D graphics environment, Computing in Science and Engineering 9(3), 2007, https://doi.org/10.1109/MCSE.2007.55

  18. 18.

    Matplotlib documentation, Customizing Matplotlib with style sheets and rcParams, https://matplotlib.org/stable/users/explain/customizing.html

  19. 19.

    Michael L. Waskom, seaborn: statistical data visualization, Journal of Open Source Software 6(60), 3021, 2021, https://doi.org/10.21105/joss.03021

  20. 20.

    Plotly documentation, Theming and templates in Python, https://plotly.com/python/templates/

  21. 21.
  22. 22.

    Geir Kjetil Sandve, Anton Nekrutenko, James Taylor and Eivind Hovig, Ten simple rules for reproducible computational research, PLOS Computational Biology 9(10), 2013, https://doi.org/10.1371/journal.pcbi.1003285

  23. 23.

    Government Analysis Function, Reproducible Analytical Pipelines (RAP), https://analysisfunction.civilservice.gov.uk/support/reproducible-analytical-pipelines/

  24. 24.

    BBC Visual and Data Journalism, BBC Visual and Data Journalism cookbook for R graphics, 24 January 2019, https://bbc.github.io/rcookbook/

  25. 25.

    Urban Institute, urbnthemes: tools for creating Urban Institute themed plots in R, https://github.com/UrbanInstitute/urbnthemes

  26. 26.

    Claus O. Wilke, Fundamentals of Data Visualization, O'Reilly, 2019, chapter 27, Understanding the most commonly used image file formats, https://clauswilke.com/dataviz/image-file-formats.html

  27. 27.

    Greg Wilson, Jennifer Bryan, Karen Cranston, Justin Kitzes, Lex Nederbragt and Tracy K. Teal, Good enough practices in scientific computing, PLOS Computational Biology 13(6), 2017, https://doi.org/10.1371/journal.pcbi.1005510

  28. 28.

    Scott Chacon and Ben Straub, Pro Git, 2nd edition, Apress, 2014, https://git-scm.com/book/en/v2

  29. 29.

    W3C, Web Content Accessibility Guidelines (WCAG) 2.1, success criteria 1.1.1 and 1.4.11, 2018, https://www.w3.org/TR/WCAG21/

  30. 30.

    W3C Web Accessibility Initiative, Images tutorial: complex images, https://www.w3.org/WAI/tutorials/images/complex/

  31. 31.
  32. 32.

    European Union (Accessibility Requirements of Products and Services) Regulations 2023, S.I. No. 636 of 2023, Irish Statute Book, https://www.irishstatutebook.ie/eli/2023/si/636/made/en/print

Shelter

I’m running the London Marathon for Shelter. Sunday 25 April 2027

My personal fundraiser. Shelter, the National Campaign for Homeless People Limited, registered charity 263710 (England and Wales) and SC002327 (Scotland), registered with the Fundraising Regulator.

Donate to Shelter