Interactive Bokeh for Jekyll using iPython
Extend Jekyll to include html files
Create new file notebook
inside the _include
folder of a standard jekyll environment with the following content.
Now to include a html file inside a post use the following command:
However, setting the height of the iframe using the resizeIframe
function only works with chrome. In firefox the size change does not work.
In my case I put all the html files into subfolders in the root folder asset
.
The results where I included html files create with bokeh and jupyter notebook looks like this:
Above you can see a bokeh plot that uses no interactive functionality. However, below is an example wit the possibility to interact by moving the slider.
Bokeh and Jupyter Notebook
To create the html files above I used jupyter notebook. Below you see the python code example I got from here.
After executing the cell I got an error message which stated that I need to install bokeh flexx using the followign command:
After executing this command on mac os I got the missing package error above. On the Bokeh installation page for conda, I found that I have to add the following channels.
Ressources
- More Bokeh examples can be found here.
Comments