The notebook editor includes a sidebar where you can browse, search, and add items to a notebook. Items can be hosted in your organization, or they can be publicly available in ArcGIS Online or ArcGIS Living Atlas of the World.
Browse and search for content
To browse and search for content in the notebook editor, complete the following steps:
- On the top ribbon of the notebook editor, click the Add
button to open the content browser panel.
Several tools that you can use to find content are listed.
- At the top of the panel, click the drop-down menu and select the location of displayed content.
The options are as follows:
- My content
- My favorites
- My groups
- My organization
- Living Atlas
- ArcGIS Online
- Use the search text box to search for items in the selected location.
Searching matches items with keywords in their title, tags, or summary.
- Click Filter to sort the results, change the sort direction, and narrow the search results.
The Filter options available depend on where you are searching for content, though some options are always available, such as filtering by sorting by Title and Item type (such as layers or tools).
When you click an item in the panel, another sidebar appears with information about the item. In this sidebar, you can expand Overview, Description, and Details to see more information about the item. If the item contains multiple layers, expand Layers to see more information about each layer. Click View item to open the item page to see more information about the item.
Add content to the notebook
To add an item from the content browser panel to the notebook, click the item's Add button or the Insert into notebook button on the item's sidebar.
A new cell is created in the notebook below the currently selected cell. The item is listed with the information described in the subsections below.
Item
For all items other than web tools , the notebook assigns the item default variable to the item and displays the item as the cell's output when the cell is run.
Tip:
Rename the item variable something that uniquely identifies the item.
# Item Added From Toolbar
# Title: <item title> | Type: <item type> | Owner: <item owner>
item = gis.content.get("<item ID>")
item
Web tools
If the item is a web tool, the notebook imports the geoprocessing toolbox as a Python module that you can use with your content. If you intend to add multiple web tools to the notebook, rename the my_toolbox variable as a unique identifier.
Tip:
Uncomment the last line to display the web tool's help documentation when the cell is run.
# Item Added From Toolbar
# Title: <tool title> | Type: <tool type> | Owner: <tool owner>
from arcgis.geoprocessing import import_toolbox
web_tool_item = gis.content.get("<item ID of tool>")
my_toolbox = import_toolbox(web_tool_item)
# help(my_toolbox)