ArcGIS Arcade Fundamentals

Wisconsin Land Information Association
1 Nov 202353:24

Summary

TLDRThe video script details a comprehensive presentation on ArcGIS Arcade, a scripting language for creating custom expressions and calculations within the ArcGIS platform. The presenters, Phil Julian and Gustavo Castro, introduce the audience to the versatility of Arcade across different ArcGIS products, emphasizing its security and lightweight nature. They demonstrate how Arcade can enhance data analysis and visualization through dynamic labeling, pop-up customization, and data manipulation. The script also covers basic syntax, variables, functions, and best practices for using Arcade effectively. The presentation includes a live demo showcasing the practical application of Arcade for improving map readability, pop-up information, and form customization in field maps. The speakers highlight the accessibility of Arcade through various profiles and its ability to synchronize changes across different applications and platforms, making it a powerful tool for GIS professionals.

Takeaways

  • πŸ“ˆ **ArcGIS Arcade Overview**: Arcade is a scripting language for creating custom expressions and calculations within ArcGIS, enhancing data analysis and visualization capabilities.
  • πŸ› οΈ **Flexibility and Portability**: Arcade is versatile and can be used across various ArcGIS products like ArcGIS Pro, ArcGIS Online, and ArcGIS Enterprise, making it a powerful tool for GIS workflows.
  • πŸ”’ **Security**: Arcade ensures security as expressions are operational only within ArcGIS applications and cannot execute outside the platform.
  • βœ… **Customization**: Users can create custom labels, symbols, and pop-ups, as well as perform data manipulations such as filtering, classifying, and calculating field values on the fly.
  • πŸ“š **Syntax and Functions**: Arcade uses a syntax similar to JavaScript, with support for variables, functions, and conditional statements, making it accessible for those with prior coding experience.
  • 🎨 **Data Visualization**: Arcade allows for dynamic visualizations, such as changing symbology based on data values, creating dynamic charts or graphs, and customizing label formatting.
  • πŸ“ **Geometric Functions**: Arcade provides geometric functions to work with spatial data, including calculating the length of lines, area of polygons, and centroids.
  • πŸ“ˆ **Data Manipulation**: Users can perform complex data manipulations without creating new fields or tables, streamlining the process of filtering, classifying, and labeling GIS data.
  • πŸ“ **Labeling**: Arcade enhances labeling in GIS by allowing dynamic and customized labels that respond to changes in data or map settings, leading to clearer and more informative maps.
  • 🌐 **Cross-Platform Use**: Arcade expressions created in one ArcGIS platform can be shared and used across different platforms, ensuring consistency in data representation and analysis.
  • βš™οΈ **Best Practices**: The presentation highlighted best practices for using Arcade, such as keeping expressions simple, organized, and well-commented for readability and efficient performance.

Q & A

  • What is the main purpose of using ArcGIS Arcade?

    -ArcGIS Arcade is used to create custom expressions and calculations within the ArcGIS platform. It allows for dynamic visualizations and data-driven maps to be created, enhancing data analysis and visualization capabilities.

  • Who is the target audience for this presentation?

    -The presentation is aimed at both coders and non-coders who work with the ArcGIS platform and are interested in improving their GIS workflows and data analysis through the use of Arcade.

  • What are some examples of situations where Arcade can improve workflows or data analysis?

    -Arcade can be used to calculate field values, filter data, classify data, create dynamic labels, format pop-up information, and display current map scale or extent, among other things.

  • How is Arcade different from traditional coding?

    -Arcade is a scripting language designed specifically for use within ArcGIS applications. It is portable and lightweight, allowing it to be used across different ArcGIS products and workflows without executing outside of them.

  • What are some basic syntax elements of Arcade expressions?

    -Arcade expressions are enclosed in curly braces and can contain multiple statements separated by semicolons. Variables are defined using the VAR keyword, and functions are used to perform complex calculations or operations.

  • How can Arcade be used for custom labels?

    -Arcade can be used to display complex label information by combining multiple fields, writing custom text based on specific criteria, and creating custom symbols or patterns that better represent the data being visualized.

  • What is the benefit of using Arcade for custom calculations and expressions across multiple ArcGIS products?

    -Custom expressions and calculations created with Arcade can be used across various ArcGIS products and platforms, ensuring consistency and reusability of the expressions, which can improve efficiency and maintain uniformity across different projects.

  • How does Arcade help in data manipulation?

    -Arcade allows users to perform calculations and manipulate data on the fly without the need to create new fields or tables. It can be used for filtering, classifying, and labeling data in new dynamic ways.

  • What are some best practices for working with Arcade expressions?

    -Best practices include keeping expressions simple and efficient to avoid slow map performance, organizing variables and functions for reusability, using comments for readability, and testing labels at different scales and on different devices to ensure legibility.

  • How can Arcade improve data visualization?

    -Arcade can create custom symbology that changes based on data values, generate unique IDs for features, format phone numbers consistently, and calculate complex criteria like the percentage change in population over time, leading to more impactful and informative map visualizations.

  • What resources are available for learning more about ArcGIS Arcade?

    -Resources for learning more about ArcGIS Arcade include official documentation, a playground for experimenting with expressions, ArcGIS blogs for updates, and community forums for discussions and support.

Outlines

00:00

πŸ“ˆ Introduction to ArcGIS Arcade for Dynamic Mapping

The video begins with an introduction by Phil Julian and Gustavo Castro, solution engineers from the Minneapolis office, who apologize for audio disruptions due to a snowstorm. They introduce ArcGIS Arcade as a scripting language for creating custom expressions and calculations within ArcGIS. The presenters clarify that the presentation is aimed at both coders and non-coders, intending to demonstrate how Arcade can enhance GIS workflows and data analysis capabilities. The agenda includes an overview of Arcade, basic syntax, data manipulation, labeling, visualizations, a demo, tips and tricks, and a recap with additional resources.

05:02

🎨 Customizing Labels and Visualizations with Arcade

The speakers discuss how ArcGIS Arcade can be used for custom labels and visualizations. They provide examples of using Arcade expressions for dynamic labeling, creating custom symbols, and adjusting symbology based on data values. The video also covers using Arcade for custom calculations and expressions for data analysis, such as calculating distances between features or creating new attribute values based on complex criteria. Additionally, custom pop-ups and dynamic text elements in layouts are discussed, along with a demonstration of an Arcade expression that converts meters to feet.

10:03

πŸ“ Advanced Arcade Expressions for Data Manipulation

The video delves into advanced uses of Arcade expressions for data manipulation. It shows how to calculate the area of a circle based on its diameter and assign values to variables within an expression. The speakers provide examples of defining variables, using conditional statements, and creating custom pop-ups with images. They also touch on creating custom labels with conditional formatting and changing symbology based on attribute values, emphasizing the flexibility and power of Arcade for data analysis and visualization.

15:04

πŸ”’ Basic Syntax and Variables in Arcade Expressions

The presenters provide a recap of the basic syntax for Arcade expressions, emphasizing the use of curly braces, semicolons for separating statements, and commenting. They explain how variables are defined and used within Arcade, including different types such as string, number, and Boolean. Examples given include calculating population density, creating labels with distance information, and generating labels based on population size. Functions are also introduced as pre-written blocks of code that can perform specific operations and be nested within other functions.

20:04

🧩 Combining Syntax Elements for Complex Arcade Expressions

The video demonstrates how to combine variables and functions to create more complex Arcade expressions. It shows calculations for area conversion and population density, and how to store the results of functions for later use. The script examples given include converting the area of a feature from square meters to square kilometers and calculating the length of a line feature in meters. The concept of using a variable to store the result of one function for use in subsequent calculations is also covered.

25:06

πŸ“Š Data Manipulation and Filtering with Arcade

The speakers explore how Arcade can be used for data manipulation, such as performing calculations on the fly, filtering data, and classifying data. They provide examples of calculating percentages, concatenating field values, converting units of measurement, and using Arcade expressions in definition queries for data filtering. The video also covers multi-criteria filtering and classifying data into categories based on specific criteria, showcasing the versatility of Arcade for enhancing GIS data handling.

30:09

🏷️ Advanced Labeling Techniques with Arcade

The video focuses on advanced labeling techniques with Arcade, allowing for dynamic labels that respond to changes in data or map settings. It covers how to format and style label text based on specific criteria, concatenate values from multiple fields, and create custom labels based on criteria. Examples include using Arcade expressions to determine label visibility based on population size and to adjust text format based on map scale. Best practices for labeling with ArcGIS Arcade are also discussed, emphasizing simplicity, efficiency, and readability.

35:09

🌐 Cross-Platform Benefits and Syntax of ArcGIS Arcade

The speakers discuss the benefits of using ArcGIS Arcade expressions and calculations across multiple ArcGIS products and platforms. They highlight the ability to save and share custom expressions for consistency and the enhancement of data visualizations and analysis. The basic syntax of Arcade expressions is reviewed, including the use of curly braces, semicolons, and variables. The video also provides examples of using Arcade for conditional symbology, dynamic charts or graphs, and creative data display.

40:10

πŸ“š Resources and Documentation for ArcGIS Arcade

The video concludes with a reminder about the availability of ArcGIS Arcade documentation and resources for further learning. It emphasizes the evolving nature of Arcade and the importance of staying updated with the latest changes. The speakers also encourage the audience to explore the ArcGIS blog for the latest updates and to utilize the Arcade editor for an enhanced coding experience. They invite questions and offer assistance, pointing to forums, tutorials, and webinars as valuable resources for learning more about Arcade.

Mindmap

Keywords

πŸ’‘Arcade

Arcade is a scripting language used within the ArcGIS platform to create custom expressions and calculations. It is portable and lightweight, allowing its use across different ArcGIS products and workflows. In the video, Arcade is central to enhancing GIS workflows, data analysis, and creating dynamic visualizations. It is used for tasks such as custom labeling, symbology, and data manipulation.

πŸ’‘ArcGIS

ArcGIS is a geographic information system (GIS) for working with geography-based data. It is the platform where Arcade is utilized to improve workflows and data analysis. The script mentions ArcGIS Pro, ArcGIS Online, and ArcGIS Enterprise as environments where Arcade can be applied to create dynamic and data-driven maps.

πŸ’‘Data Visualization

Data visualization refers to the graphical representation of information and data. In the context of the video, Arcade is used to create dynamic visualizations within ArcGIS, such as changing symbology based on data values, creating dynamic charts or graphs, and enhancing the presentation of GIS data.

πŸ’‘Data Manipulation

Data manipulation involves altering, organizing, or processing data for analysis or other uses. The video discusses how Arcade can be used to perform calculations and manipulate data on the fly, such as calculating field values, filtering data, or classifying data without the need to create new fields or tables.

πŸ’‘Custom Labels

Custom labels are user-defined textual or graphical representations of data that can be added to maps for clarity. The video emphasizes how Arcade can be used to create dynamic and customized labels that respond to changes in data or map settings, enhancing the overall presentation and usefulness of the map.

πŸ’‘Syntax

Syntax refers to the set of rules governing the structure of expressions and statements in a programming language. In the context of the video, learning the basic syntax of Arcade is crucial for writing expressions, using variables, and employing functions to manipulate data and create visualizations within ArcGIS.

πŸ’‘Variables

Variables are used to store and manipulate values within a script or program. In Arcade, variables can be defined and used to hold data that can be referenced and manipulated throughout an expression. The video provides examples of how variables are used in Arcade to store the results of calculations for later use.

πŸ’‘Functions

Functions are pre-written blocks of code that perform specific operations. In Arcade, functions can simplify expressions, reduce repetition, and be nested within other functions. They are used for various purposes, such as rounding numbers, counting features, and manipulating strings, as demonstrated in the video.

πŸ’‘Conditional Statements

Conditional statements are used to perform different actions based on certain conditions. In Arcade, they are essential for creating expressions that change behavior or output depending on the data or user interactions. The video mentions the use of if-else statements to create custom labels and symbology based on feature attribute values.

πŸ’‘Dynamic Content

Dynamic content refers to elements within a digital platform that change or adapt based on user interaction, data changes, or other factors. The video discusses how Arcade enables the creation of dynamic labels, pop-ups, and visualizations that adjust in real-time as data or map settings change.

πŸ’‘GIS Workflows

GIS workflows are the sequences of steps taken to complete a GIS project or task. The video emphasizes how Arcade can be used to improve these workflows by providing custom calculations and expressions that can be used to enhance data analysis, visualization, and overall efficiency in working with geographic information systems.

Highlights

Arcade is a scripting language for creating custom expressions and calculations within ArcGIS, enhancing data analysis and visualization capabilities.

Arcade is portable and lightweight, usable across various ArcGIS products and workflows, including ArcGIS Pro, ArcGIS Online, and ArcGIS Enterprise.

Arcade expressions are secure, operating only within ArcGIS applications and cannot execute outside of it, ensuring data integrity.

Arcade can be used to create dynamic labels, render features, check attribute data, and format data within ArcGIS applications.

The presentation covers basic syntax, data manipulation, labeling, and visualizations using Arcade, providing attendees with a solid understanding of its capabilities.

Arcade expressions can calculate field values, filter data, classify data, and create dynamic labels based on map size or scale.

Custom pop-ups can be created with Arcade expressions to display relevant information based on the feature clicked, enhancing user interaction with the map.

Arcade expressions can format pop-up information visually using charts, images, or graphs to represent data more effectively.

The presentation includes a live demo by Gustavo Castro, showcasing the practical application of Arcade expressions in real-world scenarios.

Arcade supports a variety of functions, including mathematical, text, and geometry functions, which can be combined for complex data manipulation.

Best practices for using Arcade expressions are discussed, emphasizing simplicity, efficiency, and readability for optimal map performance.

Arcade expressions can be saved and shared, promoting consistency in labeling and analysis across multiple projects and teams.

The presentation demonstrates how to use Arcade for advanced labeling techniques, such as conditional formatting and dynamic label adjustments based on real-time data.

Arcade's flexibility allows for custom calculations and expressions to be used in both desktop and web GIS applications, ensuring a consistent workflow.

The ArcGIS Blog is a valuable resource for staying updated with the latest Arcade features and improvements, as showcased in the recent ArcGIS Online update.

Arcade's evolving nature means that new functionalities are continually being added, expanding its capabilities for developers and users alike.

The presentation concludes with an encouragement for attendees to experiment with Arcade across the ArcGIS platform for their mapping endeavors.

Transcripts

play00:00

um today I'm going to be presenting with

play00:02

Gustavo Castro a solution engineer

play00:06

um as myself Phil Julian

play00:08

we are both out of the Minneapolis

play00:10

regional office and we're very sorry we

play00:12

couldn't join you today

play00:15

um if you hear any audio disruptions in

play00:17

the background there's a symphony of

play00:19

snow blowers we just got slammed last

play00:22

night with this storm so I apologize if

play00:25

there's any uh audio issues in the

play00:27

background

play00:28

that being said we'll go ahead and start

play00:32

this presentation so first a disclaimer

play00:36

I am not a coder

play00:39

I utilize arcade in my maps and spend a

play00:43

lot of time kind of working with the

play00:45

documentation and looking for examples

play00:48

to be able to provide

play00:50

um

play00:51

the use of arcade within my um you know

play00:54

efforts within the arcgis platform so if

play00:57

you're in that situation whether you're

play00:59

a coder or a no coder this presentation

play01:03

will hopefully convince you that arcgis

play01:05

arcade is going to allow you to create

play01:08

those Dynamic visualizations and data

play01:11

driven maps that you can use in your

play01:14

everyday cartographic Pursuits

play01:18

in this presentation we're going to

play01:19

explore the ins and outs of arcade and

play01:22

show you how to use it to improve your

play01:23

data analysis and visualization

play01:25

capabilities

play01:27

and by the end of this presentation we

play01:29

hope that you will have a solid

play01:30

understanding of arcade and how it can

play01:32

be used to improve your GIS workflows

play01:34

and data analysis

play01:37

you should have tools and knowledge to

play01:40

that you'll need to start experimenting

play01:42

with arcade expressions in your maps and

play01:44

your analysis

play01:45

and with that we will go ahead and get

play01:48

started

play01:49

um with looking at arcade

play01:52

so taking a quick look at the agenda

play01:54

we're going to begin with an

play01:55

introduction arcade where we're going to

play01:57

explain what arcade is and how it can be

play01:59

used within arcgis

play02:01

we're going to give some examples of

play02:03

situations where arcade can be used to

play02:04

improve workflows or data analysis

play02:07

we're going to cover some basic syntax

play02:09

so this is going to include how to write

play02:12

expressions the use of variables and the

play02:15

