Using Your Own Data with GeoEnrichment

With recent updates to the GeoEnrichment service, you can use your own custom data along with sophisticated geographical retrieval methodologies for aggregating data into rings and other polygons. Feature layers with accompanying metadata from ArcGIS Online and ArcGIS Enterprise can be leveraged for apportioning numeric data and summarizing it for input study areas when enriching layers and creating reports.

There are a number of existing workflows which use custom data within the Business Analyst & Community Analyst applications, for more information link to this excellent blog from my colleague Anna:

However, this blog will focus on how to use the GeoEnrichment REST API directly with your own data.

Build Custom Data

To begin, we need to create metadata for any polygon layer with numeric data to specify how it will be used by the GeoEnrichment service when apportioning the data into study areas. This metadata is referred to as a statistical data collection and it describes how the data is gathered and summarized. Tools are available in the Business Analyst web and Desktop applications for authoring this metadata.

The custom data setup workflow in the BA applications is described here in detail:

The file resides in your portal content in a folder called Custom Data, if this folder does not exist it will be created automatically when you build your first data collection:



Use Custom Data

Now that you’ve created a data collection, the next step is to use it with the GeoEnrichment service for data enrichment and reports. Let’s take a look at how to build a custom report template with your variables and some example requests for the Enrich and Create Report methods. 



To use your variables within reports, custom report templates can be built with authoring tools provided in the Business Analyst web & Desktop applications. For more details on building reports with custom variables from the My Data category, see this topic:

With a report template created, you can now pass the item ID to the GeoEnrichment service in the ‘report’ parameter using the Create Report method. For more details on this method, take a look at the REST API reference:

Create Report Example Usage:

1. Request an accessible report template from ArcGIS Online:

Report={“itemid”: portalItemId}[{“geometry”:{“x”: -122.435, “y”: 37.785}}]&report={“itemid”: PortalitemID}&format=PDF&f=bin&token=

2. Request a report template with the portal url and token. This is optional and can be done in the case of a non ArcGIS Online portal or inaccessible item:

Report={“itemid”: “portalItemId”,”url”: portal_url,”token”: portal_token}[{“geometry”:{“x”: -122.435, “y”: 37.785}}]&report={“itemid”:”PortalitemID”,”url”:””,”token”:”YourToken”}&format=PDF&f=bin&token=


To use your own data with the enrich method, you can pass the Item ID of the statistical data collection using the dataCollections parameter to return all variables or to the analysisVariables parameter to request a subset of fields. For more details on this method, take a look at the API reference:

Enrich Example Usage:

1. Request all variables from an accessible data collection from ArcGIS Online using the ‘report’ parameter

Datacollections=[{“itemid”: PortalitemId}][{“geometry”:{“x”: -122.435, “y”: 37.785}}]&datacollections=[{“itemid”: PortalitemID}]&f=pjson&token=

2. Request all variables from a data collection with the portal url and token. This is optional and can be done in the case of a non ArcGIS Online portal or inaccessible item:

Datacollections=[{“itemid”: portalItemId,”url”: portal_url,”token”: portal_token,}][{“geometry”:{“x”: -122.435, “y”: 37.785}}]&datacollections=[{“itemid”: “PortalitemID”,”url”:””,”token”:”YourToken”}]&f=pjson&token=

3. Request a subset of the data collection’s variables using the ‘analysisVariables’ parameter:

Analysisvariables=[{“itemid”: portalItemId,”outfields”:[“Field1″,”Field2”], “portalURL”: portal_url,”token”: portal_token}][{“itemid”:”YourItemID”,”url”:””,”outFields”:[“Field1″,”Field2″],”token”:”YourToken”}]&f=pjson

Notify of
Inline Feedbacks
View all comments

Next Article

Apps for Field Operations at the 2024 Esri User Conference

Read this article