This lesson introduces Jupyter Notebooks, an open source web application that you can use to create and share documents that contain live code, equations, visualizations, and text. You’ll see reasons to use Jupyter Notebooks and what features they offer.
Why Use Jupyter Notebooks?
00:00 Hey everyone! My name is Martin, and today we’re going to talk about Jupyter Notebooks. First, we’re going to talk about what they even are and why you should use them, then we’re going to go over the basic functionality and look at a bit of the advanced usage. Let’s get started! First on the list, why would you even want to use Jupyter?
00:18 So, one community that is using Jupyter Notebooks a lot is the scientific community, and there’s a good reason to that. Jupyter Notebooks solves a problem, which is that not everyone who wants to code something is necessarily a software developer, or is very excited about setting up a development environment, et cetera.
00:37 Coding environments can really be intimidating, so maybe when you are meant to get started to do some code for doing some analytics on a genomics data set, for example, you wouldn’t want to get started using Python inside of a REPL or with IDLE, which is the IDE that comes with Python. Or did maybe someone recommend you to use VIM? Or were you one of those that started off using one of the advanced IDEs?
01:19 It’s great because you can type something and you can right away see the output of your code, which can be very useful. At the same time, it doesn’t support persistent code. It’s a one-off thing. Once you wrote it, it’s gone.
01:38 I’m showing you one of the more involved ones. There’s also stuff in between, like text editors where you can write files. But IDEs solve this problem that you can write persistent code and keep it around, reuse it, run it again—but they can be very complex, and it’s difficult to figure out where to even get started.
02:13 This means that you can get a Read-Evaluate-Print Loop—that’s the REPL acronym. In Jupyter Notebooks, you can get your output right away, in one document. You write code, you see what it results to, and at the same time, you can also write persistent files.
02:29 So it has both those positive aspects, and it looks nice! Here’s a quick screenshot. We’re going to look at this more later on, but just to give you an idea. At the top, we have something that’s called a code cell, where you can write code and evaluate it. You can see this towards the bottom, where there’s the table.
03:10 So, great features of Jupyter Notebooks are that you can run it right in your browser, you have separate code blocks that you can evaluate individually, and you can see the output of this code right inside of that document.
03:23 Everything lives in memory, which means that the outputs or the variables you assigned in one code block are also accessible in the other code blocks. Then, it integrates Markdown and code, so you can create these great thought process documents that record your thinking and your data exploration process in a very visual and easily-understandable way. Plus, it’s very easy to share the Notebooks online. GitHub, for example, displays Notebooks by default, and there’s also other ways for uploading them.
03:56 Finally, there’s a large community that supports Jupyter and uses the Notebooks—especially in science, for example. And there are many extensions that you can use and integrate in your Notebooks to customize the experience even more. So, let’s get started and I will show you how to install Jupyter Notebooks on your computer.
Become a Member to join the conversation.