Jupyter Notebooks for Data Analytics: a Beginner’s Guide

The importance of data analytics is steadily growing across all industries. Having proper data analytics and visualizations tools has become more important than ever. Jupyter Notebooks is one of the leading open-source tools for developing and managing data analytics.

Jupyter initially started its life as an offshoot of the iPython project in 2014, and it’s evolved into a full-fledged interactive data science platform. Managed by the non-profit Project Jupyter organization, Jupyter aims to provide the most comprehensive data science platform.

In this article, we’ll show you how to set up and configure a local Jupyter environment. You can use this tutorial as the perfect starting point for beginning data analytics work.

What is a Jupyter Notebook?

Jupyter Notebook is an open-source web application that provides an interactive computational environment. It produces documents (notebooks) that combine both inputs (code) and outputs into a single file. It offers a single document that contains:

  • Visualizations
  • Mathematical equations
  • Statistical modeling
  • Narrative text
  • Any other rich media

This single document approach enables users to develop, visualize the results and add information, charts, and formulas that make work more understandable, repeatable, and shareable.

Jupyter notebooks support more than 40 programming languages, with a major focus on Python. Since it is a free and open-source tool, anyone can use it freely for their data science projects. There are two variants of the Jupyter notebook:

  • Jupyter Classic Notebook, with all the capabilities mentioned above.
  • JupyterLab, a new next-generation notebook interface designed to be much more extensible and modular, with support for a wide variety of workflows from data science, machine learning, and scientific computing.

Today, JupyterLab is the default notebook for any Jupyter project.

(Get started with these Python tools.)

Installing Jupyter Notebook (JupyterLab)

There are multiple ways to install and use Jupyter Notebooks, ranging from installing via conda, mamba, pip, pipenv, or even as a Docker container.

In this section, we discuss two methods of installing Jupyter Notebooks in your local environment. (Please refer to the official documentation of Jupyter Notebook for all the installation methods.) We will be using Windows as the operating system environment for setting up JupyterLab.

Install via Pipenv

Pipenv allows users to create a deterministic reproducible virtual environment with proper dependency management for Python projects. As Jupyter comes as a pip package, we can simply install it in this virtual environment.

First, let’s create a folder that acts as the virtual environment. In this example, we have a folder called “jupyter_notebook” which will be used to create the environment using Pipenv.

Simply run the following command to initiate this folder and set up the Python version to 3.8. However, we can use any supported Python version for this.

pipenv –python 3.8

Then run the following command to install the Jupyter package via pip:

pipenv install jupyterlab

Finally, we can run the JupyterLab using the run command.

pipenv run jupyter lab

After running the JupyterLab, we will be able to access the JupyterLab installation via the provided URL ().

This way, the Pipenv method offers an isolated JupyterLab environment to work without conflicting with:

  • Any other Python project
  • Settings
  • Globally installed packages

Install via Anaconda data science toolkit

Anaconda is an open-source distribution of Python and R programming languages that aims to simplify deployment and package management. It comes with its own:

The anaconda individual edition enables you to quickly set up a local data science environment by simply installing the anaconda installation package.

Now, let’s install Jupyter Notebook via Anaconda. First, navigate the Anaconda website and download the appropriate Individual Edition installation package for your operating system environment.

Then install the software in the local machine using the installer (.exe package).

After that, open the newly installed application called Anaconda Navigator once the installation is complete. It is the GUI used to install applications and packages for the conda environment. You will notice that both Jupyter Notebook and JupyterLab are available in the application section of Anaconda Navigator.

Next, select your preferred notebook type and install it. After that, click on the “Launch” button to start the Jupyter Notebook. This will open a browser window with the notebook opened.

By default, Juptyper will gain access to all the files and folders within the startup location. This is the installation location for anaconda, whereas it’s the folder location of the virtual environment for Pipenv.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article