Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"nbconvert"ed interactive Vega plots #64

Closed
jacobkolind opened this issue Feb 1, 2017 · 1 comment
Closed

"nbconvert"ed interactive Vega plots #64

jacobkolind opened this issue Feb 1, 2017 · 1 comment

Comments

@jacobkolind
Copy link

Using the nbconvert tool, it would be nice be able to export notebooks containing Vega plots in html (and rst) format. For static plots it just works, but for good reasons all the interactive features of a plot disappear. Links to the d3 and vega javascript libraries need to be added to the HTML template that is passed to nbconvert, and some magic to preserve the plot specification also need to happen in the preprocessing and conversion steps.

Are you able to offer advice on how to write such magic? By calling the private functions _generate_html and _generate_js on the vega.vega.Vega object I can get the relevant snippets of code, but my knowledge about Jupyter and nbconvert is not deep enough to understand how I can make them survive through to the output HTML.

@jakevdp
Copy link
Contributor

jakevdp commented Feb 1, 2017

I'm not certain, but FYI this repo will soon be deprecated. Jupyter integration of vega will be moving to https://github.com/altair-viz/jupyterlab_vega/ (using a fundamentally different approach for compatibility with JupyterLab), so any solution to this issue should be explored there.

@jakevdp jakevdp closed this as completed Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants