The numbers come from the data
A report declares its sources under data: in its front matter: a CSV, JSON or YAML file next to
the story, or rows written inline. The build reads them in Node, infers the type of each column, and
renders four directives. The rows never reach the browser: only the numbers shown do.
YAML
A number in a sentence
:value computes one number. agg has no default, so no number is ever chosen implicitly.
Markdown
Computed by this page, from the data of the quarterly report: revenue reached €70,743.00, and moved by 5.7% over the previous quarter.
growth compares the last complete period with the one before it. The result is a <data> element:
its value holds the exact number, its text the number in the words of the story's language.
A chart
::chart names columns, never values. It is drawn as SVG during the build, with the accessible
palette and colour roles of the theme, and a "Data" disclosure under it shows the table of the
points it plots.
Markdown
- Lorem
- Ipsum
- Dolor
Data
| month | Lorem | Ipsum | Dolor |
|---|---|---|---|
| January 2025 | 1,178 | 748 | 488 |
| February 2025 | 1,275 | 851 | 471 |
| March 2025 | 1,178 | 827 | 460 |
| April 2025 | 1,277 | 864 | 569 |
| May 2025 | 1,276 | 894 | 580 |
| June 2025 | 1,272 | 803 | 526 |
| July 2025 | 1,298 | 893 | 572 |
| August 2025 | 1,381 | 849 | 531 |
| September 2025 | 1,383 | 925 | 553 |
| October 2025 | 1,420 | 957 | 586 |
| November 2025 | 1,363 | 964 | 563 |
| December 2025 | 1,382 | 884 | 580 |
| January 2026 | 1,361 | 1,000 | 615 |
| February 2026 | 1,437 | 946 | 640 |
| March 2026 | 1,511 | 952 | 675 |
| April 2026 | 1,484 | 928 | 649 |
| May 2026 | 1,537 | 951 | 614 |
| June 2026 | 1,450 | 946 | 604 |
| July 2026 | 1,557 | 1,073 | 640 |
| August 2026 | 1,518 | 969 | 661 |
| September 2026 | 1,571 | 1,011 | 636 |
| October 2026 | 1,634 | 1,011 | 695 |
| November 2026 | 1,642 | 1,063 | 716 |
| December 2026 | 1,643 | 1,019 | 763 |
A table and key figures
Markdown
| Region | revenue | Growth |
|---|---|---|
| Lorem | €18,345.00 | 17% |
| Ipsum | €11,869.00 | 13.5% |
| Dolor | €7,908.00 | 22.1% |
- Revenue
- 70.7K
- Orders
- 1,733
Markdown and its JSON twin
Every report has a typed JSON twin (kind:), validated by report.json and convertible
both ways with recit convert. The twin points to the same data files without copying their rows,
and compiles to the same HTML:
An error, with its line
A field, a source or an attribute that does not exist stops the build, with the line and the closest name:
Code
The whole report these fragments come from is in the gallery.