Improved architecture and an enthusiastic user base are driving uptake of the open-source web tool.
Jupyter is a free, open-source, interactive web tool known as a computational notebook, which researchers can use to combine software code, computational output, explanatory text and multimedia resources in a single document. Jupyter is neither the first nor the only example of computational notebooks. As early as the 1980s, notebook interfaces were available through software such as Wolfram Mathematica and MATLAB.
The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modelling, data visualization, machine learning, and much more.
The Jupyter Notebook is a living online notebook that allows basically anyone to write up information (code, data, statistics) with narrative, multimedia, and graphs. It can be used for analysis, statistics, machine learning and many more. Faculty can use it to set up interactive textbooks, full of explanations and examples which students can test out right from their browsers.
Students can use it to explain their reasoning, show their work, and draw connections between their classwork and the world outside. Scientists, journalists, and researchers can use it to open up their data, share the stories behind their computations, and enable future collaboration and innovation.
“To me, it’s about storytelling…We all see this tool being used in different ways, but I see it as a fundamental way of telling stories, both for the faculty to tell stories to the students, but also for students to tell stories back to us.”
–Doug Blank, Bryn Mawr College Computer Science Professor
Anaconda is a free, open-source distribution of Python and R that comes with more than 1,400 packages, the Conda package manager for installing additional packages. After installing Anaconda, you can use Anaconda Navigator to install new packages. To download and install Anaconda, go to the Anaconda website.
Because of its comparative simplicity and ease of use for beginners, this article use Jupyter Notebook as the software for running notebook files. It’s easiest to use Anaconda to install Jupyter Notebook, but if you already have Python installed on your system and don’t want to deal with the large Anaconda package, you can run pip3 install jupyter
(for Python 3).
Jupyter is not just a tool: it’s a platform, an ecosystem, that enables others to build tools on top of it. While it is not so important, let us look at the three parts a Jupyter is made of.
A notebook is made up of cells: boxes that contain code or human-readable text. Every cell has a type, which can be selected from the drop-down options in the menu. The default option is “Code”; human-readable text boxes should use the “Markdown” type, and will need to be written using Markdown formatting conventions. To learn more about Markdown, see the “Getting Started With Markdown” Programming Historian lesson.
jupyter notebook example.ipynb
.)Let us run through the steps on how one can write some code in the notebook. Jupyter Notebooks allow you to use many different programming languages including R, Julia, JavaScript, PHP, or Ruby. A current list of available languages can be found on the Jupyter Kernels GitHub page. As an example of an R notebook, see this Jupyter adaptation of Andrew Piper’s R code from “Enumerations”.
In this tutorial, we will be focusing on using Python as the scripting language.
Apart from data analysis, we can also perform quick and extensive data visualisation. Rich interactive computing is what I love most about Jupyter Notebook. Besides, it’s a perfect web-based environment for performing exploratory analysis.
Jupyter autosaves your work periodically by creating “checkpoints” saved in the same directory the notebook file is. If something goes wrong with your notebook, you can revert to a previous checkpoint by going to “File”, then “Revert to Checkpoint”, and choosing a timestamp. That said, it’s still important to save your notebook because if you close and shut down the notebook kernel, the checkpoints will be lost.
You can also download the notebook (File > Download as) in several different file formats. Downloading the Notebook format (.ipynb) is useful if you want to share your code in its full notebook format.
Even if you like the idea of using Jupyter Notebooks, any format conversion requires additional work. If you already have your code written as Python scripts, conversion to Jupyter Notebooks is fairly straightforward. You can copy and paste the code from your .py file into a single code cell of a new notebook, and then split the code cell into segments and add additional Markdown cells as needed.
There are also tools like the p2j package that automatically convert existing Python code to Jupyter notebooks
As we’ve seen, Jupyter Notebook files are handy. The interface allows you to navigate using your mouse with dropdown menus and buttons or by keyboard shortcuts. They allow you to run small code segments at a time, save them in their current state, or restart and have them return to their original state. In addition to running code, we can also use markdown to organize our notebooks neatly they are presentable to others. Lots of analysis from statistical, financial, machine learning to automation can be performed using Jupyter Notebook.
Moreover, from experimenting with code to documenting workflows, scholarly publication, Jupyter notebooks are a flexible, multi-purpose tool that can support digital research in many different contexts.
Even if you aren’t sure how exactly you’ll use them, it’s fairly easy to install the Jupyter Notebook software and download and explore existing notebooks, or experiment with a few of your own. This article hopefully serves as a quick tutorial on how can anyone setup and run Jupyter Notebook on their local machine without much dependencies.
Everything you need to know about NoSQL, a type of database design that offers more… Read More
ZooKeeper is an open-source Apache project that provides a centralized service for providing configuration over… Read More
There are many types of data structures out there that are meant to store data… Read More
This article will offer you a clear grasp of the drilling process, how to install… Read More
Introduction The term solar energy should be quite common; it represents the direct energy produced… Read More
NoSQL Databases have four distinct types. Key-value stores, document-stores, graph databases, and column-oriented databases... Read More