Fun with ArcGIS Online: Introducing Arcade

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] everybody this is Mark and I'm here to introduce to you two arcade arcade is a simple lightweight expression language that's used in ArcGIS now before I begin I want to stress three important things number one arcade can be used throughout the art jazz platform that's what it's designed for so if I build an expression in say our chess online that expression can also be used in our chess Pro it can be used in a JavaScript API it can be used in a new collector and on and on it goes in context of today's demo I'm going to focus on a web map in our chess on line number two when you think of arcade think of it as a similar mechanism to building an expression in Excel so when you go to Excel you build a formula it does some math it does some logic it can do some conversion but at the end of the day it spits out a value that's exactly what our cake does you build your expression to be able to produce some kind of value at the end that you can use last but not least arcade isn't never replacing anything so geoprocessing is still exactly the same if Python is exactly the same this is not meant to be a replacement for geoprocessing what it does is allows you to be able to work with a web map in our case and use that web map throughout our platform so with that being said let's get going all right so let's get rolling we are here in Metro Vancouver and I have a bunch of dissemination areas for the region each of these dissemination areas has some attributes on housing and education etc but I'm interested in two particular fields spending on tobacco and alcohol and spending on games of chance so I'm gonna use these values to calculate some kind of a sin factor for each of our dissemination areas now of course those values that we're looking at for those two fields they're aggregates there are an estimation of how much is being spent onion in within each of these dissemination areas I want to get a per person spending so we are going to use the population of that dissemination as well to be able to build our expression so we can use our cave in three really simple ways within web map and the first way is through symbology so we'll go to change style I want to choose an attribute of course I don't want to choose the individual field for spending on tobacco or spending any of the chance I need to use both of these fields so instead I'm going to create a brand new expression and this expression is going to bring up the arcade to expression builder and here's where I can start doing some magic I'm going to first give this new expression a name I'm just going to call it sin symbol there we go and just like I said before with the analogy of Excel you can start building that expression based on the fields that you have in your database so let's find those two fields that I'm working with so there's tobacco and alcohol I'm going to take that field and I'm going to add it to the field for games a chance but because we want a per person value I'm going to divide that by the population always a good idea to use the test to make sure that a value gets produced the second result number gets calculated that looks great let's click OK on this and be able to see the result now this is where smart mapping comes in so that you can see that the smart mapping mechanism has chosen a graduated symbol to be able to show these values I'm gonna switch this to a graduated color so we're able to see that the darker dissemination area the higher the spending is on sin per person and in the lighter areas are less spending in the course you can begin to see some trends throughout Metro Vancouver now here's the really important thing that I just did before arcade if I want to produce a map like this I would have to add a brand new field then I'll use the field calculator to be able to calculate those values and then I would need to use to change symbol or change style to be able to make this map appear the way it does but with the arcane expression that I built it calculates all of these values on the fly in other words I don't need to create any new data arcades gonna figure it out for me that's really powerful so that's one way we can use arcade in a web app let's choose another way and that is to create labels so again with labels I can not really choose an individual field so I'm going to use that new expression to be able to calculate that that value and put in a label so let's just call this again another name CIN label here we go and then I can start building that expression again now I can build it exactly the same way I did before field 1 plus field 2 divided by population but because that expression they already exists in my web map I could just use it right out of the box so there it is that's the same expression I built a little bit earlier we'll do a quick test to make sure produces a value it does and then we'll be able to see that that label does indeed get calculated on the fly for each our dissemination areas so we know what to spend is no I grant you this is the most ugly looking label at this point so one of the other things you can do work with arcade is you can format things so I've already pre written this expression it's exactly the same formula as before but I am going to round it to zero decimal places and then I'm going to convert it to a text so it has the little comma where the thousand places and then I'm gonna add a little dollar sign in front to really make it look nice so with that I'm going to copy this expression that I built and I want to go back into my expression builder and I'm going to replace this expression with my new formatted expression again do a test to make sure it looks right it does and we click OK and now we'll be able to see that our labels have been formatted with our Kaede on the fly to be able to show exactly the values that I want alright let's get into the third way we can use arcade and that is through the pop-up window so if we're gonna configure pop-up we'll be able to pick and choose the fields attributes that we want or we can start adding in some actuate expressions so here's what I'm going to add in that expression again it brings up that editor this time I'm going to call this sin spending per person and I'll just use an existing expression don't have to rebuild anything I've already built a nice formatted one with that sin label so let's test that to make sure it works yeah it looks good click OK and now whenever I use that pop up window you'll be able to see that it indeed creates that brand new field at the bottom since spending per person with the value that has been calculated so if you want to be able to use our Kaede to be able to create values on the fly you put those in a pop-up window you can certainly do that so we just showed you three really simple ways you can do this I'm just gonna click Save on this particular web map and then I'm going to show you that well okay that was kind of corny but how can i really use Arcade for something real so here's an example of that last year was the New Brunswick provincial election that we created this web map that showed the results so we know which party won and by how much based on the based on the transparency of the of the polygon but this is where you can use our cade in a pop up when I click on a feature you can see that we can use our cake to do some very complex things such as add colors to a chart build a chart we can rearrange those values so that they are sorted so that the one with the most votes shows up first the second most votes sort of up second etc and we can calculate value such as voter turnout on the fly so I really wanted to show you that quick example that our cake can be used in very powerful ways now we're not going to get into how I built that in this particular demo but maybe down the road show you how the sausage is made to learn more about the arcade expression in the arcade language you can go to developers dark jest comp slash arcade and here's where we be able to see the arcade page including some information on the different functions there's some different advice in terms of the guide on the specifics of the language and even get a little playground here to try out some of your arcade expressions and give it a whirl the last thing I wanted to show here is that indeed this expression can also be used throughout the platform so here I am in ArcGIS Pro I can go into my portal and access that web map that I just saved whereas it here dissemination areas this is going to add this into our map and again we'll be able to see the same symbols the same labels and the same pop-ups that will also work here in our GIS pro so that's it for this video hopefully we shown you how easy it is to be able to use our cave in your web maps for symbology for labels or pop-ups and start using it once you get the hang of it you'll see that it's really simple and easy it's fast and it can be very powerful until next time happy G is [Music]
Info
Channel: Esri Canada
Views: 3,193
Rating: 5 out of 5
Keywords: ArcGIS Online, Arcade, Web Map, Symbols, Labels, Popups, ArcGIS Pro
Id: h_NKrCuPSQQ
Channel Id: undefined
Length: 10min 51sec (651 seconds)
Published: Fri Jun 14 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.