How can I embed a bokeh viz to a google slides?

Viewed 732

I have a bokeh visualization as an HTML file. Looking for some time how to embed that file to google slides but couldn't find a way. Does anyone know how I can visualize a bokeh plot on the google slides without losing its interactivity?

2 Answers

As far as I know, Google does not permit embedding arbitrary HTML and JavaScript code in Google Slides (see e.g this long thread). That means it is impossible to embed interactive Bokeh plots, since all of the interactivity is only possible due to JavaScript code that must execute. If Google Slides permits embedding IFrames then you could attempt to host the Bokeh HTML on some URL accessible to the slides. But I'm not sure even that is possible, in which case at best you could export PNGs of plots and embed those.

Yes (@bigreddot), as of today, Google slides do not allow embedding HTMLs generated by bokeh, or any HTML file in general.

I badly wanted to make slides using the interactive plots, especially cloud-based ones like google-slides that I can easily share and edit from anywhere. So I came up with a workaround that does not really use google slides but uses google environment and renders the plots without losing their interactivity. I am posting it as a potential answer to the question, but this is more of a workaround. But considering that google-slides do not allow embedding of htmls, this is the best answer we have got within the "google-cloud-system/environment".

I started using google-sites to make "slides". This works really well as google-sites allow embedding iframes. I embed the HTML in a google-site (private/shared), using this option enter image description here and then paste the content of the HTML file in the Embed code tab. enter image description here

This is a great way to make cloud-based private "slides" with interactive plots. These are unconventional because there one has to scroll instead of changing the slides, but that might be something to take an advantage of to make creative slides. I hope this workaround helps.

Related