Using the Jupyter interface

Redivis notebooks are built on top of Jupyter notebooks and the .ipynb notebook format. To execute code in a notebook you'll need to use the Jupyter interface. Here are some basics for getting started.

Cells

Cells are the basic building block of a notebook. You can create Code cells or Markdown cells depending on what you'd like the contents to be. Cells are completely independent and can be collapsed or reordered.

Code cells

You can write and execute code in a code cell. The notebook kernel you selected when you created the notebook will determine what kind of code you can execute (Python, R, Stata, or SAS).

When you run a code cell the results are displayed below the cell as the cell’s output. The output might be text, figures, or HTML tables.

Markdown cells

You can document your processes and annotate your work using markdown cells. You can input markdown language into these cells such as headers # lists - , and more. See a full breakdown of markdown options.

Workflow and execution

When building an analysis you will probably work on it in discrete pieces, organizing related ideas into cells and moving forward once previous parts work correctly. Each of these pieces of analysis can be computed and annotated in a different cell.

Run cell

You can run a cell by typing Shift-Enter / clicking the Play button in the toolbar / clicking the Run menu item. This will execute the current cell, show any output, and jump to the next cell below.

Cell management

Cells can be run in any order and updated independently. The number to the left of the cell will show the place in the sequence that the cell was executed in.

Interface

Cell reordering

Cells can be reordered by typing control shift ↑ or control shift ↓ . While cells can be reordered, we suggest you keep cells in sequential order to maintain reproducibility.

Cell collapsing

All Redivis notebooks start with text at the top in a markdown cell to help you get started. This and any other cell can be collapsed if it contains information you don't need at the moment but want to save for later by clicking the blue bar to the left of the cell. The way that you leave cells collapsed or expanded in your notebook when you stop it is how the next viewer or editor will find them.

Autocomplete and variable information

You can press the tab key to autocomplete functions in your chosen coding language. You also can hover over variable names to get more information about them.

Learn more

There are many guides about using the Jupyter/notebook format. If you want to dive deeper into conceptual usages, keyboard shortcuts, and the Jupyter interface you can start with the official Jupyter documentation.

Last updated