Summarize Nearby (Analysis)

Summary

Finds features that are within a specified distance of features in the input layer and calculates statistics for the nearby features. Distance can be measured as a straight-line distance, a drive-time distance (for example, within 10 minutes), or a drive distance (for example, within 5 kilometers). For drive-time and drive-distance measurements, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Both measurement options consume credits.

The following are example scenarios using Summarize Nearby:

  • Calculate the total population within a 5minute drive time of a proposed new store location.
  • Calculate the number of freeway access ramps within a 1-mile drive distance of a proposed new store location to use as a measure of store accessibility.

Illustration

Summarize Nearby tool illustration

Usage

    License:

    To use the drive-time and drive distance measurement options, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, credits are debited from your subscription based on the service used and the results returned from the service. The Credits page provides details about credits.

  • You can specify multiple distances and each distance value will result in one area generated around each input feature. For example, if you specify two distances, each input feature will be buffered twice, and the output will contain two areas for that input feature, one for each distance.

  • The Summarize Nearby and Summarize Within tools are conceptually the same. Using the Summarize Nearby tool, you can generate areas around points, lines, or polygons, and summarize features within those derived areas. Using the Summarize Within tool, you can summarize features within existing polygons.

  • You can create groups by specifying a group field from the input points. For example, if you are summarizing crimes within a distance of neighborhood boundaries, you may have a Crime_type attribute with five crime types. Each unique crime type forms a group, and the statistics you choose will be calculated for each unique Crime_type value.

  • Null values are excluded from all statistical calculations. For example, the average of 6, 4, and a null value is 5 ((6+4)/2).

Parameters

LabelExplanationData Type
Input Features

The point, line, or polygon features that will be buffered. Those buffers will be used to summarize the input summary features.

Feature Layer
Input Summary Features

The point, line, or polygon features that will be summarized.

Feature Layer
Output Feature Class

The output polygon feature class containing the buffered input features, attributes of the input features, and new attributes about the number points, length of lines, and area of polygons inside each buffer and statistics about those features.

Feature Class
Distance Measurement

Specifies the distance measurement type that will be used to generate buffer areas. Both driving distance and driving time will use the road network and honor restrictions such as one-way streets. Driving time honors the current posted speed limits.

To use the drive-time and drive-distance measurement options, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, credits are debited from your subscription based on the service used and the results returned from the service. The Credits page provides details about credits.

All distance types except straight-line distance use ArcGIS Online routing and network services.

  • Driving distanceThe distance will be covered in a car or other similar small automobiles, such as pickup trucks. Travel follows all rules that are specific to cars.
  • Driving timeThe distance will be covered within a specified time in a car or other similar small automobiles, such as pickup trucks. Dynamic travel speeds based on traffic are used where it is available when you specify a time of day. Travel follows all rules that are specific to cars.
  • Straight lineA Euclidean or straight-line distance will be used.
  • Trucking distanceThe distance will be covered along designated truck routes. Travel follows all rules for cars as well as rules specific to trucking.
  • Trucking timeThe distance will be covered within a specified time when traveling along designated truck routes. Dynamic travel speeds based on traffic are used where it is available when you specify a time of day. Travel follows all rules for cars as well as rules specific to trucking.
  • Walking distanceThe distance will be covered along paths and roads that allow pedestrian traffic.
  • Walking timeThe distance will be covered within a specified time when walking along paths and roads that allow pedestrian traffic.
String
Distances

Distance values that will define a search distance (for straight-line, driving, trucking, or walking distance) or travel time (for driving, trucking, or walking time). Features that are within (or equal to) the distances you provide will be summarized.

Multiple values can be specified. One area around each input feature will be generated for each distance.

Double
Distance Units
(Optional)

Specifies the unit that will be used for the distance values.

  • MilesThe units will be miles.
  • KilometersThe units will be kilometers.
  • FeetThe units will be feet.
  • YardsThe units will be yards.
  • MetersThe units will be meters.
  • HoursThe units will be hours.
  • MinutesThe units will be minutes.
  • SecondsThe units will be seconds.
String
Time of Day
(Optional)

The date or time when traffic conditions will be considered during travel time. Traffic conditions, especially in urbanized areas, can significantly impact the area covered within a specified travel time. If no date or time is specified, the distance covered during a specified travel time will not be impacted by traffic.

Traffic conditions may be live or typical (historical) based on the date and time specified for this parameter. Esri saves live traffic data for 12 hours and references predictive data extending 12 hours into the future. If the time and date you specify is within the 24-hour time window, live traffic is used. If it is outside the time window, typical or historic traffic is used.

