Making my user interactive plot accessible to people

Hi all!

I am using Bokeh server to produce plots which requires user interaction. The output works fine with the plots getting updated as I change the parameter in consideration.

But now I want to share those plots(or a url of those plots) with my advisor or say our collaborator in a different country and I am not being able to figure a way out! I have tried using the autoload_server method to embed the into the html document but of no avail! Going over the Deployment Scenarios in the Bokeh documentation is difficult for me to grasp overall.

Any help would be really appreciated!

Thanks,
Tarak

The easiest way to share bokeh plot is when you write standalone html documents. But those are not always the most practical as they need to include all the data you are showing and you also need to write the callbacks with CustomJS and not python. It’s also the easiest to put on the web as it’s just an html file you place it wherever in your public_html directory and it’s out there on the internet. You can use something like that to save the plot in standalone html:

from bokeh.resources import CDN
from bokeh.embed import file_html

def write_html(bok_obj,tab=‘bokeh’,save=‘default.html’):
“”"
write a html bokeh plot:
- ‘save’ is the full path to the html file
- ‘tab’ is the string that will appear in the browser tab when oppening the html file
- ‘bok_obj’ is any bokeh object (figure,gridplot,tabs etc.)
“”"
outfile=open(save,‘w’)
outfile.write(file_html(bok_obj,CDN,tab))
outfile.close()

``

The second easiest way is to have the people you share your apps with install bokeh themselves so they can have a look locally with bokeh serve --show, you’d have to send them the python codes and relevant data sources.

The third way, deploy a bokeh server online, is not easy as you’ll have to learn about server configuration if you don’t already know about that. There is not a simple example on the bokeh website that shows how to deploy online a minimalistic “hello world” kind of app.

Thanks Sebastien! I will take a look at it.

···

On Thursday, August 17, 2017 at 6:12:56 PM UTC-4, Tarak Shisode wrote:

Hi all!

I am using Bokeh server to produce plots which requires user interaction. The output works fine with the plots getting updated as I change the parameter in consideration.

But now I want to share those plots(or a url of those plots) with my advisor or say our collaborator in a different country and I am not being able to figure a way out! I have tried using the autoload_server method to embed the into the html document but of no avail! Going over the Deployment Scenarios in the Bokeh documentation is difficult for me to grasp overall.

Any help would be really appreciated!

Thanks,
Tarak