Open TalWac opened 3 years ago
Yes, it is possible but using the latest version of Widgets I've only been able to do this using nbconvert on the terminal "jupyter nbconvert --to html my-notebook.ipynb"
@cornhundred - Thank you for answering, much appreciated!
it is possible but using the latest version of Widgets
I have the ipywidgets package version 7.6.3 installed and downloaded in the script - Is this what meant?
If so, is there anything else that needs to be done in the script ( since it still does not display me the interactive heatmap?
Many Thanks, Tal
Are there any more ideas on how to make interactive heatmap work with clustergrammer2 on an HTML file? I just do not know what am I doing wrong
Hi @TalWac you have to run the nbconvert command in a terminal outside of Jupyter. They may have also fixed this functionality in Jupyter Lab 3 - I'll check and update
Hi @cornhundred thank you for answering!- I did run the nbconvert command in the terminal and an HTML was created but without the part of the clustergrammer2 ( the interactive heatmap)
Ok, I forgot if you are running the normal Jupyter notebook (not Lab) you will also need to tell Jupyter to save the widget state after the notebook has run using the drop down described here https://clustergrammer.readthedocs.io/clustergrammer_widget.html?highlight=Save#sharing-with-nbviewer
Or a more updated version here
https://ipywidgets.readthedocs.io/en/latest/embedding.html#save-notebook-widget-state
If you are running Jupyter Lab you can tell it to aromatically save widget state.
I did follow the steps to tell Jupyter to save the widget state using the dropdown. But, sill, I receive an HTML file without the interactive heatmap
Hi @TalWac that is odd. Another option is to use papermill https://papermill.readthedocs.io/en/latest/ to run your notebook. This approach has worked well for me in the past and should automatically embed widget data into the saved notebook - then you have to run nbconvert on the output notebook. I can provide more details if you run into issues.
Thank you @cornhundred very much for your time and effort! I'll check the papermill and update if any issues appears
Dear - @cornhundred - still it seems I'm doing something wrong. but I can not figure what
These are the steps I made the use of the papermill :
Installing the papermill
conda install -c conda-forge papermill
Executing as written in the link Execute via the Python API:
import papermill as pm
pm.execute_notebook( 'D:/path/to/notebook//Report-notbook.ipynb', 'D:/path/to/notebook/to /be/created/Report-notbook-out.ipynb' )
Then in the command line
jupyter nbconvert --to html Report-notbook-out.ipynb.ipynb
However, the HTML file created has no interactive heatmap in it
Also tried to run the notebook using JupyterLab- but doing so, I was not able to plot the heatmap at all. only received the icon Loading widget...
Kindly your advice Regards
Dear Developers,
I'm trying to save the interactive heatmap plot into an HTML file without success so it can be served as a report file. followed the instruction to Sharing with nbviewer
To Reproduce Steps to reproduce the behavior:
Expected behavior to be able to download the interactive heatmap plot the HTML file.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context I'm not sure if I was doing the correct steps or if I provided enough details. If there more info needed please tell me
This is a link to the notebook on Github
Any hint \ idea will be welcome
Many thanks for your help!