Learn how to aggregate and summarize features from feature data.
Summarize data analyses: counts of reported graffiti and median center of reports by type.
A summarize analysis finds which features in a layer are near or within features in another layer. It also calculates statistics such as the number of features that are in or near another layer.
In this tutorial, you use the Aggregate Points and Summarize Center and Dispersion operations to find the areas with the most incident reports about graffiti in San Francisco. You can perform the combine analyses either in Map Viewer or programmatically using the ArcGIS Python, ArcGIS REST JS, and ArcGIS REST APIs.
The analyses include:
Counting the number of calls concerning graffiti by census blocks.
Finding the median centers for incidents grouped by reported offensive and non-offensive graffiti.
Prerequisites
Steps
Copy the web map
The tutorial web map contains predefined layers to use as the starting point for the analyses outlined in the steps below.
Verify that you have the following layers by toggling the visibility on and off:
Graffiti cases within San Francisco
Census blocks in three neighborhoods SF
Click Save > Save As > Save Map to save a copy.
Count reported incidents of graffiti within census blocks
The Census blocks in three neighborhoods SF hosted feature layer displays the census blocks for the Inner Mission, Hayes Valley, and South of Market neighborhoods. The Graffiti cases within SF hosted layer contains approximately 5,700 features representing reports on various incidents of graffiti within the area. Use the Aggregate Points operation to find the census blocks with the highest count of reported incidents of graffiti.
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
In the top bar click Analysis > Summarize data > Aggregate Points.
Set the following parameters:
1.Graffiti cases within San Francisco.
2.Census blocks in three neighborhoods SF.
Uncheck Keep areas with no points.
Set the Result layer name to: Graffiti incidents within census blocks.
Click Show credits. The analysis will consume approximately USD $2.10 (21 credits).
Click Run Analysis.
Click on the census blocks to view the Count of Points attribute in the popup.
Style the census blocks
You can change the renderer style to make it easier to visualize which census blocks have the highest number of reported incidents.
Select the Graffiti incidents within census blocks layer > Change Style.
In Counts and Amounts (Color), click Options.
Click Symbols to select a blue to purple color ramp. Click OK when done.
The aggregated incidents within census blocks should look something like this.
Find the median centers of graffiti reports by type
The Graffiti incidents within San Francisco layer is styled based on report type. To find the median center and ellipses of reports based on their type, use the Summarize Center and Dispersion operation. You use the median center and ellipses of reports because the data are not distributed evenly. Ellipses summarize the central tendency, dispersion, and directional trends of data sized for one standard deviation and will help contextualize the median centers.
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
In the top bar click Analysis > Summarize Data > Summarize Center and Dispersion.
Set the following parameters:
1.Graffiti incidents within San Francisco.
2. Select Median Center and Ellipse. Keep the 1SD (one standard deviation) setting.
3.None.
4.Offensive/Non-Offensive
Set the Result layer name to: Median centers of incidents by type.
Click Show credits. The analysis will consume approximately USD $0.30 (3 credits).
Click Run Analysis.
Click on the resulting features and view the popup.
Style median centers
You can change the renderer style to make it easier to visualize the dispersion and center for the types of reports.
Select the Median centers of incidents by type layer > Change style.
Change Show location only to Type.
Select Types (Unique symbols). If you want to change the style, click Options > Symbols and choose red for Offensive, orange for Non-Offensive, and gray for Other.
When you are done changing the color scheme, click Ok > Ok > Done.
Style ellipses
Select the Ellipse1SD layer > Change style.
Change Show location only to Graffiti type.
In Types (Unique symbols), click Options > Symbols.
Click Fill. Set the Transparency to about 75%.
Click Outline. Select an outline color that matches the color scheme you chose for the Median centers of incidents by type layer.
The values of these features represent the median centers of the type of graffiti: offensive, non-offensive, or other. You should also see the ellipses that summarize the dispersion within one standard deviation for each category.
What's next?
You performed two types of summarize analyses. You aggregated points within census blocks and found the median centers of reported incidents categorized by the type of graffiti. Your web map should look something like this.