Elevate Your Pop-Ups with Arcade

Elevate Your Pop-Ups with Arcade

Creating an informative map can be challenging, especially when you’re working with large, complex datasets. This blog highlights some examples of how you can use Arcade to build comprehensive, dynamic pop-ups that enhance your web map and help users better understand the data by applying a geographic approach.

What is Arcade?

Arcade is a scripting language that can be used across ArcGIS products and APIs. Expressions are used for calculating new fields, formatting data, and creating dynamic content. Everything happens on-the-fly, so you aren’t changing anything in the underlying data, just enhancing how it is presented.

The following examples outline some basic to advanced expressions, to build a pop-up that enhances and compliments different datasets.

Example: Global Hexagons for Biodiversity and Conservation

The newly released Global Hexagons for Biodiversity and Conservation layers provide a great foundation for illustrating how much pop-ups can enrich the experience of interacting with a map. These layers include over 50 attributes that summarize more than 20 different datasets, combining essential biodiversity and conservation data in one place.

screenshot of global hexagon field list

Formatting

Formatting data is important when displaying information in a pop-up. In the example below, the function is applied to the field “carb_bio” or Carbon Biomass Sum (tonnes/hectare). The output is converted to a text value that allows you to group by thousands and specify significant figures.

screenshot of arcade function

Formatting values for a pop-up adds some clarity beyond the default table of values. Numbers are foundational, but we can do more!

Adding Context with Conditional Logic

Let’s look at the relationship between population and projected land cover vulnerability in 2050. Symbology is a great way to translate numbers into a visual, but with an Arcade expression, we can add narrative context into what we’re seeing.

screenshot of global hexagons, relationship between population and vulnerable land cover

screenshot of arcade expression

The expression above uses a When() function to create conditional statements. If a selected hexagon meets the condition, it will return a descriptive statement instead of a number. This is a useful method to help translate numerical values into something more intuitive for the user. Combining the logic with some HTML, we can return a message in the pop-up that compliments the map’s symbology.

Dynamic Content – Adding a Chart

Another element we can pair with text in a pop-up is a chart. Charts offer an interactive way to tie together the rest of the pop-up content.

screenshot of arcade expression for charts

screenshot of arcade expression for chart element

The examples above using the Global Hexagons layer show how Arcade can help transform raw data values and create a contextual pop-up that summarizes all the data inside the layer. Below is a preview of the foundational pop-up included with the Global Hexagon layers, add it to your own map and check out the Arcade!

screenshot of global hexagon layer with final popup

Explore the map to see these examples in action!

Getting More with Less

When working with layers that have fewer attributes, it can be harder to create informative pop-ups. In the next examples, we’ll use a hexagon layer that includes population data and the min/max/mean values for the probability of presence for black bears.

By using Arcade’s geometry functions, we can contextualize conditions for a selected hexagon to look at the relationship between population and maximum probability of black bear presence.

screenshot of layer popup

screenshot of arcade expression

Bringing in Additional Data

After you’ve pulled everything you can from your current data, you can use Arcade’s FeatureSetByPortalItem() to bring in supplemental data (without needing to add the layer to your map). This is where content in the ArcGIS Living Atlas of the World can provide great value.

For example, to explore black bear presence, we can bring in the USA Parks layer. I can access attributes to create a nice text snippet detailing the number of parks, park types, and the name/size of the largest park intersecting the selected feature.

screenshot of arcade example

Another relevant dataset might be School District Characteristics, which includes attributes like number of schools, students, and teachers.

screenshot of arcade expression and school details

More Than One Way to Visualize

There is often more than one way to accomplish something in Arcade. Whether you’re formatting data, building logic, or adding visuals, Arcade gives you the flexibility to be creative.

For example, instead of using the Media element to define a chart, you can also use HTML to build a more static bar chart.

Check out this map for the examples pulling in content from the Living Atlas.

screenshot of arcade expression with school details chart

Need Help Getting Started?

ArcGIS Arcade Assistant (beta) is a new tool in ArcGIS Online that helps you build Arcade expressions step by step. With built-in guidance, syntax tips, and real-time previews, it makes it easier to create dynamic pop-ups, labels, and more—no advanced coding skills required.

Read more about it in this blog.

Key Takeaways

Arcade can provide the flexibility to create informative maps and user experiences that not only add value to the data you already have, but can extend to additional information that you want to bring in to your map dynamically. These examples were all done in ArcGIS Online, combining different layers without doing any joins or editing in ArcGIS Pro.

Check out the live versions of the maps (Global Hexagons and Black Bears) used in this blog and dive deeper into the Arcade expressions.

Arcade Resources

arcade arcade arcgis living atlas arcgis online pop-up arcgis living atlas arcgis online

Laura Phoebus

Laura is a Product Engineer on ArcGIS Living Atlas of the World's Policy Maps team. She is passionate about climate science, human geography, and can only function with a good cup of coffee (or three).

Stay Informed

Get the best articles every day for FREE. Cancel anytime.