Navigating the Sandbox¶
Now you have created a user account and successfully logged in, this session will teach you about the main elements of the Sandbox.
If you do not yet have a Digital Earth Africa account, follow the steps in Create a Digital Earth Africa account.
The Digital Earth Africa Sandbox uses a JupyterLab interface. JupyterLab is a web-based interactive coding environment. It has a user-friendly interface to make file navigation and workflows more intuitive. Within the Sandbox, we create Jupyter Notebooks to contain and execute code.
The JupyterLab interface¶
When the Sandbox starts up, you will be presented with three main sections, as numbered in the diagram below:
Main work area: Enables you to arrange documents and other windows (such as terminals or code consoles) into panels of tabs that can be resized or subdivided. Open files will be displated in this area. Most of your work will be done here.
Left sidebar: Contains a file browser, the list of running kernels and terminals, the command palette, the notebook cell tools inspector, and the tabs list. By default, the file browser is selected; this will be the most useful toolbar for new users.
Horizontal menu bar: Exposes actions available in JupyterLab, including actions related to saving, editing, viewing and running notebooks. When you are done, you can select File -> Log Out to quit your Sandbox session and free up server space.
Open a Jupyter Notebook¶
The Sandbox comes with many example notebooks that you can learn from and use. Follow the instructions in this section to learn how to open a notebook.
In JupyterLab, double-clicking in the left sidebar file browser opens folders and files. Double-click the Beginners_guide folder in the left sidebar to open the folder and view its contents. This is shown in the figure below.
Jupyter notebooks can be identified by the file extension
.ipynb. Choose a notebook (for example,
01_Jupyter_notebooks.ipynb) and double-click to open it in the main work area.
To navigate back to the home folder, click the folder icon at the start of the folder path. The folder path is near the top of the left sidebar.
For more information, refer to this section of the JupyterLab documentation on Working with Files.
Close a Jupyter Notebook¶
Closing a notebook browser tab will not shut down its ‘computational engine’ (called the kernel). It is good practice to shut down the kernel of any notebooks you aren’t using, as it will free up memory in your Sandbox session. Follow the instructions below to completely shut down the notebook you opened in the previous section.
With the notebook open, click on the menu option File -> Close and Shutdown Notebook.
When asked whether you want to shut down the notebook, click OK.
You can now open and close existing Jupyter notebook files. The next section will cover how to run an existing Jupyter notebook.