Closed agitter closed 5 years ago
I'm not originally from the academic world, and I'm not familiar with Bokeh or Jupyter. Would this relate to the html front-end I'm designing? If so, any references or insight regarding these tools would be useful @agitter @dhimmel
@vincerubinetti Bokeh is one interactive visualization library. There are others as well. Jupyter notebooks combine documentation, code, and visualization, like this example from our analysis in this particular manuscript.
I interpret this comment more generally as asking how we could support interactive manuscripts (graphics and/or code) in the HTML version of Manubot manuscripts. We touch on related work in the Concepts for the future...
paragraph but don't say much. Distill, Idyll, and Stencila remain good references as we consider our response.
Some related previous discussion https://github.com/greenelab/manubot-rootstock/issues/116
Plotly is also something to consider.
Aside from the technical feasibility, do we have a strong vision of the desired behavior for a Manubot manuscript with interactive graphics? Specifically, would the PDF version have a static snapshot in some default initial setting in the place of the interactive graphics?
I don't have a strong vision, no. I think it would be something like what you say: maybe a snapshot of the first frame or some key frame. That looks like the approach taken by the remote_refocus
manuscript mentioned in https://github.com/manubot/rootstock/issues/116.
would the PDF version have a static snapshot in some default initial setting in the place of the interactive graphics?
Currently, we create the PDF by rendering the HTML. Essentially, it's like we're printing the webpage to PDF. While we are likely going to switch the engine that goes from HTML to PDF as per https://github.com/manubot/rootstock/issues/170, this will almost certainly remain our strategy.
Therefore, ideally interactive HTML element would convert properly to PDF. Furthermore, their default state should be the desired static view. I believe most interactive visualizations fulfill these properties.
Specifically, would the PDF version have a static snapshot in some default initial setting in the place of the interactive graphics?
Yes, exactly. Another option could be polymorphic elements where they would get replaced by a user specified static version for PDF export. For example, how the CSS @page
element only affects printing. However, not sure whether this is possible? CC @vincerubinetti. And even if it is, it's probably not desirable. I don't think we really want PDF and HTML outputs diverging too much.
Our Binder additions can be discussed in response to this.