User Tools

Site Tools


misc:nbinteract

How to make an interactive notebook with nbinteract

This is a quick tutorial for turning jupyter notebooks into an interactive webpage everyone can see and use. You need:

First, create the notebook as needed. Use ipwidgets or nbinteract features for interactive sliders and user input. Commit and push the notebook to the github repository. run

nbinteract notebook.ipynb

to generate html code from this notebook, it should generate a file called notebook.html. Edit this file and replace spec: 'yourgitusername/ReproName/master', with spec: 'yourgitusername/ReproName/main', . It should be right above a line containing https://mybinder.org Otherwise, your widgets won't load properly.

Second, open the webpage locally with a browser. Change notebook and repeat until happy. Commit and push every time, otherwise the binder server doesn't update.

Once finished, the html code can be uploaded either on the group webpage with cPanel, or directly hosted on github.io.

misc/nbinteract.txt · Last modified: 2022/03/19 23:11 by statt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki