arcgis.geoanalytics.data_enrichment module

These tools are used for data enrichment using geoanalytics

enrich_from_grid

arcgis.geoanalytics.data_enrichment.enrich_from_grid(input_layer, grid_layer, enrichment_attributes=None, output_name=None, gis=None, context=None, future=False)
_images/enrich_from_grid.png

The Enrich From Multi-Variable Grid task joins attributes from a multivariable grid to a point layer. The multivariable grid must be created using the build_multivariable_grid task. Metadata from the multivariable grid is used to efficiently enrich the input point features, making it faster than the Join Features task. Attributes in the multivariable grid are joined to the input point features when the features intersect the grid.

The attributes in the multivariable grid can be used as explanatory variables when modeling spatial relationships with your input point features, and this task allows you to join those attributes to the point features quickly.

Note

Only available at ArcGIS Enterprise 10.7 and later.

Argument Description
input_layer Required layer. The point features that will be enriched by the multi-variable grid. See Feature Input.
grid_layer Required layer. The multivariable grid layer created using the Build Multi-Variable Grid task. See Feature Input.
enrichment_attributes optional string. A list of fields in the multi-variable grid that will be joined to the input point features. If the attributes are not provided, all fields in the multi-variable grid will be joined to the input point features.
output_name optional string. The task will create a feature service of the results. You define the name of the service.
gis optional GIS. The GIS object where the analysis will take place.
context

Optional dict. The context parameter contains additional settings that affect task execution. For this task, there are five settings:

  1. Extent (extent) - A bounding box that defines the analysis area. Only those features that intersect the bounding box will be analyzed.
  2. Processing spatial reference (processSR) - The features will be projected into this coordinate system for analysis.
  3. Output spatial reference (outSR) - The features will be projected into this coordinate system after the analysis to be saved. The output spatial reference for the spatiotemporal big data store is always WGS84.
  4. Data store (dataStore) - Results will be saved to the specified data store. The default is the spatiotemporal big data store.
  5. Default aggregation styles (defaultAggregationStyles) - If set to ‘True’, results will have square, hexagon, and triangle aggregation styles enabled on results map services.
future

optional boolean. If ‘True’, a GPJob is returned instead of results. The GPJob can be queried on the status of the execution.

The default value is ‘False’.

Returns:result_layer : Output Features as feature layer item.
# Usage Example: To enrich a layer of crime data with a multivariable grid containing demographic information.

enrich_result = enrich_from_grid(input_layer=crime_lyr, 
                                 grid_layer=mvg_layer,
                                 output_name="chicago_crimes_enriched")