Date
Time Zone
(Optional)

Specifies the time zone that will be used for the specified time of day. Time zones can be specified in local time or coordinated universal time (UTC).

  • GeolocalThe time of day refers to the local time zone or zones in which the input features are located. This option can cause the analysis to have rolling start times across time zones. This is the default.For example, setting a geolocal time of day to 9:00 a.m. causes the drive times for points in the eastern time zone to start at 9:00 a.m. eastern time, and 9:00 a.m. central time for points in the central time zone. (The start times are offset by an hour in real or UTC time.)
  • UTCThe time of day refers to coordinated universal time (UTC). The start times for all points are simultaneous, regardless of time zones.For example, setting a UTC time of day to 9:00 a.m. causes the drive times for points in the eastern time zone to start at 4:00 a.m. eastern time, and 3:00 a.m. central time for points in the central time zone. (The start times are simultaneous.)
String
Keep polygons with no points
(Optional)

Specifies whether all buffers of the input features or only those intersecting or containing at least one input summary feature will be copied to the output feature class.

  • Checked—All buffers will be copied to the output feature class. This is the default.
  • Unchecked—Only buffers that intersect or contain at least one input summary feature will be copied to the output feature class.
Boolean
Summary Fields
(Optional)

A list of attribute field names from the input summary features and statistical summary types that will be calculated for those attribute fields for all points within each input feature buffer.

Summary fields must be numeric. Text and other attribute field types are not supported.

The following statistic types are supported:

  • Sum—The total value of all the points in each buffer will be calculated.
  • Mean—The average of all the points in each buffer will be calculated.
  • Min—The smallest value of all the points in each buffer will be identified.
  • Max—The largest value of all the points in each buffer will be identified.
  • Stddev—The standard deviation of all the points in each buffer will be calculated.

Value Table
Add shape summary attributes
(Optional)

Specifies whether attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer (shape summary attributes) will be added to the output feature class.

  • Checked—Shape summary attributes will be added to the output feature class. This is the default.
  • Unchecked—Shape summary attributes will not be added to the output feature class.
Boolean
Shape Unit
(Optional)

Specifies the unit that will be used when calculating shape summary attributes. If the input summary features are points, no shape unit is necessary, since only the count of points within each input feature buffer is added.

If the input summary features are lines, specify a linear unit. If the input summary features are polygons, specify an areal unit.

  • MetersThe units will be meters.
  • KilometersThe units will be kilometers.
  • FeetThe units will be feet.
  • YardsThe units will be yards.
  • MilesThe units will be miles.
  • AcresThe units will be acres.
  • HectaresThe units will be hectares.
  • Square metersThe units will be square meters.
  • Square kilometersThe units will be square kilometers.
  • Square feetThe units will be square feet.
  • Square yardsThe units will be square yards.
  • Square milesThe units will be square miles.
String
Group Field
(Optional)

The attribute field from the input summary features that will be used for grouping. Features that have the same group field value will be combined and summarized with other features with the same group field value.

When a group field is specified, an additional output grouped table will be created and its location must be specified. The Output Grouped Table parameter is required when using a group field.

Field
Add minority and majority attributes
(Optional)

Specifies whether minority (least dominant) and majority (most dominant) group field values within each input feature buffer will be added to the output. This parameter is active if you specified a Group Field parameter value.

  • Unchecked—Minority and majority fields will not be added to the output. This is the default.
  • Checked—Minority and majority fields will be added to the output.
Boolean
Add group percentages
(Optional)

Specifies whether a percentage attribute field will be added to the output. This parameter allows you to determine the percentage of each attribute value in each group.

This parameter is active if you specified a Group Field parameter value.

  • Unchecked—A percentage attribute field will not be added to the output. This is the default.
  • Checked—A percentage attribute field will be added to the output.
Boolean
Output Grouped Table
(Optional)

An output table that includes summary fields for each group of summary features for each input feature buffer. If a group field is specified, the output grouped table is required.

The table will have the following attribute fields:

  • Join_ID—An ID corresponding to an ID field added to the output feature class
  • The group field
  • A shape summary field such as count of points or length of lines
  • One field for each summary field
  • Percentage field

Table

arcpy.analysis.SummarizeNearby(in_features, in_sum_features, out_feature_class, distance_type, distances, {distance_units}, {time_of_day}, {time_zone}, {keep_all_polygons}, {sum_fields}, {sum_shape}, {shape_unit}, {group_field}, {add_min_maj}, {add_group_percent}, {Output_Grouped_Table})
NameExplanationData Type
in_features

