ArcGIS Notebooks provides a versatile web-based interface for data analysis. With notebooks, you can perform analysis, automate workflows, and immediately visualize data and analysis results in a geographic context. Notebooks combine code, on-the-fly visualizations and maps, and data tools. In the notebook editor, you can write, document, and run Python code in one place.
Notebooks are authored in the notebook editor, which is opened from ArcGIS Online. This topic introduces the components and menus in the notebook editor.
The notebook editor has the following basic components:
- Navigation bar—Browse the website, open other apps from the app launcher, view help resources, and sign in or out of your profile. The navigation bar also displays the title of your notebook and indicates whether you have unsaved changes to the notebook.
- Top ribbon—Perform various tasks involving your notebook. This ribbon has the following buttons:
- Add—Add layers and web tools to your notebook.
- Analysis—Access analysis tools to use in your notebook.
- Code snippets— Use Python code snippets in your notebook.
- Files—Browse files in your ArcGIS workspace and the data from sample notebooks.
- Tasks—Create one or multiple tasks to automate execution of the notebook, and specify the task's schedule.
- Share—Share your notebook.
- Snapshots—Create a snapshot of your notebook.
- Save—Saves the notebook in its present state. When you open a shared notebook, this button reads Save As.
- Notebook menu ribbon—The actions on this ribbon are for working directly in your notebook. You can add and delete cells, change the notebook appearance, return the notebook to a previous checkpoint, and more. This ribbon also displays whether the notebook is trusted and the version of Python being run.
- Toolbar—Use the tools for common tasks in your notebook.
- Workspace—Your notebook content is displayed here, and you can modify the content here as well.
Notebook menu ribbon
The following actions are available from the drop-down lists in the notebook menu ribbon.
From the File menu, you can choose to download your notebook in one of the following formats:
- Python code (.py)
- Python notebook (.ipynb)
- Reveal.js slides (.slides.html)
- Markdown (.md)
You can also download the notebook in .ipynb format from the notebook's item details page.
The following items are available in the Edit menu:
- Cut Cells—Cuts the currently selected cells from the notebook workspace.
- Copy Cells—Copies the currently selected cells in the notebook workspace.
- Paste Cells Above—Pastes the copied cells above the currently selected cell.
- Paste Cells Below—Pastes the copied cells below the currently selected cell.
- Paste Cells & Replace—Pastes the copied cells and replaces the currently selected cell with the copied cells.
- Delete Cells—Deletes the currently selected cells.
- Undo Delete Cells—Reverses the delete cell actions you've performed in reverse order; the most recent delete is undone first.
- Split Cell—Divides one cell into two by splitting the content within the cell at the pointer's current location.
- Merge Cell Above—Merges the currently selected cell with the one above it.
- Merge Cell Below—Merges the currently selected cell with the one below it.
- Move Cell Up—Moves the currently selected cell up one position in the notebook workspace.
- Move Cell Down—Moves the currently selected cell down one position in the notebook workspace.
- Find and Replace—Opens a pop-up window that allows you to enter a search query. This allows you to find and replace specific values or strings in your notebook.
- Copy Cell Attachments—Copies the attachments contained in the selected cell.
- Cut Cell Attachments—Cuts and copies the attachments contained in the selected cell.
- Paste Cell Attachments—Pastes the copied attachments into the selected cell.
- Insert Image—Opens a pop-up window that allows you to browse and add images, including GIFs, into markdown cells only.
The following items are available in the View menu:
- Toggle Toolbar—Hides or shows the toolbar.
- Toggle Line Numbers—Hides or shows line numbers within each cell in the notebook workspace.
- Cell Toolbar—Hides or shows the selected slide toolbar option for each cell in the notebook workspace. The options are as follows:
- None—Do not show cell toolbars.
- Edit Metadata—Enter metadata for each cell using JSON.
- Raw Cell Format—Raw cells allow you to write output directly; the content of these cells is not evaluated by the notebook.
- Slideshow—Specify how each cell will display in a slide show. This option is helpful when presenting code.
- Attachments—Manage the associated attachments within each cell in the notebook workspace.
- Tags—Create and manage tags for each cell within the notebook workspace.
The following items are available in the Insert menu:
- Insert Cell Above—Insert an empty cell above the currently selected cell.
- Insert Cell Below—Insert an empty cell below the currently selected cell.
The following items are available in the Cell menu:
- Run Cells—Run the currently selected cell and move the pointer to the next cell.
- Run Cells and Select Below—Run the currently selected cell and then select the cell below.
- Runs Cells and Insert Below—Run the currently selected cell and then insert an empty cell below your selected cell.
- Run All—Run all the cells in the notebook in sequential order.
- Run All Above—Run all cells above the currently selected cell but not your selected cell.
- Run All Below—Run the currently selected cell and all cells below it.
- Cell Type—Change the type of the currently selected cell. The options are Code, Markdown, and Raw NBConvert. Note that the Heading type will switch to Markdown.
- Current Outputs—Allows you to control the output of the currently selected cell. The options include the following:
- Toggle Output—Hide or show the output of the currently selected cell.
- Toggle Scrolling—Enable or disable scrolling on the currently selected cell.
- Clear Output—Clear the output of the currently selected cell.
- All Output—Control the output of all cells within the notebook workspace. The options include the following:
- Toggle Output—Hide or show the output of all cells.
- Toggle Scrolling—Enable or disable scrolling on all cells.
- Clear Output—Clear the output of all cells.
The following items are available in the Kernel menu:
- Interrupt—Pause the running kernel if a calculation or analysis is taking too long.
- Restart—Restart the entire computational process by restarting the kernel.
- Restart & Clear Output—Restart the computational process and clear any output that is displayed within the notebooks.
- Restart & Run All—Restart the computational process and then run all the cells in sequential order.
- Reconnect—Reconnect to a kernel if it goes idle.
- Shutdown—Shut down all computational processes within the notebook.
- Change Kernel—Change the kernel type. Only the Python 3 kernel type is supported in ArcGIS Notebooks.
This list provides access to information on keyboard shortcuts, the user interface, and the various help documents associated with ArcGIS Notebooks and key Python modules.
The User Interface Tour is particularly helpful for users who are new to the notebook environment.
Notebook toolbar buttons
The notebook toolbar provides quick access to the most commonly used actions from the notebook menu ribbon. The available buttons, from left to right, are as follows:
- Add—Insert a cell below the currently selected cell.
- Cut—Cut the currently selected cell.
- Copy—Copy the currently selected cell.
- Paste—Paste your copied cells below the currently selected cell.
- Up arrow—Move the selected cell up in the notebook sequence.
- Down arrow—Move the selected cell down in the notebook sequence.
- Run—Run the currently selected cell.
- Stop—Interrupt the kernel.
- Restart—Restart the kernel.
- Fast-forward—Restart the kernel and run all cells.
- Cell type—Select or change the type of the currently selected cell.
- Keyboard—Open the command palette.
- Chart—Enter or exit slide show mode.