Comments (9)
Does Bokeh with widgets (e.g. sliders) work when using output_notebook()
?
from ma_visualization.
No. I tried it on this plot (associated code). The altidude is selected by a widget. It runs locally but not in the jupyter book.
from ma_visualization.
The problem is, that no python kernel is running. But there is a way to use the java script kernel, which runs in the browser.
Using this 'callbacks' may be the solution. But we have to change our code completly.
from ma_visualization.
Can you check this issue? The solution may be to export the bokeh notebook separately and then include it as an HTML file in the jupyter book.
from ma_visualization.
I tried it like this:
from bokeh.embed import file_html
from bokeh.resources import CDN
import IPython
html_repr = file_html(pn.Column(bars).get_root(), CDN)
IPython.display.HTML(html_repr)
this creates a html file but the widget don't works for now.
from ma_visualization.
Do widgets in the exported HTML file work at least? Our issue is related to issues that are still open, e.g. executablebooks/jupyter-book#1077 and executablebooks/jupyter-book#1113. One suggestion discussed there is to include html_extra_path
in _config.yml
in the following way:
sphinx:
config:
html_extra_path: path_to_external_html
Another question: did you try to update the bokeh library?
from ma_visualization.
I tried running my hv bars plot by:
...
bars = ds_wind.hvplot.scatter(y=['u','v'], symmetric =True, ylim=[-100,100], groupby='alt')
import holoviews as hv
fig = hv.render(bars, backend='bokeh')
Than I have a figure which I can implement in this (analog to the example):
from bokeh.plotting import figure, output_file, save
output_file("test.html")
save(fig)
This gives me a html-site, but the widget doesn't works.
My thoughts were, that I need a figure created by bokeh.plotting rather than holoviews or hvplot.
But bokeh.plotting doesn't works well with with the xarray dataset. Shall I try converting the dataset to a pandas dataset?
Or am I on a wrong way?
from ma_visualization.
Indeed, it may be an issue. Can you try this approach?
from ma_visualization.
Thank you, this works fine! You may check the html version of this simple plot out here.
from ma_visualization.
Related Issues (12)
- Examine dashboard possibility HOT 2
- URL to our book's repository HOT 1
- Fixing environment HOT 17
- Summary Script HOT 1
- Reproduce wind figure HOT 3
- Rewrite matlab reading into python HOT 1
- Reproduce summary figure HOT 5
- understanding the h5 datasets HOT 1
- change h5 file dimensions appropriately HOT 1
- Prepare Binder repository HOT 1
- Prepare jupyter book to show visualizations HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ma_visualization.