Jupyter Notebook. The Jupyter project

jupyter notebook interactive computing environment to learn programming

Take this article as a way to get started in Jupyter, a guide to know what we can do and some notions to start using it.

It is an interactive computing environment, which allows users to experiment with the code and share it.

Jupyter is the acronym for Julia, Python and R, the three programming languages ​​that Jupyter started with, although today it supports a large number of languages.

It is widely used to create and share documents that contain code. This is very useful in teaching, since we can show with examples how a script, a language works or ask students to propose and validate their own code.

What can I do with Jupyter

We are going to distinguish 2 uses, the personal to learn ourselves and the educational one.

Subscribe to our mailing list

Jupyter for personal use

Good option to practice programming in different languages, and to prepare documentation around programming topics.

Beyond that at the moment I have not found a match. If you have any ideas or know of a specific use, leave a comment.

When it shines most is when you are going to share the information especially to teach other people.

Jupyter and education.

This is where you can really take advantage of it. I'm talking about education, but it doesn't have to be in a strictly formal setting (colleges, institutes, universities, courses) but I also put anyone who wants to teach and disseminate a programming language in this scenario.

One way to use it and share it with students is through JupyterHubWe will see this in detail, step by step, in an article.

How to install Jupyter

The easiest way to install it and the one I recommend is installing Anaconda as we see in the next tutorial.

If you prefer to install only Jupyter, you will need to have python and pip installed. If you use Linux, type in the terminal

pip install jupyter

How it is used

jupyter in the console or terminal

To start it in the terminal

notebook jupyter

It can also be started from Anaconda with its graphical interface.

The image has an empty ALT attribute; its file name is jupyter-browser-1024x271.png

The Notebook opens in the default browser at address.

localhost: 8888

Notebook. It is a document, which can be made up of code, rich text, video, widgets, surveys, etc, etc.

They form their own container that makes it work and that can be converted to other formats and shared with other people.

When you start it, that directory will remain as the base of the project and you will be able to see the folders and documents that contain it.

The Dashboard opens in your default browser, in my case Firefox, so we will work with the browser.

Jupyter Notebook Dashboard

When we start it we see a list of the Notebooks that we have.

When it has started in the terminal we can see the directory from which it is being executed in the line Serving notebooks from local directory

With Ctrl-C in the terminal we stop the notebook and exit the server

we can say in which path or in which directory we want it to start. We start anaconda in terminal. We go to the directory we want, and there we execute the jupyter notebook command. This helps if we only want to work in that directory and not see anything else.

Commandos

Jupyter notebook launches the app
jupyter –help shows help
jupyter –config-dir shows the location of the config directory
jupyter –data-dir shows data directory location
jupyter –runtime-dir shows runtime directory location
jupyter –paths shows all directories and search paths of jupyter
jupyter –json prints directories and search paths in json format

jupyter notebook –no-browser

Components

IS a client server application

  • Notebook web applications. It is an interactive web application to write and interact with the code
  • kernels. They are separate processes that activate the notebook web applications and that return the code that is executed
  • Notebook documents. It is the visible representation of everything. Each Notebook document has its own kernel

Dashboard

Very simple to use, and with functionalities that will be very familiar to you. as if you were browsing your computer. View files, folders, power by name, date, size, upload files, view running processes, etc. Seen in the video

Notebook bar area and cells

the notebook or jupyter notebook sheet

The notebook extension is .ipynb

We work the notebooks by cells.

It has three types of cells

  1. Code cells
  2. Markdown cells. Formatted text and embedded LaTex equations
  3. Raw cells with plain text

Notebooks can be exported to HTML and PDF

Share Jupyter

This will be the next tutorial where we will see how we can use Jupyter to share the files with other people and that they can interact with them.

Leave a comment