Skip To Content

Notebooks in ArcGIS Pro

ArcGIS Notebooks are built on top of the Jupyter Notebook, an open-source web application that allows you to create and share documents that contain live Python code, visualizations, and narrative text. With ArcGIS Notebooks integrated into ArcGIS Pro, you can perform analysis and immediately view results in a geographic context, interact with the emerging data, document and automate your workflow, and save it for later use or share it. ArcGIS Notebooks uses include data cleaning and transformation, numerical simulation, statistical modeling, machine learning, administrative tasks, and much more.

All Python functionality in ArcGIS Pro is available through ArcGIS Notebooks, including core Python functionality, the Python standard library, ArcPy, ArcGIS API for Python, and the numerous third-party libraries included with ArcGIS Pro such as NumPy and pandas. ArcGIS Pro can be extended with open-source libraries using the ArcGIS Pro Python Package Manager.

While open-source Jupyter Notebooks are run locally in the ArcGIS Pro application, Esri's integrated Jupyter Notebook experience is also available in an ArcGIS Enterprise portal with ArcGIS Notebook Server.

Learn more about ArcGIS Notebooks

If you are looking for an interactive Python terminal to test or run short snippets of code without advanced notebook capabilities, see Python window.

How to use ArcGIS Notebooks in ArcGIS Pro

To create a notebook, open the Catalog pane, browse to your project directory, right-click a folder, and select New > Notebook Neues Notebook. Alternatively, a notebook can be created from the Insert tab on the Insert ribbon by clicking the New Notebook button. To open an existing notebook, go to your project directory in the Catalog pane and either double-click the notebook file or right-click and choose Open Notebook.

ArcGIS Notebooks that have been added to a project are listed under the Notebooks node Notebooks in the Catalog pane. Notebooks that are created using ArcGIS Pro are automatically added to your project. To add an existing notebook to the project, browse to the project directory using the Catalog pane, right-click the Notebook file and choose Add To Project.

The notebook opens in a similar user interface to the standard Jupyter Notebook, with some minor differences. The New button Neues Notebook, the Save button Speichern, and the Interrupt Kernel button Abbrechen are on the ArcGIS Pro Notebook tab. The Notebook ribbon appears automatically when the Notebook view is open. Refer to the official Jupyter Notebook user interface documentation for details on how to interact with Jupyter Notebooks.

Additional help

The Notebook view help menu provides a tour of the Jupyter Notebook user interface, keyboard shortcuts, Markdown, and other relevant topics.

The tab completion feature provides contextual help based on the location of the pointer. Methods and properties can be viewed by pressing Tab after the dot following the object or library name. For example, type arcpy.analysis into a cell and press Tab to display a list of possible methods available from the analysis module. Once the list is displayed, you can filter it further by typing related words. After selecting a suitable method from the list, press Enter to use it.

Use the tab completion feature to access choices in an ArcGIS Notebook.

Python tools, modules, functions, classes, and keywords all store documentation that provides information on their use. Activate the documentation at the pointer by pressing Shift+Tab. The following is the documentation displayed for the Buffer tool:

Use Shift+Tab to access help for a tool.

Alternatively, the same documentation can be accessed using the built-in Python help function. The following is the help documentation displayed for arcpy.analysis.Buffer:

Use the Python help function to access a tool's help documentation.

Integration with ArcGIS Pro

In addition to the Python window, ArcGIS Notebooks in ArcGIS Pro provide access to content in your map, allowing for interactive workflows such as the following:

  • Layers and other contents of your map can be accessed in your notebook by name or using a path to the data.
  • The output of geoprocessing tools are added to the active map by default.
  • Geoprocessing tools honor selections.
  • Global geoprocessing environment settings are respected and can be overridden by environment settings.
  • Geoprocessing workflows can occur during an ongoing editing session. If a geoprocessing tool directly modifies a feature being edited in an edit session (it does not save the result of geoprocessing as another feature class), you can save or discard the modifications from the Edit ribbon.
  • When geoprocessing tools are run from an ArcGIS Notebook, the result tools log appears in the geoprocessing history.
Vorsicht:

Magic (%) and shell (!) commands are not supported in notebooks run from ArcGIS Pro at ArcGIS Pro 2.5. The %matplotlib inline magic command is currently not supported; to show matplotlib plots, use the show method.

ArcGIS Notebooks hosted with ArcGIS Enterprise are not supported directly in ArcGIS Pro 2.5. To use a hosted notebook in ArcGIS Pro, download and run the .ipynb file locally.

ArcGIS Notebooks in ArcGIS Pro only supports Python, no other language kernels (such as R) are supported.

ArcGIS API for Python

In the ArcGIS API for Python, the GIS object is used to represent the GIS you are working with, such as ArcGIS Online or an instance of ArcGIS Enterprise. Your GIS can support a number of authentication schemes, refer to Working with different authentication schemes to learn how to authenticate your scripts and notebooks for different schemes.

For example, to connect to ArcGIS Online as an anonymous user, specify gis = GIS(). To connect to your active portal in ArcGIS Pro without entering credentials, specify gis = GIS("pro").