Overview

You will learn: how to use the Map Viewer analysis tools to find and extract features.

ArcGIS Online includes a powerful set of tools for analyzing and managing data. When preparing data for an application, a common task is to extract a subset of data from a larger dataset using a spatial query. For example, you might want to define a SQL query to extract features by attribute value or a spatial query to extract features that intersect. Using the Map Viewer you can use the Derive New Locations and Find Existing Locations spatial analysis tools to perform these types of operations. Both tools require an expression that contains one or more attributes or spatial queries to filter the data. The result of the operation is a new hosted feature layer that contains a subset of the original data.

In this lab you will use the Find Locations tools to extract a subset of data from the Trails and the USA Zip Codes layers for the Santa Monica Mountains 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.

Find and extract data with an attribute query

Use the Derive New Locations tool to create a new layer that just contains the Backbone trails.

  1. In the top bar, click Analysis.

  2. In the panel, click Find Locations > Derive New Locations and select the following:

    • 1. Click ADD EXPRESSION (green button) and select:
      • Trails
      • where (attribute query)
      • Name
      • contains
      • Backbone
      • Click ADD
    • 2. Change the result layer name to: Backbone Trail.
    • Click Run Analysis to create the layer.
  3. Uncheck all of the other layers so just the new Backbone Trail layer is visible.

Add the USA Zip Code layer

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

    • Find: USA Zip Code Boundaries 2016
    • In: Living Atlas Layers
    • Click United States ZIP Code Boundaries 2016 > Add > Done Adding Layers.
  2. In Contents, click United States ZIP Code Boundaries 2016 > ... > Move Down to move the layer under Backbone Trail.

Find and extract data with a spatial query

Use the Find Existing Locations tool to create a new layer that only contains the zip codes that are within 3 miles from the Backbone Trail.

  1. In the top bar, click Analysis.

  2. In the panel, click Find Locations > Find Existing Locations and select the following:

    • 1. United States ZIP Code Boundaries 2016
    • 2. Click ADD EXPRESSION (green button) and select:
      • United States ZIP Code Boundaries 2016
      • within a distance of
      • 3 Miles from
      • Backbone Trail
      • Click ADD
    • 3. Change the result layer name to: Zip Codes.
    • Click Run Analysis to create the layer.
  3. Move the Zip Codes layer below the Backbone Trail layer.

  4. Uncheck United States ZIP Code Boundaries 2016 layer so the new layer is more visible.

Style the layer

Improve the visualization for the new Zip Codes layer by classifying it by populuation.

  1. Click Zip Codes > Change Style and select the following:

    • 1. POP2016
    • 2. Select Counts and Amounts (Color)
    • Click Options to change the colors to a different color ramp (optional).
    • Click Done.
  2. In Contents, click Show Map Legend.

  3. Click on the map to explore the lowest and highest populations in zip code areas near the trail.

  4. Save the map.

Congratulations, you're done!

Your web map should look something like this.

Challenge

Extract data using 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 extract a subset of the Trailheads data. The polygon should represent an area that overlaps with the Trailheads you would like to extract.

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

Create a new Map Notes graphic

  1. Click + Add > Add Map Notes > Create to create a new Map Notes layer.

  2. In Add Features > Map Notes - Areas select Area.

  3. Find the Mahou Riviera peninsula and click on the map to draw a polygon that encompasses some trailheads.

  4. Click Close to save the graphic and Edit at top to stop editing.

Find and extract intersecting trailheads with the graphic

  1. In the top bar, click Perform Analysis.

  2. Click Find Locations > Find Existing Locations and select the following:

    • 1. Trailheads
    • 2. Click ADD EXPRESSION (green button) and select:
      • Trailheads
      • intersects
      • Map Notes (Areas)
    • Click ADD
    • 3. Change the result layer name to: Mahou Riviera Trailheads.
    • Click Run Analysis to create the layer.

This should create a new layer that contains the Trailheads that fall inside of the Map Notes polygon graphic.