5 Minute Introduction to Nextjournal

The Nextjournal editor is your interface to creating fully reproducible notebooks that feature interactive, runnable environments and rich media.

This short guide takes you through adding code and data, plotting, and manipulating the environment.

Add Content

Click on Add new content or use the ➕ insert menu to add paragraphs, section headings, code cells, lists, and more.

Inserting or adding new content to Nextjournal

Code Cell

Select a language to insert a cell. Write some code and press shift enter to run the cell. Use the ··· action menu to make changes to the cell itself.

Both the ➕ insert menu and the ··· action menu are exposed when selecting or hovering over notebook elements like paragraphs or code cells.

print("Hello World")


Upload data to Nextjournal using the file command under the ➕ insert menu.


Bash Cell

Bash cells are special case code cells. These cells have access to the notebooks's filesystem on the command line. This is useful for processing data, downloading files, and installing packages.

This cell prints the contents of  cubic.csv↩ to stdout. The reference is made by typing the @ symbol in the code cell and selecting Insert Reference.

head cubic.csv↩ 

Learn more about Bash by reading Using Bash and Understanding Results.


Every language on Nextjournal supports default plotting libraries. Notebooks automatically display the associated plot below each cell. For example, using ggplot2 in R:

plot(Petal.Length, Petal.Width, col=Species, pch=19)

Languages can coexist side-by-side in a notebook and share data and results. For example, the above R plot will now be followed by a Python plot using our default Python environment.

import pandas as pd
df = pd.read_csv(cubic.csv↩)

Note the reference to cubic.csv, which was uploaded earlier. The data is read by pandas and can be plotted using plotly. All these packages are available by default - no installation or configuration required!

import plotly.plotly as py
from plotly.graph_objs import *

data = [Scatter(y=df.iloc[:,0])]
layout = Layout()

Figure(data=data, layout=layout)

plotly graphs are interactive by default - roll over to experience this for yourself. Plotting in Nextjournal offers more detailed information about plotting across various languages and datasets.

The Environment

Nextjournal environments are fully reproducible software stacks that enable experimentation and collaboration.

As an example, install the venerable Linux utility cowsay:

apt-get update
apt-get install -y cowsay

Then run cowsay and see what the cow says:

cowsay "Go forth and remix!"

Refer to Nextjournal's Environments notebook for more insight into one of the platform's most powerful features.

What's Next?

 Remix this notebook, make changes, and run cells to experience Nextjournal for yourself. Just get in touch for Private Beta access.

Nextjournal promises complete reproducibility across your entire project. For a broad overview what what makes Nextjournal different from other notebooks and development environments, check out Why Nextjournal.

© 2018 Nextjournal GmbH