Overview

You will learn: how to use the Map Viewer analysis tools to calculate the total number of points, line length, and polyon area in a layer.

ArcGIS Online includes a powerful set of tools for performing spatial analyses and calculating spatial statistics. A common operation in spatial statistics is summarizing geometry information in order to help generalize data and to better understand the spatial relationship between features. For example, you may want to count the number of point features inside a polygon, determine the total length of lines in a polygon, or calculate the total area in a polygon. These operations can be accomplished in the Map Viewer with the Summarize Data tools. These tools require an input layer (points, lines or polygons) and a polygon layer that is used to the summarize the data. The result of these operations is a new hosted feature layer that contains the original data plus the summarized information such as "Count of Points" or "Summarized Length in Miles".

In this lab you will use the Summarize Data tools to determine how many trailheads, the total length of trails, and the total amount of open space in each zip code in the Santa Monica Mountain area.

Steps

Create a copy of the web map

  1. Go to the LA Parks and Trails Map web map and click Sign In.

  2. Click Save > Save As > Save Map to save a copy.

Add the USA Zip Code layer

  1. In the top bar, click + Add > Search for Layers:

    • Find: USA Zip Codes
    • In: ArcGIS Online
    • Click USA ZIP Codes (2016) > Add > Done Adding Layers.
  2. In the TOC, click USA ZIP Codes (2016) > ... > Move Down (or drag) to move the layer under Parks and Open Spaces.

  3. Uncheck all of the checkboxes to make the layers invisible.

Calculate the number of points in polygons

Use the Aggregate Points tool to calculate how many trailheads are in each zip code polygon.

  1. In the top bar, click Analysis.

  2. In the panel, click Summarize Data > Aggregate Points and select the following:

    • 1. Click Trailsheads
    • 2. Click USA ZIP Codes (2016)
      • Uncheck Keep areas with no points
    • 5. Change the layer name to: Trailheads in Zip Codes
    • Click Run Analysis to create the layer.
  3. In the map, click on some features and view the Count of Points values for each zip code area.

  4. In Contents, uncheck the layer to make it invisible.

Calculate the length of lines in polygons

Use the Summarize Within tool to calculate how many miles of trails are in each zip code polygon.

  1. In the top bar, click Analysis.

  2. In the panel, click Summarize Data > Summarize Within and select the following:

    • 1. Click USA ZIP Codes (2016)
    • 2. Click Trails
    • 5. Change the layer name to: Trails in Zip Codes
    • Click Run Analysis to create the layer.
  3. In Contents, click Trails in Zip Codes > Filter and set the following:

    • Summarized length in Miles
    • is greater than
    • 0
    • Click Apply Filter
  4. In the map, click on some features and view the Summarized length in Miles values for each zip code area.

  5. In Contents, uncheck the layer to make it invisible.

Calculate the area of polygons in polygons

Use the Summarize Within tool to calculate the total area of each open space type in each zip code polygon.

  1. In the top bar, click Analysis.

  2. In the panel, click Summarize Data > Summarize Within and select the following:

    • 1. Click USA ZIP Codes (2016)
    • 2. Click Parks and Open Space
    • 4. Click Type and check Add percentages
    • 5. Change the layer name to: Type of Open Space in Zip Codes
    • Click Run Analysis to create the layer.
  3. Click Type of Open Space in Zip Codes > Filter and set the following:

    • Summarized area in Square Miles
    • is greater than
    • 0
    • Click Apply Filter
  4. In the map, click on some features and view the Summarized area in Square Miles values for each zip code area. Be sure to view the graph and Type values in the pop-up.

Congratulations, you're done!

Your web map should look something like this.

Challenge

Summarize data for a Map Notes graphic

Use the Map Viewer to create a Map Notes layer and manually draw a polygon graphic that can be used to summarize data. The polygon should represent an area that overlaps the features that you would like to calculate the totals for. Use the Aggregate Points and Summarize Within tools to execute the summary operation for the appropriate layer.

Learn more about how to create Map Notes and graphics in the Draw graphics lab.

Calculate points in squares and hexbins

Use the Aggregate Points to calculate the number of points using a one mile hexagon and one mile square grid. Learn more about the grid parameters here.