Jupyter Notebook is a web-based application used to create documents that contain code, visualizations and narrative text. Can we used interactively, or to create static reports.
These slides were created using a Jupyter Notebook
You can find this notebook in job-examples/jupyter/jupyter_overview.ipynb
.
Notebooks are built of cells which can be executed individually. Cells can either contain code or text.
Text cells are rendered using Markdown, a lightweight markup language that can be used to create basic formatting or even including more complicated elements such as LaTeX. Similar in concept but simplier than HTML.
The ‘kernel’ is a program that runs and introspects the user’s code. We have several popular kernels available for Jupyter Notebooks at HCC.
If you need an additional kernel, let us know by completing a software installation request: https://hcc.unl.edu/software-installation-request
HCC has many of the commonly used packages and libraries already installed such as SciPy and the core tidyverse packages in R.
If you need custom environments, you can build them yourself using Anaconda. For information on how to use Anaconda with Jupyter Notebooks, check out our documentation at https://hcc-docs.unl.edu/display/HCCDOC/Using+Anaconda+Package+Manager
Login using your HCC credentials at http://crane.unl.edu
Select one of the Notebook options from the dropdown menu and click
Once your server starts up, open a new notebook by clicking the New button in the top right corner.
data(iris)
head(iris)
Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species |
---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | setosa |
4.9 | 3.0 | 1.4 | 0.2 | setosa |
4.7 | 3.2 | 1.3 | 0.2 | setosa |
4.6 | 3.1 | 1.5 | 0.2 | setosa |
5.0 | 3.6 | 1.4 | 0.2 | setosa |
5.4 | 3.9 | 1.7 | 0.4 | setosa |
We can use popular libraries right in JupyterHub, such as ggplot2
.
library(ggplot2)
ggplot(iris, aes(x=Petal.Length, y=Petal.Width, color=Species)) + geom_point()