HOW TO

Discover valid values for the buffer_type parameter when scripting the Enrich Layer tool

Last Published: February 17, 2022

Summary

When using the Python function for the Business Analyst Enrich Layer tool, the arcpy.ba.EnrichLayer function, it is not obvious from the documentation how to specify the method used to create an area around point geometries for apportionment of demographic data to the input study areas. This is specified in the buffer_type parameter, but when viewing the documentation, it is not immediately apparent what valid string values are, as seen in the following image.

documentation for buffer_type

Procedure

There are two methods to determine this:

  • Use Copy as Python Snippet after running the tool once, or
  • Open the tool in ArcGIS Pro, view the available methods in the drop-down, and manually type in the value.


Copy as Python Snippet
Likely the easiest method is to:

  1. Run the Enrich Layer tool on an example dataset with the parameters you want to use for scripting.
  2. From the Geoprocessing History, right-click and select Copy Python Command, as shown in the image below. This copies the command with the correct parameters to your clipboard.

Copy Python Command option in Geoprocessing History window

Hence, if we select Rural Driving Time for the Define Areas to Enrich parameter in the Enrich Layer tool, once we copy this to the clipboard and paste it into a Python script, we can now see in the next image the correct value for the buffer_type parameter, Rural Driving Time.

Python script with drive-time buffer

View the Drop-down in ArcGIS Pro
Alternately, in the tool, when viewing the parameter options for Define areas to enrich, the available options are all valid values for the buffer_type parameter. Hence, this is a second way to discover valid values for scripting the Enrich Layer tool for using the arcpy.ba.EnrichLayer function.

Article ID: 000027218

Software:
  • ArcGIS Pro 2 8 x
  • ArcGIS Business Analyst Desktop
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options