Skip to main content
U.S. flag

An official website of the United States government

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Https

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Why Jupyter

Why should you use Jupyter?

Background

This guide aims to answer the basic question of why you should use Jupyter for your scientific computing.

What is Jupyter?

In a nutshell, Jupyter is a tool that allows you to interactively run and visualize the results of your code in a “notebook” like format, just like a digital version of the written lab notebooks you might keep.

What can it be used for?

It is probably most often used as a way to rapidly and reliably perform data science operations. For example, you might be interested in plotting some climate data across a few years in a given region. Jupyter will allow you to import your data, filter and transform the data, run some stats analyses on it, and plot your results all in one place.

Why Jupyter?

It’s easy to use

Jupyter is a lab notebook, a version control system, a development environment, and a visualization tool all in one. This makes it a one-stop shop for all your scientific computing needs. It works in your browser, so there’s no need to install confusing software packages on your machine. It has a simple and easy user interface, especially with the newer Jupyter Lab interface.

You can try out code and inspect the results in real time

One of the major challenges with scientific computing and data science is tweaking and editing code to make sure that every step of your data collection and analysis is working correctly. Often, you will want to download or collect data, reformat or treat it, and then analyze it. With Jupyter, you can inspect the results of every intermediate step to ensure that your data analysis pipelines are working correctly:

alt text

It lets you quickly create data visualzations and customize them any way you like

Many Rstudio users might already know the virtues of being able to run code and see the graphical output immediately. Jupyter brings this capability to almost any language or package you can think of. The traditional R packages can be used natively to create graphics, but Jupyter also allows you to harness the growing power of Python-based data visualization software as well:

alt text

How Jupyter can help you perform more repeatable, clear, and responsible data science

Using markdown along with code allows you to create organized, well-documented scientific notebooks just like the ones you’d use in a lab

Often, scientists running data analyses might find themselves repeatedly tweaking parameters, changing lines of code, or editing text files to get their formatting just right or get the correct output from their software. Doing all this work in Jupyter not only allows you to show your work in code blocks step-by-step, but also to make notes about the code, like where your data comes from our what certain lines of code are meant to do. You can even leave notes for what you plan to do next when you resume your work at a later date, since notebooks can be saved and returned to any time you want.

Exporting your code as HTML, PDFs, or executable code allows you to share your work with collaborators while preserving vital information about how to run that code

Jupyter notebooks allow you to export in many different formats. This allows you to package your code with raw data that, when used together with proper documentation via markdown, creates detailed step-by-step instructions on how to recreate your code and results.