ArcGIS Living Atlas

Pump up Your Pop-ups With Arcade FeatureSets and Living Atlas (Part 2)

Part 1 of this blog introduced how to enhance your pop-ups using Living Atlas content and the Arcade FeatureSet() function. This technique allows you to bring a layer from ArcGIS Living Atlas of the World into your map, and then access data from that layer within your own layer’s popup. With the October 2019 release of ArcGIS Online, the new FeatureSetByPortalItem() function allows you to pull in data from another layer without needing to add the layer to your map. This reduces the clutter in your table of contents for a slick mapping experience.

In the last blog, we saw the following example:

This map pulls data from two Living Atlas layers but only displays one within the map.

This map uses the FeatureSet() function to pull data from two Living Atlas American Community Survey layers to learn more about the population within the Census Tracts where crimes occurred in Spokane, WA. The two demographic facts are pulled from two layers, but only the ACS Poverty Status Variables – Boundaries – Tracts layer is being shown in the map. With the new FeatureSetByPortalItem() function, the ACS Population Variables – Boundaries – Tract layer can be removed from the map, cleaning up the table of contents.

With this new method, the legend only contains the layers being shown in the map, yet it still accesses the same data for the pop-up:

The FeatureSetByPortalItem function within arcade allows you to use data from another layer without bringing it into your map.

The Arcade expression for this map uses FeatureSetByPortalItem() instead of FeatureSet(), which would look like this:

var pop = FeatureSetByPortalItem(Portal(“https://www.arcgis.com”), “f430d25bf03744edbb1579e18c4bf6b8”, 2);

To use this function, there are a few things you’ll need from the Living Atlas layer (or whatever layer you choose to use):

This gif shows how to find the item ID and layer ID:

Get the item ID from the item page and the layer ID from the REST endpoint

Let’s see some additional examples of this function being used.

The map below shows insured rental housing properties as recorded by the U.S. Department of Housing and Urban Development (HUD). The map highlights multifamily properties with five or more dwelling units that were built with HUD funding. To add context, the map uses information from a few of the current year ACS layers in order to provide more information about the median household income for the census tract and county where each rental property exists.

This map utilizes two Living Atlas layers, but you only see the HUD layer in the table of contents. It also accesses the geometries because a geometry function is used to determine which tract the property falls within. To speed up the query, the expression also only calls to the attribute used within the pop-up.

Another way to utilize this powerful function is to pull related data into a pop-up in order to communicate the significance of a local data value. The map below shows renter rates by census tract, but uses the county value to create a comparison. All of the data comes from this housing layer from the Living Atlas which contains the state, county, and tract geography levels. The county’s rank within the state is also calculated. But notice that table of contents only includes the tract geography. Go into the pop-up configuration to see how the county value was brought into the map and ranked:

A world of data at your fingertips

A few tips when using this function:

This new Arcade function allows you to access data from any public ArcGIS Online hosted service item, and opens the door to some incredible pop-ups.

About the author

I am a Senior Product Engineer on the Living Atlas team at Esri. I work to create clear and concise stories about demographic, socioeconomic, and policy topics using cartography. I also build data layers and tutorials to help others create their own map masterpieces.

Connect:
0 Comments
Inline Feedbacks
View all comments

Next Article

What's new in ArcGIS StoryMaps (March 2024)

Read this article