# Teachbooks: jupyter-book based interactive notebooks

**URL:** <https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32>\
**Category:** General\
**Tags:** education, tools, python, bmi\
**Created:** [November 22, 2024, 12:12pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32 "2024-11-22T12:12:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BSchilperoort](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/bschilperoort/32/14_2.png) [@BSchilperoort](https://forum.csdms.io/u/BSchilperoort)\
**Post date:** [November 22, 2024, 12:12pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32/1 "2024-11-22T12:12:17Z")

</div>

At Delft University of Technology, teachers and TAs have been working on a system they call “[teachbooks](https://teachbooks.io/)”. It’s a flavor of jupyter-book, packaged with some extras and modifications.

What they have done really nicely;

- they made [a github template](https://github.com/TeachBooks/template) so you can get started in minutes
- created a [github workflow](https://github.com/TeachBooks/deploy-book-workflow) that will publish your jupyter-book to github pages: no other hosting necessary. The workflow even builds different branches so you can view the in-progress book.
- they made using a browser-based Python kernel easier to integrate, so you can have code examples that students can run/modify on their own machine, no jupyter lab required (for basic/standard pages). [Try this book chapter as example](https://interactivetextbooks.tudelft.nl/risk-reliability/reliability-component/contamination.html)

I’ve used it to setup a [tutorial during a workshop](https://excited-co2.github.io/workshop_tutorial/main/intro.html), but could not use the interactive elements as it needed asyncio which is not possible yet. I did link the book to a jupyter hub we had running during the workshop.

It should also be possible to create a BMI focussed interactive tutorial with teachbooks, where you can play with BMI toy models in the browser. No installing needed.

---

<div class="post-metadata">

**Author:** ![mdpiper](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/mdpiper/32/1_2.png) [@mdpiper](https://forum.csdms.io/u/mdpiper)\
**Post date:** [November 22, 2024, 5:50pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32/2 "2024-11-22T17:50:51Z")

</div>

> It should also be possible to create a BMI focussed interactive tutorial with teachbooks, where you can play with BMI toy models in the browser. No installing needed.

This would be super cool! I’m probably overcommitting myself, but I would be happy to work on this with you.

---

<div class="post-metadata">

**Author:** ![mdpiper](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/mdpiper/32/1_2.png) [@mdpiper](https://forum.csdms.io/u/mdpiper)\
**Post date:** [November 22, 2024, 5:52pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32/3 "2024-11-22T17:52:03Z")

</div>

Also, is this using [JupyterLite](https://jupyterlite.readthedocs.io/en/latest/)? I wanted to explore it for making a CSDMS demo site.

---

<div class="post-metadata">

**Author:** ![BSchilperoort](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/bschilperoort/32/14_2.png) [@BSchilperoort](https://forum.csdms.io/u/BSchilperoort)\
**Post date:** [November 22, 2024, 6:08pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32/4 "2024-11-22T18:08:09Z")

</div>

Yeah and it should work out of the box if you use the github template!

---

<div class="post-metadata">

**Author:** ![samharrison7](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/samharrison7/32/9_2.png) [@samharrison7](https://forum.csdms.io/u/samharrison7)\
**Post date:** [November 25, 2024, 5:36pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32/5 "2024-11-25T17:36:00Z")

</div>

This is really neat, thanks for sharing! I can definitely see myself using this in the future.

As a slight tangent, the new Fortran compiler [LFortran compiles to WASM](https://lfortran.org/blog/2024/05/fortran-on-web-using-lfortran/)… I wonder if teachbooks for Fortran will be a possibility in the future!

---

<div class="post-metadata">

**Author:** ![BSchilperoort](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/bschilperoort/32/14_2.png) [@BSchilperoort](https://forum.csdms.io/u/BSchilperoort)\
**Post date:** [November 29, 2024, 3:02pm UTC](https://forum.csdms.io/t/teachbooks-jupyter-book-based-interactive-notebooks/32/6 "2024-11-29T15:02:26Z")

</div>

It would probably be possible to interface LFortran with the thebe-lite extension somehow. However, R is probably closer to reality as its [WASM interpreter is more mature](https://docs.r-wasm.org/webr/latest/) and you can already use [an R kernel in normal jupyter notebooks](https://github.com/IRkernel/IRkernel).
