ArcGIS Enterprise

How to publish a notebook as a web tool in ArcGIS Enterprise 10.9.1

We released ArcGIS Enterprise 10.9.1 (Windows and Linux) on November 18, 2021. In this release, an exciting new feature for ArcGIS Notebook Server is the ability to publish notebooks as web tools.

Use cases

Some use cases of notebook web tools include (but are not limited to) the following:

We look forward to seeing how you will use notebook web tools in your workflows! To help get you started, here is a step-by-step example of how to publish a notebook web tool.

Example

In this example, we create a web tool that creates and compares two market areas—a buffer and a drive-distance-based area—for a local business.

When we say a 1-mile market area from a point, it could mean a 1-mile circular buffer, or it could also refer to the area that can be reached within 1 mile by driving, biking, walking, and so on. The two types of 1-mile areas can look very different based on the location of the input point and the structure of the underlying road network. Businesses that make strategies based on distance may want to understand the difference between the two areas. Therefore, we will create a web tool that easily visualizes this difference.

The flow chart below demonstrates how the notebook web tool should work.

A flow chart of the notebook web tool example that creates and compares market areas.

Screen record

Note: Some processing times in the video are speeded-up for demonstration purposes.

 

As shown in the video, here are the steps to create the notebook web tool:

  1. Build a notebook with the Python code for your web tool (00:00:05).
  2. In the Parameters pane, add the input parameters for your web tool (00:00:12).
  3. Insert the input parameters as variables to your notebook (00:00:54). Then, run the notebook to check that the variables are processed as expected (00:01:05).
  4. Add the output parameters and insert them at the end of the notebook (00:01:36).
      • Tip 1: Print your FeatureSet output to efficiently acquire the default parameter value (00:01:12).
      • Tip 2: You can also specify the default value of input and output FeatureSets as a URL. See the “Layer URL syntax” section on this page for details. 
  5. Finally, save the notebook and publish the web tool (00:02:12).

You can run the web tool in Map Viewer Classic (00:02:35; this will be available in a future release of Map Viewer), with the Geoprocessing widget in Web AppBuilder (00:03:13), or in your customized apps!

 

We hope this is helpful. Let us know what kind of notebooks you publish as web tools or if you have any questions in the ArcGIS Notebooks Community.

Learn more

About the authors

Lingtao is a Product Engineer for ArcGIS Notebooks. Her work focuses on notebook runtimes, web tools, and notebook samples. Prior to this role, Lingtao worked in Esri Technical Support as a subject matter expert in APIs and SDKs.

Connect:

Nick Giner is a Product Manager for Spatial Analysis and Data Science. Prior to joining Esri in 2014, he completed Bachelor’s and PhD degrees in Geography from Penn State University and Clark University, respectively. In his spare time, he likes to play guitar, golf, cook, cut the grass, and read/watch shows about history.

Connect:
2 Comments
Oldest
Newest
Inline Feedbacks
View all comments

Next Article

Turning a big dataset into a great story with ArcGIS StoryMaps

Read this article