One of the greatest benefits of using a notebook over a dashboard is the ability to annotate your analysis, but it is important to keep your text and data in-sync.
With linked text you can embed results from any cell into the body of your text, meaning your story is always consistent.
Linked text is a dynamic snippet of text which shows a single value from the results of a cell. The linked text is
Highlighted while in draft and published modes
Cannot be edited once created, only deleted
Reactive - it updates as soon as a cell or control it depends on updates
Linked text can be placed in:
Any part of a text block, including headers and quotes.
Cell output titles
The syntax for creating linked text is below. Once the last bracket is typed, the linked text will become highlighted, and no longer editable.
In the example below, the text block contains two linked text components. The first one selects the first entry in the
numbers column, and the second one selects the second entry. While in draft mode, the linked text syntax remains visible. Once in published mode, the linked text syntax is replaced with the computed value (after the cell has executed).
Often you may want to use linked text to highlight the maximum/minimum value in a column. As linked text needs the column entries to always occur at the same row index, in this case you should ensure that the column is sorted first and pick the first value.