Reproducible, and possibly interactive, text descriptions #4228
baptiste
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I saw some unfortunate typos in a recent online publication, where the colours mentioned in the text didn't match the plot. This isn't solved by the current toolchain of reproducible documents (in quarto or other), so it got me thinking along those lines. Some thoughts:
Paul Murrell's roloc package attempts to find English language descriptions of colours (possibly extracted from a plot in Hex or RGB format). This can be combined with the brailleR package to provide legible descriptions of a plot. One could probably reuse some of this to generate reproducible descriptions of a graph in the main text.
somewhat related, the idea of caption is to automatically extract items from the legend of a ggplot graphic, and make it easy to reuse them in the main text, or in figure captions. The syntax could be language-agnostic, e.g.
even further, implementing Bret Victor's Tangle ideas could potentially allow some interaction between dynamic variables in the main text (e.g. numeric values adjustable with the mouse) and the entire document (connected values in the main text, but also in tables and graphs), not just for js content, but seamlessly across languages. This would require i) that the computations are sufficiently "simple" to be executed in the browser (js, or possibly webassembly Shinylive style, I guess); ii) a convenient system working behind the scenes to automatically connect different pieces of code (and in different languages), as in the
ojs_define() function
but extended to a a wider range of "data" sources (such as a ggplot object, to circle back to the original topic – the text would be able to refer to its ggplot_build data). It sounds like Observable is a solid starting point for this (as is Shinylive, but that's more heavyweight, and as far as I know doesn't have the same flexibility as views to bind events to items in the main text)Beta Was this translation helpful? Give feedback.
All reactions