use of functions

play02:17

we're going to dive into Data

play02:20

manipulation where we can demonstrate

play02:21

how arcade can be used to manipulate

play02:23

data on the Fly and this can include

play02:25

things like using arcade to calculate

play02:27

field values filter data or classify

play02:31

your data

play02:32

uh we'll talk about labeling and show

play02:34

how arcade can be used to create Dynamic

play02:36

labels in your maps and this can include

play02:39

formatting text adding icons or symbols

play02:42

or changing label placement based on the

play02:44

size or scale of your map

play02:47

we'll talk about visualizations which is

play02:49

going to include how arcade can be used

play02:51

to create dynamic visualizations in your

play02:52

map and this can include changing

play02:54

symbology Based on data values creating

play02:58

Dynamic charts or graphs or creatively

play03:01

displaying your data

play03:02

after that we're going to go ahead and

play03:04

pause take a quick break and Gustavo is

play03:06

going to go ahead and do a demo so you

play03:09

can see some of these topics that we're

play03:11

going to cover in action

play03:13

and then we will see how much time we

play03:15

have remaining we can go over some tips

play03:17

and tricks which is going to provide

play03:18

some of the best practices for working

play03:20

with arcade expressions

play03:22

we're going to talk about what's new and

play03:25

then we will also go ahead and do a

play03:28

quick recap and have some additional

play03:30

resources that you can use to continue

play03:33

learning more about Arcade

play03:36

so with that let's go ahead and begin

play03:37

our introduction

play03:40

so arcgis arcade is a scripting language

play03:43

that creates custom expressions and

play03:45

calculations in arcgis it's portable and

play03:47

lightweight meaning you can use it

play03:49

across different arcgis products and

play03:51

workflows including arcgis Pro arcgis

play03:54

online and rgis Enterprise

play03:56

arcade is secure because Expressions

play03:58

only work within arcgis applications and

play04:01

cannot execute outside of it you can use

play04:03

arcade to create labels render features

play04:05

check attribute data format data and

play04:08

More in arcgis online arcade can be used

play04:11

for custom pop-ups and defining

play04:12

symbology and pro it can be used for

play04:14

creating custom labels symbolizing

play04:16

features and creating custom fields and

play04:18

in Enterprise we can see it used for

play04:20

creation of custom widgets and defining

play04:22

custom visualization expressions

play04:24

so overall RK provides a flexible and

play04:27

portable way to perform custom

play04:29

calculations and expressions Within

play04:30

arcgis

play04:34

so continuing on that subject about how

play04:37

it's used within arcgis let's take a

play04:40

look at custom labels for better

play04:43

visualization so you can use arcade

play04:44

Expressions to display complex label

play04:46

information such as combining multiple

play04:48

Fields writing custom text based on

play04:50

specific criteria

play04:52

you can use arcade Expressions to create

play04:53

custom symbols or patterns that better

play04:55

represent the data being visualized such

play04:57

as different shapes or sizes to

play04:59

represent different categories and you

play05:01

can use arcade Expressions to adjust

play05:03

symbology based on specific data values

play05:05

such as using a gradient fill to show

play05:07

population density

play05:09

we can also use arcade for custom

play05:11

calculations and expressions for data

play05:13

analysis like distances and attribute

play05:15

values

play05:16

so we can use arcade Expressions to

play05:18

calculate distances between features or

play05:21

say find the nearest feature to a given

play05:23

location we can use arcade Expressions

play05:25

to calculate new attributes values based

play05:28

on complex criteria such as creating a

play05:30

new field that categorizes feature based

play05:32

on multiple attributes

play05:35

we can also use it to work with our

play05:37

pop-ups so we can use arcade Expressions

play05:39

to create custom pop-ups that show only

play05:41

relevant information based on the

play05:43

feature that's being clicked such as

play05:44

displaying different fields for

play05:46

different feature types

play05:48

and we can also use arcade Expressions

play05:49

to format pop-up information in a more

play05:51

visually appealing way such as using

play05:54

charts images or graphs to display your

play05:57

data

play05:58

and then we can also use Dynamic text

play06:01

elements in our layouts like dates and

play06:03

map skills

play06:04

so using arcade Expressions we can

play06:07

display the current date or time or we

play06:09

can format dates in a specific way and

play06:12

using arcade Expressions to display the

play06:14

current map scale or extent we're to add

play06:15

custom text elements to a layout based

play06:18

off of specific criteria

play06:21

foreign

play06:24

so let's take a look at some codes

play06:26

we're going to go ahead and start with

play06:28

our first arcade expression and this

play06:32

expression converts the linked attribute

play06:34

of a feature from meters to feet using a

play06:36

conversion factor of the three dot etc

play06:40

etc

play06:41

and this expression uses the dollar sign

play06:44

feature Global variable to retrieve the

play06:47

value of the linked attribute for the

play06:49

current feature

play06:50

it's then going to multiply this value

play06:52

by the conversion factor of 3.2

play06:56

miscellaneous to get that length value

play06:59

in feet and the resulting value is going

play07:01

to be returned by the expression and it

play07:03

will be displayed as the output and we

play07:05

can see here that it's enclosed in curly

play07:07

braces which is used to denote an arcade

play07:10

expression within a larger string

play07:11

expression and the dollar sign is being

play07:13

used to indicate that the expression is

play07:16

referencing an attribute or Global

play07:18

variable

play07:20

um arcade expressions with multiple

play07:22

statements are separated by semicolons

play07:25

so this next arcade expression

play07:26

calculates the area of a circle based

play07:29

off of its given diameter value it's

play07:31

going to first assign the value of

play07:32

diameter attribute from the input

play07:34

feature to a variable called diameter

play07:36

then it's going to calculate the radius

play07:38

of the circle by dividing the diameter

play07:39

by 2 and assigning it a variable called

play07:41

radius next it's going to calculate the

play07:44

area of the circle by multiplying the

play07:46

value of pi by the square of the radius

play07:48

and assigning that to a variable called

play07:50

area and finally it's going to return

play07:52

the value of area variable as a result

play07:55

of the expression which is represented

play07:57

which represents the area of the circle

play08:00

that corresponds to a given diameter

play08:06

our next example is going to look at

play08:09

defining and assigning a valuable value

play08:11

to a variable in an arcade expression

play08:14

first this one's going to declare the

play08:17

constant value value of pi as

play08:19

3.14159 then it's going to assign the

play08:22

value of radius attribute from the input

play08:25

feature to a variable called radius next

play08:28

it's going to calculate the area of the

play08:29

circle by multiplying Pi by the square

play08:31

of the radius and assigns it into a

play08:34

variable called area and finally it's

play08:37

going to return the value of area as a

play08:39

variable as a result of the expression

play08:44

um and then looking at our strings they

play08:46

must be enclosed in quotes

play08:49

um in this last example it's going to

play08:50

Define a variable called label text and

play08:52

assign it

play08:53

the value of a fixed string which is

play08:56

going to be called the value of the

play08:57

field is

play08:59

then it's going to concatenate the value

play09:01

of a specified field denoted by field

play09:04

name using the feature Global variable

play09:06

which is going to retrieve the attribute

play09:07

of the current feature

play09:09

the results of the concatenation is

play09:11

going to be assigned to the label text

play09:13

variable and finally the expression

play09:15

Returns the value of label text as a

play09:18

variable for the feature

play09:22

here we can see a little bit more of a

play09:24

complex example that's going to be

play09:26

creating a custom pop-up that includes a

play09:27

photo and this arcade code is used to

play09:30

generate a pop-up that displays an image

play09:32

for each feature on a map and here's how

play09:34

it works the code starts by declaring

play09:36

two variables image and name the image

play09:38

variable is assigned the value of image

play09:40

URL attribute for the current feature

play09:42

which presumably contains a URL pointing

play09:44

to an image file the name variable is

play09:47

assigned to the value of name

play09:49

attribute for the current feature the

play09:52

code will then create an object that

play09:54

contains two properties title and

play09:56

content the title property is sets the

play09:58

value of the name variable which will be

play10:00

used in the title of the pop-up

play10:02

the content property is in an array that

play10:05

contains a single object and the object

play10:06

has a type property sets in media which

play10:08

indicates that it'll display a piece of

play10:10

media in the pop-up the media info's

play10:12

property is an array that contains a

play10:14

single object and this object has a type

play10:16

property set to image which indicates

play10:18

that it'll display an image the value of

