}
Computational Notebooks with Jupyter

Computational Notebooks with Jupyter

To program. It can mean many things to many people. In the 1980’s, industrious young programmers focused on things like setting the VCR clock, or, more ambitiously, having it record a pre-determined channel at a pre-determined time. Genetics program biology. There are large code repositories that define the functions we collectively refer to as our operation systems.

Most of these types of programs are predetermined. They are designed to be compiled by developers and executed by end users. However, many times we want to program experimentally, heuristically: in an iterative dialog where the output of our programs serves as antistrophe to our hypotheses.

Computational notebooks are an ideal jumping off point.

It doesn’t take too much volume, or much of a significant time away from a code block for it to fade into the past of our memories. Documentation (explaining what and why) is as much a part of coding as the coding itself. Computational Notebooks, such as Jupyter Notebooks, provide an environment for documentation of complex code explorations by intermixing Markdown, LaTeX, and a multitude of code environments, often executed on large clusters. Although they have the raw power necessary for a mature mad scientist’s lab, computational notebooks are also an ideal jumping off point for people just wetting their toes in code because they provide an essential element of the learning process: a note-taking feed back loop, making it easy to review and assimilate explorations.

nbviewer

nbviewer

Getting started viewing Jupyter notebooks (.ipynb files) is pretty painless. Point your browser at https://nbviewer.jupyter.org. There, you can enter the URL, or Github username/repo of a notebook file to see it rendered in browser. This provides a static view of the notebook, that is, you won’t be able to edit the code, only read it and see the results. Here’s a pandas cookbook in nbviewer.

Binder

Binder

Once you feel comfortable with the format of a notebook and want to start exploring altering code, head over to https://mybinder.org. There, you’ll be able to enter a Github repo to load (or gist or independently hosted git repository). The notebook will launch a container to run your notebook and load the notebook in your browser window. There, you can alter, adjust, and otherwise experiment to your heart’s content. Here’s the same pandas cookbook in binder: Binder.

Incredible Versatility

This approach is getting more and more traction across the board. It’s effective for students, but, as Michelle Ufford notes, can also help close the gap between Engineering and Business teams in industry. And for scientific teams working on petabytes-large data sets, remote computation is a must. Data-driven driving anybody? This is how it happens.

Featured image by: unsplash-logoJavier Quesada

will

About Will Puckett

A 20 year veteran of the San Francisco Bay Area, Will Puckett is an author, artist, and guide. He enjoys styling CSS, and helping friends move furniture. When not parked in front of his iPad, he rescues, restores and rides bikes. Will has been lucky enough to take long rides on both coasts of the United States, and encourages people to explore the world by bike. He tries to lay in his hammock as much as possible reading and planning his future container home, but does enjoy periodically escaping to skate. And of course ice cream.