For this workshop, we'll leverage on the free Azure Notebooks platform so that you don't have to setup anything on your machine.
Azure Notebooks is a free service that provides Jupyter Notebooks along with supporting packages for R, Python and F#. The great thing about this service is that no downloads or lengthy setups are required. After signing up with a Live Account, you can start working on a notebook within minutes.
Just ensure you have a Live Account you can use for logging in.
- Live Account - If you don't have yet, you can create one using this link: https://signup.live.com
1. Go to https://notebooks.azure.com/ and click "Sign in".
Azure Notebooks platform allows you to create a library from scratch (blank). However, for the purpose of this workshop, we'll create the library from an existing GitHub repository.
- Github Repository: https://github.com/whatevergeek/workshop-jupyterlab
- Library Name: workshop-jupyterlab
- Library ID: workshop-jupyterlab
Note: Only do the following steps if you encounter the following issue (i.e. Internal Server Error):
a. In the "Libraries" tab, delete the library (workshop-jupyter) you just created. You may do this by right clicking the library and hitting "Delete".
b. Go to the following link: https://notebooks.azure.com/joepeter/libraries/workshop-jupyterlab
For other issues, contact the workshop coordinator.
2. Notice that the cells are not in order. We need to move “1. Get Data” label and its corresponding code cell up to the first position. Fortunately, JupyterLab supports dragging/dropping of cells. So this is just a breeze. Hold “shift” and select the left side area of “1. Get Data” label and its corresponding code cell. After selection, they should be highlighted like below:
6. As you can see, it still runs like a normal jupyter notebook and is able to support visualizations.
1. From the file browser, double click the "notebooks" folder. Then, double click “Seaborn.ipynb” to open this notebook in a new tab.
3. Scroll to the bottom of notebook. You can see various graphs generated except for the last cell as there’s an error.
Note: This cell threw an error: AttributeError: 'module' object has no attribute 'corrplot'. In this version of seaborn, the corrplot() and underlying symmatplot() functions have been deprecated in favor of heatmap().
5. JupyterLab supports context menus so it’s easy to manipulate cells right where we need it. Since we don't need this cell in this workshop, click “Delete Cells”
6. Now, we have just what we want to see. No errors. Perhaps, not quite. Let’s collapse all code so that only graphs are displayed. Click “Collapse All Code”.
7. Now, we’re left with just the labels and visualizations. Pretty neat. Next, we want to put 2 visualizations in their own windows so we can check them easily.
9. Both output views are in awkward positions. JupyterLab allows you to drag and drop the tabs so that you can arrange them into your custom layout. Arrange the Output View as per the display below.
10. Let’s say we want to change the data of the first advanced plot. Click on the triple dot below the "Advanced Plots" label.
13. Notice that both graphs are updated accordingly. JupyterLab is designed to have such outputs in sync to the same model.
1. In the file browser (at the home directory), right click markdown_python.md, navigate and click Editor.
2. In the file browser, going back to markdown_python.md, right click markdown_python.md, and this time round navigate and click Markdown Preview instead.
# JupyterLab is awesome!!!
If the prompt asks you for a kernel version, select Python 3.
3. JupyterLab supports viewing of various formats (e.g. *.jpg, *.vl.json, *.csv, *.pdf). Drag the corresponding files into the main work area and arrange them like below.
1. In case you forget the commands, don’t worry. JupyterLab has a fuzzy search via the Commands tab. In the Commands tab, search for “dark” and click on Jupyter Dark Theme.
2. This would have changed to Dark Theme. To revert, just search for “light” and click on Jupyter Light Theme.
Note that this is by no means an exhaustive run through of JupyterLab features. We hope it gives you an idea and inspires you to use this tool also for your productive data wrangling and analysis.
If you’d like to know more about JupyterLab, you can explore the team’s documentation here: http://jupyterlab.readthedocs.io/en/latest/getting_started/overview.html