Jupyter Notebooks Seep into the Everyday…

If you ever poke around in developer documentation, you’ll be familiar with the idea that it often contains code fragments, and things to copy and paste into the command line.

This morning, I noticed an announcement around the Android Management API, and in particular the detail of the Quick Start Guide:

To get started with the Android Management API, we’ve created a Colab notebook that you can follow to enroll (sic) an enterprise, create a policy, and provision a device.


Colab notebook [their strong emphasis]…

Which is to say, a Jupyter notebook running on Google’s collaborative Colab notebook platform.

Here’s what the start of the quick start docs, notebook style, look like:

As you’d expect, a bled of text and code. You can see the first code block at the bottom of the screenshot where you can enter your own personal project id; later code cells walk you through connecting to the API and working with it:


So – that’s interesting thing number one… Google using notebooks just anyway as part of “operationalised” tutorial materials (Interactive documentation? Operationalised documentation?

See also: [Jupyter Notebooks for Scheduling HESA Data Returns? If It’s Good Enough for Netflix…] (https://blog.ouseful.info/2018/09/25/jupyter-notebooks-for-hesa-data-returns/) for how notebooks can be used in production environments for scheduling operations and not just for analysis.

Second thing: Colab. It’s been some time since I looked at it, but one thing that jumped out at me was the inclusion of code snippets in the sidebar…

These working demo code snippets can be added the document at the cursor point:

Running them produces the example output, as you’d expect, in the output part of the cell:

Snippets to add linking and brushing (data vis 101; look it up…) or linked charts are also available:

I’m not sure if this sort of interaction (in terms of getting interactive assets into a document) is what the OpenCreate team are looking to provide, but this may be worth looking at just to see how the interaction feels, and the way in which it allows authors to add live interactive charts, for example, to a content notebook.


In other news, my belated and hastily written project bid to the internal Esteem group to look at creating “reproducible educational materials” as demonstrated by reworking examples of OpenLearn materials was rejected as “not a clearly defined scholarship project”. I’m going to carry on with it anyway, because I think we can learn a lot from it about how notebook style environments can be used to produce:

  • new forms of interactive educational material, opened up by the availability of “generative” content creation code/magics;
  • educational resources that are by their very “source included” nature capable of reuse with modification;
  • educational resources that can provide students with a rich range of interactive activities, presented inline/contextualised in a narrative document, added to the document by authors directly with little, if any, technical / programming skills;
  • an interactive environment where students/learners can create their own interactives and / or generative examples to explore a particular topic or idea, again without the need for much in the way of technical / programming skills.

I’m also going to start working on a set of training resources around Jupyter notebooks using my 0.2FTE not OU time; depending on how that goes, I may try to turn Jupyter training / development into an exit plan. Please get in touch — tony.hirst@open.ac.uk — if this sounds of interest…

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

%d bloggers like this: