Average home value by census block in San Francisco.
Combine analyses allow you to merge, overlay, and join multiple sources of feature data to create new feature data. In most cases, the input feature collections or layers need to contain the same type of geometry.
In this tutorial, you use the Dissovle boundaries, Overlay layers, or Join features operations to find a range of average home values within 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:
Creating a feature layer containing census blocks for San Francisco.
Appending (joining) housing information to the census block feature layer.
Creating a new feature layer of census blocks with neighborhood information.
Styling the feature data based on average home value.
Prerequisites
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:
San Francisco Neighborhoods
San Francisco Housing Data
Click Save > Save As > Save Map to save a copy.
Create a city boundary layer
When performing an analysis, it is often useful to have a study area layer that you can use to clip features from other layers. Use the Dissolve Boundaries operation on the San Francisco Neighborhoods layer to remove neighborhood attributes and boundaries. The operation will create a single area containing all neighborhoods, excluding Treasure Island and Yerba Buena Island.
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
In the top bar, click Analysis > Manage Data > Dissolve Boundaries.
Set the following parameters:
1. Choose an area layer whose boundaries will be dissolved: SF Neighborhoods.
2. Choose dissolve method : Areas that overlap or are adjacent.
Set the Result layer name to: San Francisco Boundary.
Click Show credits. The analysis will consume USD $0.0092 (.092 credits).
Click Run Analysis.
Provide an ArcGIS Identity to access the spatial analysis service.
Define the parameters of the request.
Execute the operation. Note: This is a long transaction managed with a job request.
Handle the results.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
The resulting layer is a boundary of the city without any neighborhood attributes.
Get the census blocks feature layer
Census blocks are statistical areas bounded by roads, property lines, and can correspond to city blocks. The blocks will provide a more detailed view of the distribution of home values in San Francisco. Retrieve the U.S. Census Blocks feature layer from Living Atlas to use in the tutorial.
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
In the top bar, click Add > Browse Living Atlas Layers and type the following: U.S. Census Blocks, published by Esri_US_Federal_Data.
Select the layer > Add to Map.
Click on the features to display a popup and familiarize yourself with its attributes.
For each block, you should see the block number and its area for both land and water in square meters.
Provide an ArcGIS Identity to access the spatial analysis service.
Define the parameters of the request.
Execute the operation. Note: This is a long transaction managed with a job request.
Handle the results.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
The U.S. Census Blocks hosted layer contains over eight million features. To limit these features to only those within San Francisco, use the Overlay layers operation.
The analysis creates new feature data based upon the input layer (from which you wish to extract features), the overlay layer (defining the area to extract), and a specified overlay operation: intersect, union, or erase. For this overlay analysis, you use the intersect method.
It is possible to use the union method to combine census blocks with the boundary layer. With this method, the resulting layer contains all features from both layers. For instance, all census blocks both within and outside of the boundary layer. The union method is only applicable with feature layers that contain polygons.
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
In the top bar, click Analysis > Manage Data > Overlay layers.
Set the following parameters:
Choose input layer: U.S. Census Blocks.
Choose overlay layer: San Francisco Boundary.
Choose overlay method: Intersect.
Output: Areas.
Result layer name: Census blocks in San Francisco.
Check Use current map extent.
Click Show credits. The analysis will consume approximately USD $.7 (7 credits).
Click Run Analysis.
Provide an ArcGIS Identity to access the spatial analysis service.
Define the parameters of the request.
Execute the operation. Note: This is a long transaction managed with a job request.
Handle the results.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
The overlay analysis returns feature data containing the census blocks within the boundary of San Francisco you created.
Join housing attributes to census blocks
The census blocks do not contain any attributes with home value data in San Francisco. However, the San Francisco Housing hosted feature layer does. To add housing attributes to the Census blocks within San Francisco hosted feature layer, use the Join Features operation. The operation joins the attributes from the layers based on their spatial relationship.
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
In the top bar, click Analysis > Summarize Data > Join Features.
Set the following parameters:
Choose target layer: Census blocks within San Francisco.
Choose layer to join to target layer: San Francisco Housing.
Click Choose a spatial relationship.
Select Intersects from the dropdown.
Select Join one to one.
Set the Result layer name to: Census blocks with data.
In the top bar, click Bookmarks > and choose Study Area to set map extent.
Check 'Use current map extent`.
Click Show credits. The analysis will consume approximately USD $.11 (11 credits).
Click Run Analysis.
Provide an ArcGIS Identity to access the spatial analysis service.
Define the parameters of the request.
Execute the operation. Note: This is a long transaction managed with a job request.
Handle the results.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
The resulting layer contains demographic information for each block, including the average home value.
Add neighborhood names
Steps to use the Map ViewerSteps to use ArcGIS Python, REST JS, and REST APIs
Find census blocks within neighborhoods
The Census blocks with data feature layer contains all census blocks within the San Francisco boundary along with relevant housing attributes. But, the features within the layer do not contain the neighborhood name corresponding to each census block. Use the Overlay layers operation to create new feature data that contain housing and neighborhood attributes.
In the top bar, click Analysis > Manage Data > Overlay layers.
Set the following parameters:
Choose input layer: San Francisco Neighborhoods.
Choose overlay layer: Census blocks with data.
Choose overlay method: Intersect.
Output: Areas.
Result layer name: Census blocks with neighborhood names.
Click Show credits. The analysis will consume approximately USD $0.6 (6 credits).
Click Run Analysis.
Click on a feature to see the neighborhood associated with each census block.
Style the layer
The Census blocks within neighborhoods layer contains the neighborhood name, average home value, its block group, and its block. The default style is set to display only the block locations. To make the feature layer styles more meaningful, use the renderer to show the range of average home values in the city.
In Content, select Census blocks with neighborhood names > Change Style.
Choose Average home value
Select Counts and Amounts (Color) > Options .
Check Classify Data > Manual Break with 5 classes. The Manual Break setting allows you to exclude homes with a value of 0 (outliers) when styling the map.
Click on the scale to set the class breaks based on value. For example, set the lowest value to 200,000 and the highest value to 2,250,000.
Click Symbols to select a yellow to red color ramp. Click Ok when done.
Click OK > Done to set the class breaks and styling.
In the top bar click Save to save your web map.
Find census blocks within neighborhoods
Provide an ArcGIS Identity to access the spatial analysis service.
Define the parameters of the request.
Execute the operation. Note: This is a long transaction managed with a job request.
Handle the results.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS