Enrich Layer (Analyse)

Résumé

Enriches your data by adding demographic and landscape facts about the people and places that surround or are inside your data locations. The output is a duplicate of your input with new attribute fields added to the table. This tool requires an ArcGIS Online organizational account and consumes credits.

Héritage :

This is a deprecated tool. This functionality has been replaced by the Enrich tool.

Illustration

Geoenrichment

Utilisation

    Licence :

    To use the Enrich Layer tool, you must be logged in to an ArcGIS Online organization account. Each time the tool runs successfully, service credits are debited from your subscription based on the service used and the results returned from the service. Refer to the ArcGIS Online credit estimator for an estimate of the service credits consumed by this tool.

  • When the input features are points or lines, you must specify a Define areas to enrich option (buffer_type option in Python) to make straight-line buffer, driving time, or walking-time areas around the features to enrich. The output feature class will be the same geometry as the input but will represent the enriched characteristics of the area specified. For example, if your input is points, the output will also be points, but an enriched output field such as Median household income will represent an area around those points, not a value at the specific point.

  • When using Enrich Layer from the tool dialog box, the Country, Data Collection, and Variables parameters must be entered sequentially. You must select a country to see data collections, and you must select a data collection to see variables.

  • You can select variables from multiple data collections by first selecting a set of variables from one collection; then select a different data collection and select another set of variables from the new collection.

  • You can run this tool with only a data collection specified and no variables selected to get all variables in the collection.

  • This tool creates a new output feature class, which is a copy of the input with additional attributes added. The existing feature geometries and attribute fields and values will not be changed.

Syntaxe

arcpy.analysis.EnrichLayer(in_features, out_feature_class, country, data_collection, {variables}, {buffer_type}, {distance}, {unit})
ParamètreExplicationType de données
in_features

The features to enrich with new data.

Feature Layer
out_feature_class

The output feature class, which is a copy of the input features with new attribute fields added.

Feature Class
country

The country whose data collections and variables are used to enrich the input. You can use the Global country code to obtain enriched data from anywhere in the world. Global can also be used when you have input features that are in more than one country.

You can specify the value that is used in the tool dialog box, such as Canada (CA), or you can use the two-character country code, such as CA.

String
data_collection

The collection of data used to enrich the input. You can specify a data collection without selecting any variables to enrich your data with all variables included in that collection. The Global country code only includes one data collection, KeyGlobalFacts.

You can use a value such as Health & Personal Care (HealthPersonalCare), or you can use the collection name HealthPersonalCare. See the Esri Demographics site for more information on data collections and their variables.

String
variables
[variables,...]
(Facultatif)

The specific variables used to enrich the input. Variables can be from one or multiple data collections.

Variables should be entered in a Python list. You can use a value such as 2013 Total$: Health care (HealthPersonalCare.THS148), or you can use the collection name and variable name HealthPersonalCare.THS148. See the Esri Demographics site for more information on data collections and their variables.

String
buffer_type
(Facultatif)

If the input features are points, you must define an area around them to enrich from one of the following seven types. If the input features are lines, Straight line (Euclidean distance) is the only valid option.

  • STRAIGHT_LINEStraight-line or Euclidean distance is used as the distance measure.
  • DRIVE_TIMEDriving time is used as the distance measure. Current posted speed limits, one-way streets, and turn restrictions affect driving time.
  • DRIVING_DISTANCEDriving distance is used as the distance measure. One-way streets and turn restrictions affect driving distance.
  • TRUCKING_TIMETrucking time is used as the distance measure. Current posted speed limits, one-way streets, and turn restrictions affect trucking time. This option is similar to Driving time, but travel can only occur on roads that are suitable for trucks.
  • TRUCKING_DISTANCETrucking distance is used as the distance measure. One-way streets and turn restrictions affect trucking distance. This option is similar to Driving distance, but travel can only occur on roads that are suitable for trucks.
  • WALKING_TIMEWalking time is used as the distance measure. Measurements are made using a walking speed of 5 KPH (3.1 MPH). Travel is allowed where pedestrians are allowed, such as trails, but not on limited-access highways.
  • WALKING_DISTANCEWalking distance is used as the distance measure. Travel is allowed where pedestrians are allowed, such as trails, but not on limited-access highways.
String
distance
(Facultatif)

The value that determines the straight-line distance or drive time around the input features for areas to enrich. The unit of the distance or time should be supplied in the unit parameter.

Double
unit
(Facultatif)

The unit for Distance or time.

  • MILESMiles
  • YARDSYards
  • FEETFeet
  • KILOMETERSKilometers
  • METERSMeters
  • HOURSHours
  • MINUTESMinutes
  • SECONDSSeconds
String

Sortie dérivée

NomExplicationType de données
CollectionMemory

Exemple de code

EnrichLayer example 1 (Python window)

The following Python window script demonstrates how to use the EnrichLayer tool with only a data collection specified.

import arcpy
arcpy.EnrichLayer_analysis("Cities.shp", "C:/output/Cities_enriched.shp", "US", 
                           "Age", "", "STRAIGHT_LINE", "3", "MILES")
EnrichLayer example 2 (Python window)

The following Python window script demonstrates how to use the EnrichLayer tool with specific variables.

import arcpy
arcpy.EnrichLayer_analysis("Cities.shp", "C:/output/Cities_enriched.shp", "US", 
                           "Age", ["Age.FEM20", "Age.FEM25"], "DRIVE_TIME", 
                           "30", "MINUTES")
EnrichLayer example 3 (stand-alone script)

Find the population within a 10-minute drive time of a number of proposed mixed-use development sites.

import arcpy

# Set environments
arcpy.env.workspace = "c:/data"

# Select a vacant site that is within 0.5 miles of existing restaurants and bars
businesses = "City_businesses.shp"
vacantSites = "Vacant.shp"
arcpy.MakeFeatureLayer_management(businesses, "Restaurants_layer")
arcpy.MakeFeatureLayer_management(vacantSites, "Vacant_Sites_layer")

whereClause = "'SIC2' In (56,57,58)"
arcpy.SelectLayerByAttribute_management("Restaurants_layer", "NEW_SELECTION", 
                                        whereClause)

arcpy.SelectLayerByLocation_management("Vacant_Sites_layer", "WITHIN_A_DISTANCE", 
                                       "Restaurants_layer", "0.5 Miles")

# Get the population within 10 minutes to determine which site to pick
arcpy.EnrichLayer_analysis("Vacant_Sites_layer", "Enriched_Vacant_Sites.shp", 
                           "US", "KeyUSFacts", ["KeyUSFacts.TOTPOP_CY"], 
                           "DRIVE_TIME", "10", "MINUTES")

Informations de licence

  • Basic: Oui
  • Standard: Oui
  • Advanced: Oui