question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bokeh / JupyterLab integration

See original GitHub issue

Updated high level design principles:

  • mime bundle for loading BokehJS

    The output_notebook() function generates a mime bundle looks like

    {'application/javascript': js, 
      'application/vnd.bokeh.bootstrap_bokehjs': ''}
    

    In the classic notebook, it ignores the bokeh mimetype and runs the JS. In JLab, the Bokeh mimetype has a higher precedence, so it ignores the JS mimetype.

    • For the classic notebook the JS will load the Bokeh mini-extension to register for the show mime type. Additionally BokehJS will be loaded from CDN or for inline resources, from the JS in the bundle itself.

    • For JLab the Bokeh mini-extension will be previously installed via usual JLab mechanisms. The extension will load BokehJS from CDN or for inline resources, from the locally installed Bokeh package. (via a REST endpoint??)

  • mime bundle for showing standalone docs and applications

    The show(...) function generates a mime bundle that looks like

    'application/vnd.bokeh.show`: JSON
    

    Where JSON is the serialized Bokeh Document and any additional metadata (versions, comm ids etc)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:104 (42 by maintainers)

github_iconTop GitHub Comments

7reactions
bryevdvcommented, Aug 8, 2017

@jasongrout has summarized things perfectly above. I will try to run some preliminary experiments to validate this design approach.

Please also know I’m not trying to be snarky, or short with anyone. If I have seemed so (or been so) I apologize. I genuinely appreciate any and all help, because the perception below is the source of my extreme frustration and stress right now:

screen shot 2017-08-08 at 17 25 19
2reactions
rsinha25commented, Sep 28, 2017

@canavandl , it works like a charm. Kudos on the amazing work. (y)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using with Jupyter — Bokeh 2.4.3 Documentation
Enabling Bokeh visualizations in JupyterLab also requires the jupyter_bokeh extension to be ... To integrate the widget with Bokeh, wrap it in IPyWidget...
Read more >
ian-r-rose/jupyterlab-bokeh-server - GitHub
This project serves as an example for how to integrate a Bokeh server application into JupyterLab. This makes it easy for Python developers...
Read more >
Interactive Visualization with Bokeh - The Data Frog
The integration between bokeh and pandas works very well. In this section, we will use pandas to add another value to each data...
Read more >
Adjust bokeh plot size in Jupyter Notebook - Stack Overflow
In case someone will be interested, I solved it using defining a bokeh figure type before calling the function and then pass it...
Read more >
jupyter-bokeh - PyPI
Install. For versions 3.0 and newer of JupyterLab, you have the option to install jupyter_bokeh with either pip or conda : · Compatibility....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found