Environmental Data Analytics | John Fay and Luana Lima | Developed by Kateri Salk
Spring 2023
Jupyter Notebooks are similar to R Markdown documents in that they include both formatted text and code. Jupyter Notebooks are quite powerful, but we haven't the time to fully explore them. Instead, I'll refer you to Jupyter's documentation to learn more and instead focus on what we need to know to use Jupyter to learn Python.
First, we'll be using Jupyter installed in one of Duke's "virtual containers".
reserve Jupyter
)[https://cmgr.oit.duke.edu/containers/Jupyter].*→This adds the Jupyter container to the list of your reservations. This container will persist for the remainder of the semester and all your work will be saved on this virtual machine. You can return to it from any web browser using the link above!*
The Jupyter Console is a sort of file manager. You'll see folders and some files with an .ipynb
extension. Those files are Jupyter notebooks. Let's explore how these notebook files are used an managed.
ggplot-python.ipynb
file. The notebook opens in a new tab.ggplot-python.ipynb
notebook is a different color. This means that the kernel for that notebook is running. Even if you close the web page for that notebook, it remains "running" meaning all variables continue to be saved.Shutdown
button.New ▼
dropdown, then select Python 3.MyFirstNotebook
print ("Hello World")
in the code block.►|
button.There, you've run a python command! We'll learn more about Jupyter as we dig deeper into Python.