Skip To Content

Summarize Nearby

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 (within 5 kilometers). Drive-time and drive distance measurements require that you are logged in to an ArcGIS Online organizational account with Network Analysis privileges, and they consume credits.

Example scenarios using Summarize Nearby:

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

Illustration

Summarize nearby

Usage

    License:

    To use the drive-time and drive distance measurement options you must be logged in to an ArcGIS Online organizational account with Network Analysis privileges. 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. The ArcGIS Online service credits page provides details about service 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 Within and Summarize Nearby tools are conceptually the same. With the Summarize Within tool you can summarize features within existing polygons, whereas with the Summarize Nearby tool you can generate areas around points, lines, or polygons, and summarize features within those derived areas.

  • 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 an attribute Crime_type with five different crime types. Each unique crime type forms a group, and the statistics you choose will be calculated for each unique value of Crime_type.

Syntax

SummarizeNearby_analysis (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})
ParameterExplanationData Type
in_features

The point, line, or polygon features that will be buffered and those buffers 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, the 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

Defines what kind of distance measurement to use in generating buffer areas around the input features. Both driving distance and driving time use the road network and honor such restrictions 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 logged in to an ArcGIS Online organizational account with Network Analysis privileges. 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. The ArcGIS Online service credits page provides details about service credits.

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

  • DRIVING_DISTANCEThe distance 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 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_LINEEuclidean or straight-line distance.
  • TRUCKING_DISTANCEThe distance covered along designated truck routes. Travel follows all rules for cars as well as rules specific to trucking.
  • TRUCKING_TIMEThe distance 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 covered along paths and roads that allow pedestrian traffic.
  • WALKING_TIMEThe distance covered within a specified time when walking along paths and roads that allow pedestrian traffic.
String
distances
[distance,...]

Distance values 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 enter will be summarized.

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

Double
distance_units
(Optional)

The units of the distance values.

  • MILESMiles
  • KILOMETERSKilometers
  • FEETFeet
  • YARDSYards
  • METERSMeters
  • HOURSHours
  • MINUTESMinutes
  • SECONDSSeconds
String
time_of_day
(Optional)

Specify whether travel times should consider traffic conditions. 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)

The time zone 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)

Determines if 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 you want to calculate 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.

Statistic types include the following:

  • Sum—Adds the total value of all the points in each buffer.
  • Mean—Calculates the average of all the points in each buffer.
  • Min—Finds the smallest value of all the points in each buffer.
  • Max—Finds the largest value of all the points in each buffer.
  • Stddev—Finds the standard deviation of all the points in each buffer.

Value Table
sum_shape
(Optional)

Determines if the output feature class will contain attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer.

  • ADD_SHAPE_SUMAdd shape summary attributes to the output feature class. This is the default.
  • NO_SHAPE_SUMDo not add shape summary attributes to the output feature class.
Boolean
shape_unit
(Optional)

The unit in which to calculate shape summary attributes. If the input summary features are points, no shape unit is used, 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.

  • METERSMeters
  • KILOMETERSKilometers
  • FEETFeet
  • YARDSYards
  • MILESMiles
  • ACRESAcres
  • HECTARESHectares
  • SQUAREMETERSSquare meters
  • SQUAREKILOMETERSSquare kilometers
  • SQUAREFEETSquare feet
  • SQUAREYARDSSquare yards
  • SQUAREMILESSquare miles
String
group_field
(Optional)

Attribute field from the input summary features 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 you choose a group field, 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)

This option is only enabled if you have selected a group field. It allows you to determine which group field value is the minority (least dominant) and the majority (most dominant) within each input feature buffer.

  • NO_MIN_MAJDo not add minority and majority fields to the output. This is the default.
  • ADD_MIN_MAJAdd minority and majority fields to the output.
Boolean
add_group_percent
(Optional)

This option is only enabled if you have selected a group field. It allows you to determine the percentage of each attribute value within each group.

  • NO_PERCENTDo not add a percentage attribute field to the output. This is the default.
  • ADD_PERCENTAdd a percentage attribute field to the output.
Boolean
Output_Grouped_Table
(Optional)

If a group field is specified, the output grouped table is required.

An output table that includes summary fields for each group of summary features for each input feature buffer. 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 of the summary fields.
  • 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.SummarizeNearby_analysis("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.SummarizeNearby_analysis(newStore, censusInfo, outFeatureClass, 
                               distanceType, distance, distanceUnit,
                               time, timeZone, keepPolys, sumFields,
                               addShapeSum)

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics