This Blog Is an ndoc: Rethinking Digital Publishing
Every article on this blog is an ndoc. The writing, data, code, and interactive elements all belong to the same file. We wanted to see what happens when an article becomes something readers can explore, inspect, and even take with them.
You're reading an ndoc
Most blog posts are fairly simple: some text, a few images, perhaps an embedded chart or video.
This one is a little different.
Every article here is built as an ndoc, a format that brings together four connected parts [1]:
- Narrative: The article itself, including headings, tables, footnotes, and numbered references.
- Stage: An interactive space for charts, filters, sliders, and other elements readers can use.
- Model: The underlying datasets, Python scripts used to process and analyse them, and a record of their execution.
- Slides: The findings presented as a slide deck, using the same underlying work.
The blog covers five areas: About ndoc.ai, AI & Tech, Economy, Health, and Science.
Each article is its own ndoc. And that changes more than just how we publish it.
The problem with how we usually publish
Think about how a typical data-driven article gets made.
The author collects information, analyses it in a spreadsheet or a Python notebook, generates a few charts, and writes the article in a separate editor.
When everything is ready, the charts become images, the results become paragraphs, and the whole thing gets published as a webpage.
The reader sees the finished work. The data, calculations, and decisions behind it usually stay somewhere else.
That separation matters, particularly when an article makes claims based on quantitative analysis.
Reproducibility has been a problem in scientific research for years. In a 2016 Nature survey involving 1,576 researchers, more than 70% reported having tried and failed to reproduce another scientist's experiments. More than half said they had also failed to reproduce their own [2].
Of course, most of those failures involve experimental research. Changing how we publish articles won't fix unreliable experiments or flawed methodologies.
But there's a smaller, more practical problem we can address: can someone reproduce the numbers in an article using the data and code that produced them?
Some publishers have already made progress here.
The Economist, for example, published the code and data behind its COVID-19 excess-mortality tracker on GitHub [3]. It later shared the replication materials for its global excess-deaths model as well [4].
In August 2020, eLife introduced Executable Research Articles, allowing researchers to publish computationally reproducible versions of their papers, complete with executable code and generated results such as statistics, tables, and graphs [5][6].
These are useful approaches, but they still involve keeping the reproducible material alongside the article, whether in a separate repository or another version of the paper.
We wanted to try something different: what if the article and the work behind it were the same object?
What changes when an article is an ndoc?
The main difference is that the published result doesn't have to be separated from the material used to create it.
That opens up a few possibilities.
You can see where the numbers come from
Suppose you're reading an article and come across a figure that looks interesting, or perhaps questionable.
Normally, you'd check the citation, look for the original dataset, and try to work out how the author arrived at that number.
In an ndoc, numbers in the Narrative can be linked directly to the analysis that produced them.
Clicking a linked figure opens a "How was this made?" view, where you can inspect the Python execution and underlying dataset [1][7].
When we calculate a figure for an article, that's how we want to present it: not just as a number in a paragraph, but as a result readers can trace back to its source.
Charts don't have to be static images
A screenshot of a chart can tell you something, but you can't do much with it.
An interactive chart lets you ask your own questions.
What happens if you change an assumption? What if you filter out a particular group or explore a different range of values?
That's what the Stage is for.
Readers can interact with charts, filters, and sliders without changing the published article for anyone else. The Stage also runs inside an isolated frame with no network access [1].
This isn't entirely new. eLife's executable articles use a similar principle: changes made by a reader remain in their own browsing session and don't modify the published paper [6].
The difference we're interested in is having those interactions live in the same file as the writing, data, and calculations.
The method stays with the article
When a chart is generated from a dataset, there are usually several steps between the raw data and the finished figure.
Those steps matter.
The Model tab in ndoc shows datasets and scripts as a visual dependency graph. You can follow what feeds into what, inspect the data, and read the code used to process it.
Each script begins with a sentence explaining what it does [1].
You don't need to understand Python to read the article, but the method is there for anyone who wants to examine it.
Corrections don't have to erase the past
Articles change. Sometimes a source gets updated, a calculation needs correcting, or new evidence changes the conclusion.
On a typical website, the page is simply edited. Unless the publisher maintains a revision history, it can be difficult to see what changed.
An ndoc supports named versions that preserve the document at a particular point in time, each with its own shareable link [1].
That gives us a way to update an article while keeping earlier versions available.
You can keep the whole thing
A published article shouldn't necessarily depend on the website where you first found it.
An ndoc can be copied, modified, or downloaded as a single .ndoc.html file.
That file contains the work and can be opened in a browser, including offline, while preserving its interactive elements [1].
The format is open and licensed under Apache 2.0 [7].
For us, that's an important part of publishing. If someone finds an article useful enough to save, they should be able to keep more than a static copy of its text.
How does it compare to a traditional article?
| Traditional article | Article as an ndoc | |
|---|---|---|
| Numbers | Usually inserted as text | Can link to the calculations behind them |
| Charts | Typically exported as images | Can be interactive and connected to data |
| Method | Described in the article or stored separately | Available in the Model tab |
| Corrections | Often replace the existing page | Named versions preserve earlier states |
| Reuse | Copy or download the published content | Copy the ndoc, including its data and code |
| Format | Usually accessed through the publisher's website | Also available as a self-contained file in an open format |
Why we're publishing the blog this way
There are three reasons, really.
The first is that we want to practise what we talk about.
In The Death of the Static Document, we explored how numbers lose their connection to the data and calculations behind them.
In The Hidden Cost of Switching Between Tools, we looked at the time and attention spent moving work between disconnected applications.
It would be rather contradictory to write about those problems while publishing everything as static screenshots pasted into ordinary web pages.
The second reason is to use ndoc ourselves.
We can explain what the format is supposed to do, but actually building and maintaining a blog with it is a much better way to discover where it works and where it doesn't.
If something is awkward, unreliable, or unnecessarily complicated, we'd rather encounter it while publishing our own articles.
And if the format isn't good enough for something as familiar as a blog, that's worth knowing.
The third reason is the reader.
We don't think you should have to take every claim at face value.
That's why we include sources, distinguish opinions from factual claims, and, when an article involves our own calculations, keep the data and code available for inspection.
Being able to see how a result was produced doesn't automatically make it correct. But it gives readers a better opportunity to judge it for themselves.
How we make these articles
We start by choosing a question worth answering.
The Narrative is drafted with the help of an AI assistant, then reviewed and edited by us. Factual claims are supported by numbered references so readers can check the sources.
When an article includes data-driven visualisations, we upload the data into the Model and use scripts to calculate the results.
The Stage then presents those results through charts and other interactive elements, rather than relying on manually drawn figures.
The aim is to keep the writing, data, and analysis connected throughout the process, including after publication.
There are still limitations
Using an ndoc doesn't automatically make an article better, and there are a few distinctions we think are worth keeping in mind.
Reproducible doesn't mean correct
A Python script can produce the same result every time and still be completely wrong.
If the input data is unreliable or the method is flawed, making the calculation reproducible doesn't fix either problem.
What it does is make the process easier to inspect.
Someone else can follow the steps, identify mistakes, and challenge the assumptions rather than guessing how a number was produced.
Not everything needs to be interactive
We like interactive charts, but there's no reason to add one just because we can.
Some questions are best answered with a few paragraphs of clear writing.
This article, for example, is mostly text. There's no particular benefit in adding a slider that doesn't help explain anything.
We use the Stage when interaction adds something useful to the reader's understanding, not as decoration.
Websites don't last forever
There's also the question of what happens to published content over time.
In a 2024 study, Pew Research Center found that 38% of webpages that existed in 2013 were no longer accessible a decade later [8].
That's a substantial amount of information disappearing from the web.
It doesn't mean every missing page is permanently lost, but it does show why relying entirely on a website to preserve something can be risky.
The .ndoc.html export is our way of addressing part of that problem.
If an article can be downloaded as a self-contained file, readers don't have to depend entirely on the original publishing platform to keep accessing it.
An article should carry more than its conclusions
We're not trying to reinvent reading.
Most of the time, you should be able to open an article, read it, and move on without thinking about the technology behind it.
But when you want to look more closely, the supporting material should be there.
You should be able to inspect a calculation, explore the data, change an assumption, or save the article together with the work that produced it.
That's what we're experimenting with here.
An article you can read like any other, but also examine, interact with, and take apart when you want to understand how it works.
Sources
- ndoc. "How ndoc works" (product guide). https://ndoc.ai
- Baker, M. (2016). "1,500 scientists lift the lid on reproducibility." Nature 533: 452–454. https://doi.org/10.1038/533452a
- The Economist. "covid-19-excess-deaths-tracker" (code and data repository). https://github.com/TheEconomist/covid-19-excess-deaths-tracker
- The Economist. "covid-19-the-economist-global-excess-deaths-model" (replication code and data). https://github.com/TheEconomist/covid-19-the-economist-global-excess-deaths-model
- Opensource.com (2020). "A web-native approach to open source scientific publishing." https://opensource.com/article/20/11/open-source-scientific-publishing
- eLife (2020). "eLife launches Executable Research Articles for publishing computationally reproducible results." https://elifesciences.org/for-the-press/eb096af1/elife-launches-executable-research-articles-for-publishing-computationally-reproducible-results
- ndoc. "Why we're building ndoc." https://ndoc.ai
- Pew Research Center (2024). "When Online Content Disappears." https://www.pewresearch.org/data-labs/2024/05/17/when-online-content-disappears/