The point, line, or polygon features that will be buffered. Those buffers will be used to summarize the input summary features.

Feature Layer
in_sum_features

The point, line, or polygon features that will be summarized.

Feature Layer
out_feature_class

The output polygon feature class containing the buffered input features, attributes of the input features, and new attributes about the number points, length of lines, and area of polygons inside each buffer and statistics about those features.

Feature Class
distance_type

Specifies the distance measurement type that will be used to generate buffer areas. Both driving distance and driving time will use the road network and honor restrictions such as one-way streets. Driving time honors the current posted speed limits.

To use the drive-time and drive-distance measurement options, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, credits are debited from your subscription based on the service used and the results returned from the service. The Credits page provides details about credits.

All distance types except straight-line distance use ArcGIS Online routing and network services.

  • DRIVING_DISTANCEThe distance will be covered in a car or other similar small automobiles, such as pickup trucks. Travel follows all rules that are specific to cars.
  • DRIVING_TIMEThe distance will be covered within a specified time in a car or other similar small automobiles, such as pickup trucks. Dynamic travel speeds based on traffic are used where it is available when you specify a time of day. Travel follows all rules that are specific to cars.
  • STRAIGHT_LINEA Euclidean or straight-line distance will be used.
  • TRUCKING_DISTANCEThe distance will be covered along designated truck routes. Travel follows all rules for cars as well as rules specific to trucking.
  • TRUCKING_TIMEThe distance will be covered within a specified time when traveling along designated truck routes. Dynamic travel speeds based on traffic are used where it is available when you specify a time of day. Travel follows all rules for cars as well as rules specific to trucking.
  • WALKING_DISTANCEThe distance will be covered along paths and roads that allow pedestrian traffic.
  • WALKING_TIMEThe distance will be covered within a specified time when walking along paths and roads that allow pedestrian traffic.
String
distances
[distance,...]

Distance values that will define a search distance (for straight-line, driving, trucking, or walking distance) or travel time (for driving, trucking, or walking time). Features that are within (or equal to) the distances you provide will be summarized.

Multiple values can be specified. One area around each input feature will be generated for each distance.

Double
distance_units
(Optional)

Specifies the unit that will be used for the distance values.

  • MILESThe units will be miles.
  • KILOMETERSThe units will be kilometers.
  • FEETThe units will be feet.
  • YARDSThe units will be yards.
  • METERSThe units will be meters.
  • HOURSThe units will be hours.
  • MINUTESThe units will be minutes.
  • SECONDSThe units will be seconds.
String
time_of_day
(Optional)

The date or time when traffic conditions will be considered during travel time. Traffic conditions, especially in urbanized areas, can significantly impact the area covered within a specified travel time. If no date or time is specified, the distance covered during a specified travel time will not be impacted by traffic.

Traffic conditions may be live or typical (historical) based on the date and time specified for this parameter. Esri saves live traffic data for 12 hours and references predictive data extending 12 hours into the future. If the time and date you specify is within the 24-hour time window, live traffic is used. If it is outside the time window, typical or historic traffic is used.

Date
time_zone
(Optional)

Specifies the time zone that will be used for the specified time of day. Time zones can be specified in local time or coordinated universal time (UTC).

  • GEOLOCALThe time of day refers to the local time zone or zones in which the input features are located. This option can cause the analysis to have rolling start times across time zones. This is the default.For example, setting a geolocal time of day to 9:00 a.m. causes the drive times for points in the eastern time zone to start at 9:00 a.m. eastern time, and 9:00 a.m. central time for points in the central time zone. (The start times are offset by an hour in real or UTC time.)
  • UTCThe time of day refers to coordinated universal time (UTC). The start times for all points are simultaneous, regardless of time zones.For example, setting a UTC time of day to 9:00 a.m. causes the drive times for points in the eastern time zone to start at 4:00 a.m. eastern time, and 3:00 a.m. central time for points in the central time zone. (The start times are simultaneous.)
String
keep_all_polygons
(Optional)

Specifies whether all buffers of the input features or only those intersecting or containing at least one input summary feature will be copied to the output feature class.

  • KEEP_ALLAll buffers will be copied to the output feature class. This is the default.
  • ONLY_INTERSECTINGOnly buffers that intersect or contain at least one input summary feature will be copied to the output feature class.
