Holoviews (Bokeh) with reveal.js - jupyter-notebook

I have a presentation with Holoviews (Bokeh) interactive plots. The presentation works fine with rise (inside the notebook), but when I convert it to slides with reveal.js (v3.6.0) locally, the output doesn't show up. Even post serving through the CDN doesn't fix the issue. Anyone encountered this before?

I raised an issue on the RISE site about this problem once I was able to reproduce it, and the RISE author pointed me to this issue on the Bokeh site that let me get it working in my case. The solution is simply not to tell RISE to skip the cell that contains hv.extension("bokeh"). That cell loads BokehJS, which is needed for any Bokeh-based plots to show up, and skipping it works fine for a live presentation but apparently not for any exported version. After telling RISE not to skip that cell, my example notebook now works fine when converted to .html using jupyter nbconvert --to slides Bednar_INDEX_2018.ipynb, and it can be converted to PDF as described in the RISE documentation. The PDF output isn't formatted perfectly, but the plots do all show up at least.

Related

how to show multiple plots into a jupyter notebook page, without "subpages"

I've done a code in a jupyter notebook cell which draws many different plots and everything works fine, except the way jupyter show them, which I do not like very much, as you can see in the following picture
As you can see, plots are reported into a kind of subpage with a scroll bar by side, while what I'd like is just a sequence of such plots into the some page where I've written the code, without any annoying subpage or the like.
Can you suggest me anything, please?

Jupyter notebook opens slowly and extensions don't show up - [MathJax] issue

I'm trying to open a jupyter notebook and it takes a long time and I see at the bottom it's trying to load various [MathJax] extension, e.g. at the bottom left of the safari browser it says:
Loading [MathJax]/extensions/safe.js
Eventually, the notebook loads, but the extensions I used to have, don't show up (like table of contents and others)
I tried to run nbstripout with the relevant filename but it didn't change anything.
I also tried to reinstall jupyter.
I'm having the same issue with timing (but my extensions all seem to work OK). After a lot of experiments with MathJax options in the Jupyter configuration file it seems to be... not related to MathJax.
My guess is that's the last notice displayed, and it stays there while the rest of the notebook loads.
In my experiments, the time to load is directly related to the number of cells in the notebook.

Jupyter notebook uploaded horizontally

I was trying to upload one of my projects (with Jupiter notebook) on Github.
Out of seven files, one file is uploaded in horizontal format rather than vertical.
I deleted twice and reuploaded but the problem persists.
It might sound silly, but unable to figure out the actual problem.
Please view the attached image.

Switch from terminal style output to clickable output in Rmarkdown

I don't know the names for these things so I will attatche an image. Bassically I am used to being able to click through a dataframe inline on Rmarkdown. I just installed a freash version of R and Rstudio on my machine and the output looks like console output and it is not clickable. How do I change this?
This is what I would like
Note the ability to "thumb-through" the data by clicking "Previous" and "Next".
Thanks to #camille explanation, I tracked down the issue. It's a known bug in R v3.5 and an issue has been opened on github:
https://github.com/rstudio/rmarkdown/issues/1331

D3.js chart is visible in Internet Explorer 11 but invisible in Internet Explorer 11

I have a very pretty calendar report that I've created on one machine, that shows my company's daily revenue as a color coded block for every day for the past several years. After finally getting a color scheme down and pretty much finalizing it, I went to test it on another machine - and hit a rather large obstacle.
This is the report that I used as a template:
http://bl.ocks.org/mbostock/4063318
It's awesome. And, inside Internet Explorer 11, it looks fantastic. I never would have expected that copying the code and testing the report would produce a blank page, but there it is. On that page, the calendar report is visible. In IE 11. Copying the code to a new html file and opening it, shows nothing. In Firefox, however, everything is visible. as is.
Now, there's a part of that page that points to "//d3js.org/d3.v3.min.js"
And I figured out that in order to make that work in firefox I had to add the http: in front, so that's not my issue.
I'm literally sitting here at my desk staring at two browser windows open and pointing to the same html file. One contains my beautiful report, one is a completely blank page.
Some cursory google searches reveal that IE 8 or lower have issues with the svg. I can't seem to find any references on someone having a similar issue though. Their situation seems to be that with IE10, you need to specify the height and width, not just one or the other, to make sure everything scales properly.
If I could have my way, I'd just run Firefox on all of the machines that are going to run the report, even if it's just for that one thing! Alas, I am but a mere peasant coder and so I have to make it work. in the dreaded IE.
Are there any svg/html/d3.js coders out there that can tell me another way to spit out the data I'm using so that I can get what I'm looking for?
copying the code and testing the report would produce a blank page
Because you're outputting invalid HTML. There is no html or head element for starters.
Output your code in to a file like example.xhtml and open it in Firefox (specifically) as it's XML parser will very quickly tell you what line and column the first XML parser error is occurring on. You are rendering in standards mode instead of quirks though that does not imply your page meets standards.
var m=(document.compatMode == 'CSS1Compat') ? 'Standards' : 'Quirks'; window.alert(m+'-mode.');

Resources