play10:20

the property this object is an object

play10:21

that contains a single property Source

play10:24

URL and the value of this property is

play10:26

set to the value of the image variable

play10:28

which contains the URL the image the

play10:30

current feature

play10:31

so basically what's going on is this

play10:33

arcade code retrieves the URL of an

play10:35

image for each feature in the map it's

play10:37

going to create a pop-up but the

play10:38

feature's name is a title and it's going

play10:40

to display the image

play10:42

in in the pop-up

play10:46

and then we can also look at creating

play10:48

custom labels that use conditional

play10:49

formatting to change font color size

play10:51

based off of features attribute value

play10:54

this code is going to use be used to

play10:56

create custom labels with color-coded

play10:58

symbols based on a threshold value the

play11:01

variables label and value are assigned

play11:04

to the values of the field name and

play11:05

value respectively from the feature

play11:07

being labeled using the feature Global

play11:10

variable the code then initiate

play11:12

initializes the color variable as

play11:14

undefined it's going to then check the

play11:16

value of the value variable against the

play11:18

threshold of 100 using an if else

play11:20

statement and if the value is greater

play11:23

than 100 it's going to set the color

play11:25

variable to Red otherwise it's going to

play11:27

set it to Black

play11:28

finally the code returns an object with

play11:30

the custom label text and the

play11:32

color-coded symbol which is constructed

play11:34

using the color variable and the text

play11:36

property is set to the label variable

play11:38

and the symbol property is set to an

play11:40

object with a color property sets the

play11:43

color variable and this object can be

play11:45

used to customize the symbol of a

play11:46

labeled feature based on the value of

play11:50

its value field

play11:55

we can also create custom Expressions

play11:56

that calculate an area of a polygon so

play11:59

this little snippet here of arcade code

play12:03

is going to calculate the area of a

play12:04

feature and return the value as the

play12:06

output the feature.shape dot area

play12:09

expression retrieves the area of the

play12:11

feature geometry and it is assigned to

play12:14

the area variable the return statement

play12:17

then Returns the value of the area

play12:22

we can also use arcade to create custom

play12:25

symbols that change color based on an

play12:28

attribute value so this arcade code is

play12:31

going to be used to symbolize features

play12:32

in a map based off of a specific value

play12:34

called value

play12:35

the code Begins by creating a variable

play12:37

called value and assigning it the value

play12:39

of the value attribute of the feature

play12:42

being evaluated against the feature

play12:44

Global variable

play12:46

then a variable called color is created

play12:48

without an initial value next an if else

play12:51

statement is used to evaluate the value

play12:54

attribute value and set the color

play12:56

variable accordingly if the value

play12:58

attribute equals load the color variable

play13:01

sets a green

play13:02

if it equals medium the color variable

play13:05

is set to Yellow otherwise if it doesn't

play13:07

match any of those values it's going to

play13:09

be set to red

play13:10

finally the code returns an object with

play13:12

the type simple fill and color value set

play13:16

to the color of color variable that was

play13:18

set in the previous step this object can

play13:21

be used to define the symbol for the

play13:23

feature being evaluated which in this

play13:25

case the symbol is a simple fill with a

play13:27

color that depends on the value of the

play13:29

value attribute

play13:33

so some of the benefits of using arcgis

play13:35

arcade custom expressions and

play13:38

calculations can be used across multiple

play13:40

arcgis products and platforms so that

play13:42

means a custom expression that

play13:43

calculates the distance between say two

play13:45

points can be used in both arcgis Pro

play13:47

and arcgis online web Maps

play13:50

and a custom expression that generates

play13:52

something like a unique ID for each

play13:53

feature can be used in both arcgis Pro

play13:55

and online feature layers

play13:58

custom Expressions can be saved and

play14:00

shared with others so a custom

play14:01

expression that formats phone numbers

play14:03

for example can be saved and shared with

play14:05

other members of a team ensuring

play14:06

consistency and labeling across multiple

play14:08

projects and a custom expression that

play14:11

calculates something like the percentage

play14:13

change in population over time can be

play14:15

shared with other organizations working

play14:16

on demographic analysis

play14:19

arcade can improve data visualizations

play14:21

and Analysis so using arcade to create a

play14:23

custom symbology that changes based on

play14:25

the age of a building can help reveal

play14:26

patterns of Urban Development over time

play14:28

we're using arcade to create a custom

play14:30

calculation that identifies areas with

play14:32

the highest concentration of different

play14:33

land use types can help inform decisions

play14:36

about urban planning and zoning

play14:39

all right so we'll go ahead and jump

play14:41

into basic syntax

play14:43

as mentioned earlier arcade expressions

play14:46

are enclosed to curly braces and can

play14:48

contain one or more statements separated

play14:50

by a semicolon

play14:52

variables can be defined using the VAR

play14:55

keyword and values can be assigned using

play14:57

the equals operator

play14:59

functions can be used in arcade

play15:01

Expressions perform complex calculations

play15:03

or operations and conditional statements

play15:06

can be used in arcade expressions for

play15:08

evaluate a condition and return a value

play15:09

based on the results

play15:15

so a quick recap arcade expressions are

play15:19

enclosed in curly braces

play15:21

um Expressions can contain one or more

play15:23

statements separated by a semicolon and

play15:26

statements can be commented out in both

play15:28

single line or multi-line comments

play15:34

let's jump into variables variables can

play15:37

be used to store it and manipulate

play15:38

values variables are defined using the

play15:40

VAR keyword and assigned using the

play15:42

equals operator and variables can be of

play15:45

various types including string number

play15:47

and Boolean

play15:50

so we have some examples variables in

play15:53

arcade in this first example this code

play15:56

is an arcade expression that calculates

play15:58

the population density of a feature by

play16:00

dividing the value of a field called

play16:01

population by the value of a field

play16:03

called area

play16:04

and for this example if the population

play16:07

attribute of a feature being measured is

play16:10

5000 and area attribute is 100 square

play16:13

kilometers the expression will return a

play16:15

value of 50 indicating that there's a

play16:17

population density of the feature of 50

play16:20

people per square kilometer

play16:22

uh we can also store the results of the

play16:24

function to be used later in the

play16:25

expression so this next code is an

play16:27

arcade expression that calculates the

play16:29

distance between a feature and the near

play16:31

city in a data set and then creates a

play16:33

label with this information

play16:34

for example if the nearest city to the

play16:37

feature being measured is 50 kilometers

play16:40

away the expression would return a label

play16:42

that says distance near City 50

play16:44

kilometers

play16:45

and then storing the results of a

play16:47

calculation to be used for label or

play16:49

tooltip

play16:50

this next bit of code is an arcade

play16:53

expression that creates a label for a

play16:54

feature based off of its population the

play16:56

label includes the name of the feature

play16:59

and a status indicating whether the

play17:01

feature is a large city or a small City

play17:03

and for example if the feature being

play17:06

measured is a city called Springfield

play17:07

with a population of 500 000 the

play17:09

expression would return a label it says

play17:11

Springfield small City

play17:16

so we'll talk about functions next

play17:17

functions are pre-written blocks of code

play17:19

that performs perform specific

play17:21

operations functions can be used to

play17:23

simplify expressions and reduce

play17:25

repetition and functions can be nested

play17:27

within other functions and can accept

play17:29

arguments

play17:32

we can see some functions such as the

play17:34

round function which can be used to

play17:36

round a number to a specified number of

play17:38

decimal places this example will round

play17:41

the population of a feature to two

play17:42

decimal places and divide it by a

play17:44

million we have a count function that

play17:46

can be used to count the number of

play17:47

features that meet a certain condition

play17:49

and this next example will count the

play17:51

number of cities in a data store with a

play17:53

population greater than one million we

play17:55

have a date function that can be used to

play17:57

create a new date

play17:58

from an object string and for example

play18:01

this code will create a date object for

play18:04

February 23rd 2023 and we have an upper

play18:07

function that can be used to convert

play18:09

string to all uppercase this example

play18:11

will convert a city name of a feature to

play18:13

all uppercase letters and the last of

play18:16

these examples which there are many

play18:18

functions available is the concat

play18:20

function which can be used to

play18:21

concatenate strings and this example

play18:23

will concatenate the first and last name

play18:24

of the feature with a space in between

play18:30

we have some text functions that we can

play18:32

take a look at uh once again this is

play18:34

just a few we have a left which returns

play18:37

a specified number of characters from

play18:38

the beginning of the spring of a string

play18:40

we can see from the uh comment that this

play18:43

is going to return hello

play18:45

um we have right which is going to

play18:46

return a specified number of characters

play18:48

from the end of a string and we can see

play18:51

from the comment here this is going to

play18:52

return the world with that exclamation

play18:53

point and we have mid which returns a

play18:56

specified number of characters from a

play18:58

string starting at a specified position

play18:59

and we can see that this is going to

play19:02

return world

play19:05

we have math functions we can see the

play19:08

absolute value of a number from the

play19:11

comments we can see this first one is

play19:12

going to return 5. we have round which

play19:15

is going to round a number to a

play19:17

specified number of decimal places and

play19:19

so this is going to return that simple

play19:21

Pi of 3.14. and we have a floor which is

play19:24

going to round a number down to the

play19:26

nearest integer and we can see this is

play19:27

going to this is going to turn three

play19:29

even though it's a DOT nine

play19:32

and then we have a couple of geometry

play19:33

functions we can look at now we have

play19:35

length which is going to return the

play19:36

length of a line or polyline geometry

play19:40

um we can see that this is going to

play19:42

return to length of line area can return

play19:44

the area of a polygon geometry

play19:47

and then we have the centroid which is

play19:50

going to return the centroid point of a

play19:51

polygon geometry

play19:57

so we can combine syntax elements in our

play20:00

JS arcade so in this this first example

play20:02

we see that we have variables and

play20:04

functions that can be combined to create

play20:05

a more complex expression first the

play20:08

script is going to calculate the area of

play20:09

the feature using the area

play20:12

areas of special variable in arcade that

play20:14

Returns the area of the current feature

play20:16

in square meters the script then divides

play20:18

the area by a million to convert the

play20:20

area from square meters to square

play20:22

kilometers and this is done by dividing

play20:24

the area by 1 million area divided by 1

play20:28

million then resulting value is assigned

play20:31

to the variable area

play20:34

the next script is going to calculate

play20:35

the population density by dividing the

play20:37

population of the feature by the area

play20:39

the population density is assigned to

play20:41

the variable pop density and this is

play20:43

done by dividing the feature.population

play20:45

which is the population of the current

play20:47

feature by area finally the script is

play20:49

going to round the value of Pop density

play20:51

down two places using the round function

play20:55

which is built in to Arcade so that's

play20:57

going to round the number to the

play20:58

specified number of decimal places that

play21:00

you decide the resulting value is going

play21:02

to be returned by the script so the

play21:04

entire script calculates the population

play21:05

density of a feature in square

play21:07

kilometers by dividing the population of

play21:09

its feature by its area in square

play21:11

kilometers then rounding the resulting

play21:13

value down to two decimal places

play21:16

and then we can see in our second one we

play21:18

can use a variable to store the results

play21:20

of a function and then use that variable

play21:22

in subsequent calculations so in this

play21:25

example the length function is used to

play21:27

calculate the length of a line feature

play21:28

and the result is stored in the line

play21:31

length variable

play21:32

the variable is then used to convert the

play21:35

length to meters and round the result to

play21:37

two decimal places using the round

play21:39

function and finally the results is

play21:41

going to be used in a label expression

play21:42

to display the length in meters assuming

play21:45

the feature.shape represents the length

play21:47

of the line feature the value return

play21:48

would be a string that displays the

play21:50

length for the line of meters rounding

play21:52

two decimal places for example if the

play21:55

length of a line is 50 feet the code

play21:57

would convert it to 15.24 and then

play22:00

return the string length 15.24 meters

play22:05

all right in this section we're going to

play22:07

talk about data manipulation so we're

play22:09

going to explore how arcade can be used

play22:10

to perform calculations and manipulate

play22:12

data on the fly without the need to

play22:13

create new fields or tables

play22:15

as we've said before arcade's powerful

play22:17

scripting language that can be used to

play22:19

create custom expressions and

play22:20

calculations for use in maps and data

play22:23

analysis

play22:24

and with arcade you can filter classify

play22:26

and label your data in new Dynamic ways

play22:33

so arcade can be used to calculate

play22:35

fields in our GIS you can use an arcade

play22:37

expression in the field calculator to

play22:39

calculate new values based on existing

play22:41

Fields arcade can be used in labeling

play22:43

Expressions to display calculated values

play22:45

on a map or in pop-up Expressions to

play22:47

display the calculated values for

play22:49

individual features

play22:53

we can see some example of this we can

play22:55

see calculating a percentage based on

play22:57

two Fields this arcade expression

play23:00

calculates the percentage that one field

play23:02

value represents of another field value

play23:04

in the same record we can concatenate

play23:06

values from multiple Fields so this

play23:09

arcade expression concatenates the

play23:10

values of two fields in the same record

play23:12

into a single line

play23:14

you know we can convert units of

play23:16

measurement so this is an example of uh

play23:19

converting meters to feet

play23:23

arcade can be used to filter data in

play23:25

arcgis you can also use rgi arcade

play23:28

expressions and definition queries to

play23:30

filter features based off of specific

play23:32

criteria an arcade can also be used in

play23:35

pop-up Expressions to display only

play23:37

certain attributes for individual

play23:38

features or in a labeling expression the

play23:41

display only certain labels on a map

play23:48

um I'm going to try to go a little bit

play23:49

quicker it'll kind of look at the time I

play23:50

want to make sure Gustavo has enough

play23:51

time for his presentation but we can

play23:54

take a quick look at some examples of

play23:56

arcade Expressions that can be used to

play23:58

filter data in arcgis

play24:00

we can look at this top bit of code here

play24:03

that's going to be an example of arcade

play24:04

Expressions that uses euclidean distance

play24:07

to filter features based off their

play24:09

proximity to a point layer we can

play24:11

display only features with values above

play24:14

or below a certain threshold and this is

play24:16

going to be example of a Boolean

play24:18

expression that uses logical operators

play24:19

to evaluate two conditions in return a

play24:22

Boolean value which would be either true

play24:24

or false

play24:25

um and we can also display you know only

play24:27

features that meet multiple criteria so

play24:30

this is an example of a multi-criteria

play24:32

filter using three fields we have field

play24:34

a field B and field C and the code will

play24:36

return true only if all three conditions

play24:39

are met

play24:42

um we can also classify data using

play24:44

arcgis arcade

play24:47

um we can use arcade expressions in the

play24:49

classify dialog groups uh value value

play24:52

into classes based off of specific

play24:55

criteria

play24:56

an arcade can also be used in labeling

play24:59

Expressions to display values as classes

play25:01

on a map or on a pop-up expression to

play25:04

display values as classes for individual

play25:06

features

play25:08

so this is an example of value

play25:11

classification based on a single field

play25:14

called value field

play25:16

and this code is going to use if else

play25:19

statements to check if the value in the

play25:21

field

play25:22

um

play25:23

and then it's going to return the

play25:24

appropriate category based off of the

play25:26

value

play25:29

we can also classify database off of

play25:32

geographic location so this code

play25:34

calculates the distance between the

play25:36

current feature and the city of Seattle

play25:38

and classifies the feature as Urban

play25:40

Suburban or rural based on the distance

play25:42

and the actual distance classification

play25:44

thresholds and labels can be modified as

play25:47

needed

play25:54

so you can combine multiple data

play25:56

manipulation techniques in arcade to

play25:58

create more complex expressions for

play26:00

example you can use a combination of

play26:02

field calculations and data filtering

play26:03

display only certain values based on

play26:05

calculated criteria and you can also use

play26:08

a combination of data filtering and

play26:10

classification display only certain

play26:11

features within specific value ranges or

play26:14

a combination of classification and

play26:15

field calculations to a group data

play26:18

categories based off of their calculated

play26:21

values

play26:22

and then we're going to jump into

play26:23

labeling with arcade

play26:25

so labeling with arcade is going to

play26:27

allow you to create Dynamic labels to

play26:28

respond to changes in your data or map

play26:30

settings arcade Expressions can be used

play26:33

to customize label placement and

play26:35

formatting giving you greater control

play26:36

over the appearance of your labels

play26:38

and overall arcade provides you know a

play26:41

powerful set of tools for customizing

play26:43

labels allowing you to create clear

play26:45

Dynamic and informative Maps

play26:49

so some of the basics labeling with

play26:51

arcades can allow you to create Dynamic

play26:53

and customized labels for your Maps or

play26:55

GIS and arcade Expressions can be used

play26:57

to format and style label text based off

play27:00

of specific criteria

play27:02

arcade's going to allow you to

play27:03

concatenate values from multiple Fields

play27:05

or add text to labels and it's also

play27:06

going to allow you to create custom

play27:07

labels based off a specific criteria

play27:12

so a couple of examples we can use

play27:14

Expressions to format labels based off a

play27:17

specific criteria

play27:19

um and this expression

play27:22

um the variable declares a variable

play27:25

text formats the number with commas

play27:28

round rounds to the nearest thousand and

play27:31

the K concatenates the K at the end of

play27:32

the label

play27:34

we can concatenate values for multiple

play27:37

Fields or add text to labels in this

play27:40

expression the plus operator

play27:41

concatenates the values from the two

play27:43

fields and this is going to allow you to

play27:46

add text before and after the

play27:48

concatenated values respectively

play27:50

and you can create custom labels based

play27:52

off a specific criteria so in this

play27:54

expression the if statement is going to

play27:56

check if the population is greater than

play27:58

10 000 and if it is it's going to return

play28:00

the value from the name field and if the

play28:03

population is less than or equal to ten

play28:05

thousand it's going to return an empty

play28:07

string effectively hiding the label for

play28:09

those features

play28:11

we can use arcade Expressions to format

play28:13

labels based off specific criteria

play28:15

concatenate values for multiple Fields

play28:18

we're adding text label and create

play28:20

custom labels based off of specific

play28:22

criteria so we just kind of went over

play28:26

um so you can also do some Advanced

play28:28

labeling techniques which is going to

play28:30

allow you to add labels with complex

play28:32

Expressions that combine multiple data

play28:35

manipulation techniques such as

play28:36

conditional formatting and string

play28:38

concatenation apply digital effects such

play28:41

as drop Shadows outlines and Halos to

play28:43

improve legibility and enhance your

play28:45

appearance of your labels dynamically

play28:47

adjust label formatting based on

play28:49

real-time data feeds such as weather

play28:50

traffic conditions to provide more

play28:52

timely and relevant information to the

play28:54

user it's going to allow you to use

play28:55

arcade Expressions to create stack

play28:57

labels which can be useful when

play28:59

displaying multi-part information such

play29:01

as street names and house numbers

play29:05

um this next bit of code is going to

play29:07

show how you can use arcade to determine

play29:10

the current map scale and then set a

play29:13

text format based off of that scale

play29:15

and in the second example we can see

play29:19

that the type attribute of the current

play29:21

feature is checked and then resulting

play29:23

that the text format is set accordingly

play29:29

so some of the best practices for

play29:31

labeling with arcgis arcade you know

play29:34

make sure that your

play29:37

arcade expressions are being used to

play29:39

create Dynamic labels that change Based

play29:41

on data and map scales to keep those

play29:44

visible

play29:45

keep label Expressions simple and

play29:48

efficient to avoid slow map Performance

play29:50

and keep

play29:51

variables and functions organized so you

play29:55

can be able to reuse and label your code

play29:57

and make sure to make use of your

play29:59

comments to make them more readable and

play30:01

understandable

play30:03

keep your labels simple and easy to read

play30:05

with appropriate font sizes and styles

play30:08

keep label Styles consistent and formats

play30:11

similar throughout the map and test

play30:13

labels at different scales and on

play30:15

different devices to ensure that they

play30:16

are legible and well placed

play30:22

so formatting labels based off a

play30:24

specific criteria we use arcade

play30:26

Expressions to create custom labels

play30:27

Based on data values such as combining

play30:29

fields or formatting numbers and dates

play30:33

um in this next example we can see that

play30:37

we can display different labels based

play30:39

off of a field value using the

play30:41

immediative function and in our last

play30:44

example we can see how we can capitalize

play30:46

the first letter of each ward in the

play30:47

label using the proper function

play30:53

um you can concatenate values from

play30:55

multiple fields to add text labels

play30:58

and so we can see this example of

play31:02

creating a full name from separate first

play31:05

and last name fields and using that

play31:08

expression with the

play31:10

um the traditional concatenation or we

play31:13

can use the concatenated function to

play31:15

achieve the same results as you can see

play31:17

in the second version of the script here

play31:22

we can use custom labels based off of

play31:24

specific criteria so we can use if else

play31:26

statements to create conditional labels

play31:28

based off of data values such as

play31:30

displaying yes if a value is true and

play31:32

know if it's false

play31:34

we can use statements to create labels

play31:37

with multiple possible values such as

play31:39

displaying high medium or low based off

play31:41

of a data range

play31:43

for example in this second code here we

play31:47

can see how we display different labels

play31:49

based off the range of values in a pub

play31:51

density field

play31:53

and in this last example we're going to

play31:56

take a look at using labels to create a

play32:00

label for distance field that combines

play32:02

value in kilometers and a value in miles

play32:05

so we can see both of those here used

play32:07

with this arcade expression

play32:11

um last I'm going to try to try to

play32:12

Breeze through this here we got

play32:13

visualizations

play32:15

um Dynamic visualizations and arcade

play32:17

involve using arcade Expressions to

play32:20

create custom Styles and symbols that

play32:22

change dynamically based off of the data

play32:25

values in a layer and this is going to

play32:27

result in more impactful and informative

play32:29

map visualizations

play32:33

and we go ahead and quickly take a few

play32:34

look at a few examples of this

play32:38

so using arcade Expressions

play32:41

we can create conditional symbology

play32:43

based off of data values we can use

play32:46

arcade Expressions to create Dynamic

play32:47

charts or graphs and we can use arcade

play32:49

Expressions to display data in a

play32:51

creative way

play32:55

so this example here is going to

play32:59

calculate the population density per

play33:01

square mile for a feature and then it's

play33:03

going to define a gradient color ramp to

play33:05

symbolize different levels of the

play33:07

population density and the results is a

play33:09

conditional symbology that colors the

play33:11

feature according to their population

play33:12

density with lower density features

play33:15

having lighter colors and higher density

play33:16

features having darker colors

play33:19

and this next expression is going to

play33:21

define a dictionary

play33:23

project land use symbols which

play33:25

Associates different types of land use

play33:27

with specific symbols for for example if

play33:30

the land use type attribute of this

play33:32

feature is residential the expression

play33:34

will return house

play33:37

um we can create custom symbols or

play33:38

patterns to display data in a more

play33:40

visually appealing way and this arcgis

play33:42

arcade code is going to define a custom

play33:44

symbol for water bottle bodies and

play33:47

return the custom symbol for the water

play33:48

features while using the default symbol

play33:51

for other features

play33:56

and then there's some Advanced

play33:58

visualization techniques that we can do

play34:00

there's the ability to create some you

play34:03

know transitions or animations create

play34:05

interactive visualizations and you can

play34:08

combine multiple visualization

play34:09

techniques to make your Expressions more

play34:12

advanced

play34:14

so looking at some of the best practices

play34:16

make sure you're choosing a clear and

play34:18

appropriate color scheme that's you know

play34:19

easily read and understood use

play34:23

consistent symbology and visualization

play34:24

techniques throughout your maps and make

play34:27

sure to test your visualizations based

play34:28

on different devices and screen sizes to

play34:30

make sure that they're legible and

play34:32

impactful

play34:34

and with that I'm going to go ahead and

play34:35

hand over to Gustavo and we will go

play34:38

ahead and take a look at some of this in

play34:39

action

play34:40

in the last 20 minutes or so we're just

play34:43

gonna take a look at some of the things

play34:45

that Philip mentioned in practice here

play34:49

um and this this is not really intend to

play34:53

make an expert in all the functions

play34:56

available or the variables or anything

play34:58

like that it's more where is arcade

play35:01

available and how can I start writing

play35:03

writing some code in those profiles

play35:07

um and I want to start with

play35:09

documentation here just to make sure

play35:10

that after the

play35:12

uh the session here if anyone has to

play35:15

leave early you are aware there is a

play35:17

really good documentation all the tops

play35:19

that we're going through

play35:21

um I also want to talk a little bit

play35:23

about this idea of a profile within

play35:25

arcade because depending on what you're

play35:29

trying to

play35:31

um change if it's the label or the

play35:33

visualization or the pop-up those are

play35:36

different profiles

play35:39

um that you're going to be working with

play35:40

and you can see here a list of those

play35:43

profiles and where they are available

play35:46

so for example if you're doing something

play35:48

in Arches dashboard maybe you're not

play35:51

going to see any options to do attribute

play35:53

rules there it's just going to be

play35:55

something more on the visualization side

play35:56

of things just to earn hypothetical

play35:58

example and some same thing with some of

play36:01

these other ones right if you're working

play36:02

with maybe Geo trigger you're not going

play36:05

to see anything related to pop-up here

play36:07

so it kind of

play36:09

what you're going to see on the on the

play36:11

editor it's going to be a little

play36:12

different and I can show that in our

play36:14

chest online in a second but I just want

play36:16

to make sure that we talked a little bit

play36:18

about that and then like I mentioned the

play36:21

beginning I'm not going to go through

play36:22

any specific functions here today but if

play36:26

you have done any JavaScript or python

play36:29

before you're very familiar with a lot

play36:32

of these functions if not if you're kind

play36:34

of brand new to to writing any type of

play36:36

code you can come here and you can find

play36:39

specific functions that will help you

play36:41

accomplish accomplish something

play36:43

specifically you're trying to do

play36:45

and then again if you don't want

play36:48

um

play36:49

create a whole project and if it's the

play36:52

first time that you're getting you're

play36:54

just getting started with this there's a

play36:55

playground here where you can explore

play36:58

some of the variables the functions and

play37:01

type some code and see the the results

play37:04

so if that's sad um I'm gonna start the

play37:07

demo I also want to mention something if

play37:09

you go to the arcgis blog you're going

play37:11

to see there is a lot of what's new here

play37:14

uh because in the last couple of days

play37:16

they released a new

play37:19

um release of arches online and I'm

play37:23

gonna use a little bit of field maps

play37:24

today and if you come here you're gonna

play37:25

see that one of the things that changed

play37:27

is arcade uh where you access things so

play37:31

if I'm having a hard time finding a

play37:33

buttons because it just just changed the

play37:36

interface but I think I'm good because I

play37:38

passed things this morning but there and

play37:40

this is a good reminder too that arcade

play37:42

is always evolving right it started more

play37:44

as a visualization so kind of last

play37:47

section that the field went through

play37:49

there but then over time they added

play37:51

support for label and pop-ups and and

play37:54

now even as a developer you can kind of

play37:56

have full control of the whole arcade

play37:59

experience and include that in your apps

play38:01

too

play38:02

okay with all that said

play38:05

um for the demo today here I'm gonna use

play38:08

one of the arcgs solutions and I just

play38:11

use the image assessment solution so if

play38:13

you're not familiar with arches Solution

play38:15

that's kind of another topic but

play38:18

um it's basically pre-configuration of

play38:21

different applications that Azure

play38:23

provides so I'm using this just so they

play38:25

are just online create some layers and

play38:28

maps and applications for me and I don't

play38:30

have to create those from scratch

play38:32

and if I go to my content I can see a

play38:34

lot of those items that were created

play38:37

and um this is kind of the map that I

play38:40

started with and I just made some simple

play38:43

improvements here using arcade and

play38:45

that's where I'm going to spend the next

play38:46

10 minutes or so on going through so you

play38:49

can see uh if I look at the label here

play38:51

it's not the best format to to show the

play38:53

label right it's not easy to understand

play38:55

so I think we can make that look a

play38:57

little better using arcade without I

play39:00

think before maybe you would have to go

play39:01

to schema create a new field and have to

play39:04

change the type and find a way to to

play39:07

make this a little bit more easier to

play39:09

read but with arcade now we can kind of

play39:11

do that

play39:12

um without having to to go to the to the

play39:15

scheme and add additional Fields the

play39:17

data another thing if I click on one of

play39:19

these features the pop-up is very simple

play39:21

right now and it's gonna remain

play39:23

basically the same I didn't really

play39:25

customize the entire pop-up experience

play39:26

but I'm going to add some maybe a title

play39:29

in a description here so that it's a

play39:30

little bit easier again to to understand

play39:33

where I can use those sections to

play39:35

provide some additional information even

play39:37

if I if I don't want to mess with the

play39:39

pop-up but if you want to take a step

play39:42

further you could really customize this

play39:44

have links and images and things that

play39:46

I'm not going to go here today but just

play39:48

want to mention that's possible

play39:51

and then also when I'm editing things

play39:53

um let's say I'm going to add a new

play39:55

affected uh area here I'm going to show

play39:59

how you can customize the form in in

play40:02

field maps and how arcade can be helpful

play40:04

there too so this form is very long

play40:07

right now and I don't I don't know if

play40:09

there's any automation here in terms of

play40:11

capturing date and the user that's doing

play40:14

the editing so those are some of the

play40:16

things that we can do using RK too

play40:20

um I think that's what I want to mention

play40:22

this map I'm going to the second one the

play40:24

one that I made the changes um you can

play40:26

see that the date now it's a little bit

play40:28

easier to read

play40:30

maybe you wanted something different but

play40:32

I think that's kind of the standard that

play40:34

most people are used to if I click on

play40:37

the icon here you can see now I have a

play40:39

title um in the index is just a string

play40:42

that I type the word index but then the

play40:45

number here is being calculated with

play40:47

arcade and this is just a hypothetical

play40:49

number two it's nothing meaningful here

play40:52

but for the purpose purpose of the demo

play40:53

I'll show you how you can do some of

play40:55

those calculations using arcade and in

play40:58

this description is the same it's just a

play41:00

string that I typed this whole kind of

play41:04

first section here and then this value

play41:06

here is dynamically based on the

play41:08

features so if I click on this one you

play41:11

can see now it's saying this one is

play41:12

affected but everything else the same

play41:14

the index change because there's some

play41:16

numbers that I entered here are

play41:19

different

play41:20

so if I go to field maps now and I click

play41:25

on this one this one is actually the

play41:26

original one you can see I don't have

play41:28

any form created here

play41:31

um I could convert my entire pop my

play41:33

entire set of attributes to uh the form

play41:37

I can add additional things but I'm

play41:40

gonna actually do a different uh

play41:42

one here that I configured for this demo

play41:46

so when I opened this map I have the

play41:49

form that I configured just a couple of

play41:51

fields and you can see that some of

play41:54

these are using calculations and some of

play41:58

these are also going to use functions

play41:59

that will capture values without the

play42:02

user having to enter that information so

play42:04

that the

play42:06

another thing that you can do too is

play42:07

conditional visibility so this one you

play42:10

can see there is a tag visible here

play42:12

because I have some logic here that um

play42:16

is

play42:17

basically saying when this is going to

play42:20

be visible and when it's not going to be

play42:21

visible so here's the kind of first

play42:24

arcade example

play42:27

um it's just grabbing the the domain

play42:30

name and then it equals major

play42:33

um

play42:34

then that that additional question will

play42:37

be shown on the form if not then you

play42:40

want that question won't clear and you

play42:42

can you can type the code yourself if

play42:45

you launch the editor but in this case

play42:47

here there is also a nice user interface

play42:50

that you can just select the options and

play42:52

then it will kind of change that to you

play42:54

so if I change this to minor you would

play42:57

change that I'm not going to change this

play42:58

to make sure that the demo works here

play43:01

but you could change over here too

play43:04

so that's conditional visibility and

play43:06

that's one of the things that changed

play43:08

with this last release of arches online

play43:10

this was a little different before if

play43:11

you have been here but now uh you have

play43:15

this um kind of settings icon and that's

play43:18

how you access things and it just looks

play43:20

looks a bit a little different

play43:22

predict so that's conditional visibility

play43:24

you can also do calculations so if I if

play43:28

you look at the calculated value here

play43:31

and if I go again here and I it's using

play43:34

this index

play43:36

um if I go edit arcade

play43:39

it's just a very simple expression

play43:41

expression that's

play43:43

um

play43:44

grabbing the value and then multiplying

play43:48

by by another right so it's grabbing the

play43:52

impact the attribute impacted units for

play43:55

that specific feature and then

play43:57

multiplying by the areas of the image

play44:00

um so that's another very simple and but

play44:03

you can see if I expand this here now

play44:05

uh that's the the the notion of working

play44:08

with a profile

play44:10

um I see feature and layer in data store

play44:13

because those are things that are

play44:14

available

play44:15

in this profile here when I go to the

play44:19

map viewer I'll open something for

play44:21

example working with labels and you're

play44:23

going to see that you're not going to

play44:24

see the same options the functions they

play44:27

might look very similar it's just kind

play44:29

of comprehensive list of common

play44:32

um functions that that you might be

play44:34

using but the profile here are going to

play44:37

be specific for for that uh

play44:40

the application that you're using for

play44:43

example

play44:44

and then this one it's another

play44:47

uh example of how to calculate something

play44:50

but in this case

play44:52

um actually it's

play44:56

now if it's down here

play45:05

in this case it's just using a function

play45:07

to grab the user's name

play45:10

so it's looking at the layer and then

play45:12

just grabbing the the user that edited

play45:15

this layer

play45:17

um and then same thing for the date here

play45:19

there is another arcade expression

play45:21

called date that I created you can see

play45:24

that it's using that because I I can

play45:26

select and unselect things here but I

play45:29

want to keep that date one and if I open

play45:31

it's just it's a very simple function

play45:34

called now that's just gonna

play45:36

automatically enter the the date at the

play45:39

time that this feature is being

play45:40

collected or editing edited or whatever

play45:42

the attribute is representing

play45:44

so that's kind of what I want to show

play45:47

here

play45:48

um if I go back to my map I want to show

play45:51

a couple additional things if I go to

play45:53

the to the labels and I think uh

play45:56

a challenge in the beginning when you're

play45:59

starting work with arcade is just

play46:00

knowing where the buttons are and it's

play46:03

usually something that looks like this

play46:05

or it's something that you're going to

play46:07

see the word expression so let's say I

play46:10

go to the pop-up

play46:12

um and I'm editing my title you can see

play46:15

this one looks a little different but

play46:17

there is an icon here and in some cases

play46:20

that there will be something that says

play46:22

create an expression so let's go to the

play46:25

symbolic you can see this one says

play46:26

expression so it's just getting familiar

play46:29

with uh those icons and where they are

play46:34

but again if I go to the labels

play46:36

um and I click here

play46:38

and it's going to launch this and that's

play46:40

how I change the the label it's just a

play46:43

month function and then captures the

play46:46

month from this date field then plus a

play46:50

string just with a slash here in the day

play46:53

the same idea slash and then the same

play46:55

idea but if I expand this year now you

play46:58

can see there's only one Global variable

play47:01

available for for this right I can't

play47:03

really do things with the the whole map

play47:07

or the whole layer it's just the label

play47:09

for the feature

play47:11

um if I go to the pop-up let's take a

play47:14

look here um

play47:15

quickly if I click here

play47:19

um and let's let's pretend we're adding

play47:22

a new expression and I click on this now

play47:24

you can see I can add things related to

play47:26

the Future related to the label layer

play47:28

that can have multiple features the

play47:30

whole map or the data store and I can

play47:33

expand this to look at some the

play47:37

attributes right there in this case

play47:39

because the the damage is set assessment

play47:42

features and layers see they come with a

play47:44

lot of attributes that's why there is a

play47:46

very long list but it could be that your

play47:48

layer will be just a few attributes here

play47:52

uh same idea for the functions you can X

play47:54

the functions here too

play47:58

and we're kind of almost running out of

play48:01

time here so

play48:03

um I want to show something a little bit

play48:05

more complex and this might be a good

play48:08

way for you to get some ideas of what

play48:12

can be done too if I go to the living

play48:13

Atlas

play48:15

um and I type for example here quality

play48:17

I'm going to find some layers from esri

play48:19

here this one you can see there is some

play48:22

more interesting symbology I didn't want

play48:24

to mess up with this in bulge for the

play48:25

damage assessment because it's very

play48:27

specific icons and colors based on

play48:30

status but if we go to the

play48:34

to the living Atlas grab a layer and you

play48:36

like the symbology that it's been used

play48:39

then you can click on that layer let's

play48:44

look at this one here

play48:46

let's go to symbolage and then let's

play48:50

there is an arcade expression that sets

play48:53

the symbol size based on the map scale

play48:55

so if I click there you can see now

play48:57

instead of my simple examples with just

play49:00

one line of code it's something more

play49:02

like what Philip showed on the slides

play49:05

here right so there is variables being

play49:07

declared some function and when being

play49:11

used here for for different things that

play49:13

I want to do with the symbology and then

play49:15

return something in the end

play49:19

um I think that's all that I'm gonna

play49:23

show here the last thing that I want to

play49:25

show quickly is that Philip mentioned

play49:28

during the presentation that

play49:30

one of the major benefits of arcade is

play49:33

that I can write something like you saw

play49:36

before I wrote something in field maps

play49:39

but it's also available in my in the map

play49:41

viewer and in any other applications

play49:44

that I embed this map or that I create

play49:46

to use in this map

play49:48

um and that applies to desktop

play49:49

environments too so if I look at my map

play49:53

here now and I just went to my portal

play49:56

I'm using rhs Pro so I can quickly open

play50:00

um the everything that I have in Arches

play50:02

online or arcgis Enterprise so portal

play50:04

here it's not the polo that comes with

play50:06

Enterprise it's just a web GIS borrow

play50:09

then I found that web map

play50:11

um

play50:12

that I showed before in the map viewer

play50:14

and then I just add to my project and

play50:17

now you can see that the the symbolage

play50:20

or the the label is the same and if I

play50:23

click on the future that the title here

play50:25

will be the index to just like before

play50:28

right and if I want to make changes to

play50:32

uh

play50:33

uh things using arcmap I can do that too

play50:36

so I for example I would select one of

play50:39

this

play50:40

um the one of the layers that I have and

play50:43

then I'm I click on the labeling for

play50:45

example and then the same idea here will

play50:47

be expression or an icon

play50:50

um

play50:50

and then when I launch that you can see

play50:54

that same function that I showed you

play50:55

before and if I want to make any changes

play50:58

maybe I want to delete some section of

play51:00

this

play51:01

it will change here and if I save and I

play51:06

open that just online you that's the the

play51:08

same experience that everything that I

play51:09

see here is what I'm going to see there

play51:12

too

play51:13

oh thanks Gustavo

play51:15

um just a couple of a couple of things

play51:17

that were just just mentioned

play51:19

um follow the blogs for for good

play51:21

information uh we did just have a update

play51:24

to arcgis online

play51:26

um this post came out yesterday but we

play51:28

had our February update you can read all

play51:30

about all of the new functionality

play51:34

um you know a big update that came with

play51:36

the November release was that arcgis

play51:40

arcade editor the Gustavo demonstrated

play51:42

which makes it much easier in that kind

play51:45

of Rich coding experience to be able to

play51:47

build your expressions and test them

play51:49

really easily so it should really take

play51:52

away

play51:54

um you know if you have any anxiety

play51:55

about writing codes like I mentioned I'm

play51:57

not a coder this makes it much easier to

play52:00

be able to build those expressions and

play52:02

kind of give that predictive

play52:04

um you know kind of format as far as

play52:06

trying to figure out what it is you're

play52:07

trying to accomplish

play52:10

um

play52:10

and then you know there's there's plenty

play52:13

of resources that we have available

play52:14

there's there's the documentation

play52:16

there's the playground there's tutorials

play52:18

we have you know robust

play52:21

um Community

play52:22

um with with the forums for arcade

play52:25

um there's you know webinars so there's

play52:29

you know any any kind of entry point to

play52:31

kind of get started I know I like you

play52:33

know watching these these demos and

play52:35

videos going back to the documentation

play52:36

and trying stuff out

play52:39

um to see if I can you know kind of

play52:40

accomplish the same thing that some of

play52:41

these other folks are doing

play52:44

um and then always you know you can feel

play52:45

free to reach out to either Gustavo or

play52:47

myself

play52:48

um you know if we have questions that we

play52:50

can answer we can certainly do that and

play52:52

if not we can always pass that along

play52:54

back to the uh sort of subject matter

play52:57

expert to make sure those questions get

play52:59

addressed by the right people

play53:00

and um I think that we are right at time

play53:03

so I want to thank everybody once again

play53:06

Andrew Gustavo and I are really you know

play53:08

sorry we couldn't be there in person but

play53:11

hopefully this was informative and we'll

play53:13

encourage you to

play53:15

um use arcade uh more uh you know across

play53:18

the platform in your in your mapping

play53:20

Endeavors so once again just want to

play53:22

thank everybody and hope that everybody

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
ArcGISArcadeData VisualizationGIS WorkflowsSpatial AnalysisCodingWeb MappingGeospatialArcade ExpressionsCustom Labels