Boolean
sum_fields
[[summary_field, statistic_type],...]
(Optional)

A list of attribute field names from the input summary features and statistical summary types that will be calculated for those attribute fields for all points within each input feature buffer.

Summary fields must be numeric. Text and other attribute field types are not supported.

The following statistic types are supported:

  • Sum—The total value of all the points in each buffer will be calculated.
  • Mean—The average of all the points in each buffer will be calculated.
  • Min—The smallest value of all the points in each buffer will be identified.
  • Max—The largest value of all the points in each buffer will be identified.
  • Stddev—The standard deviation of all the points in each buffer will be calculated.

Value Table
sum_shape
(Optional)

Specifies whether attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer (shape summary attributes) will be added to the output feature class.

  • ADD_SHAPE_SUMShape summary attributes will be added to the output feature class. This is the default.
  • NO_SHAPE_SUMShape summary attributes will not be added to the output feature class.
Boolean
shape_unit
(Optional)

Specifies the unit that will be used when calculating shape summary attributes. If the input summary features are points, no shape unit is necessary, since only the count of points within each input feature buffer is added.

If the input summary features are lines, specify a linear unit. If the input summary features are polygons, specify an areal unit.

  • METERSThe units will be meters.
  • KILOMETERSThe units will be kilometers.
  • FEETThe units will be feet.
  • YARDSThe units will be yards.
  • MILESThe units will be miles.
  • ACRESThe units will be acres.
  • HECTARESThe units will be hectares.
  • SQUAREMETERSThe units will be square meters.
  • SQUAREKILOMETERSThe units will be square kilometers.
  • SQUAREFEETThe units will be square feet.
  • SQUAREYARDSThe units will be square yards.
  • SQUAREMILESThe units will be square miles.
String
group_field
(Optional)

The attribute field from the input summary features that will be used for grouping. Features that have the same group field value will be combined and summarized with other features with the same group field value.

When a group field is specified, an additional output grouped table will be created and its location must be specified in the out_grouped_table parameter.

Field
add_min_maj
(Optional)

Specifies whether minority (least dominant) and majority (most dominant) group field values within each input feature buffer will be added to the output. This parameter is enabled if you specified a group_field parameter value.

  • NO_MIN_MAJMinority and majority fields will not be added to the output. This is the default.
  • ADD_MIN_MAJMinority and majority fields will be added to the output.
Boolean
add_group_percent
(Optional)

Specifies whether a percentage of each attribute value in each group will be added to the output. This parameter allows you to determine the percentage of each attribute value in each group.

This parameter is enabled if you specified a group_field parameter value.

  • NO_PERCENTA percentage attribute field will not be added to the output. This is the default.
  • ADD_PERCENTA percentage attribute field will be added to the output.
Boolean
Output_Grouped_Table
(Optional)

An output table that includes summary fields for each group of summary features for each input feature buffer. If a group field is specified, the output grouped table is required.

The table will have the following attribute fields:

  • Join_ID—An ID corresponding to an ID field added to the output feature class
  • The group field
  • A shape summary field such as count of points or length of lines
  • One field for each summary field
  • Percentage field

Table

Code sample

SummarizeNearby example 1 (Python window)

The following Python window script demonstrates how to use the SummarizeNearby function.

import arcpy
arcpy.env.workspace = "C:/data/city.gdb"
arcpy.analysis.SummarizeNearby("new_store_location", "census_blocks", 
                               "new_store_population", "STRAIGHT_LINE", "1;2", 
                               "Miles", "", "", "KEEP_ALL", "Pop2014 SUM")
SummarizeNearby example 2 (stand-alone script)

The following stand-alone script is an example of how to use the SummarizeNearby function in a scripting environment.

# Description: Use SummarizeNearby to summarize population

# import system modules 
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data/city.gdb"

# Set local variables
newStore = "new_store_location"
censusInfo = "census_blocks"
outFeatureClass = "crimes_aggregated"
distanceType = "TRAVEL_TIME"
distance = "10;20"
distanceUnit = "Minutes"
time = "10/15/2014 2:14:19 PM"
timeZone = "GEOLOCAL"
keepPolys = True
sumFields = [["Pop2010", "Sum"],["OWNERS", "Sum"]]
addShapeSum = True

arcpy.analysis.SummarizeNearby(newStore, censusInfo, outFeatureClass, 
                               distanceType, distance, distanceUnit,
                               time, timeZone, keepPolys, sumFields,
                               addShapeSum)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics