Symbolize percent of total in AGOL webmap

123
2
Jump to solution
05-05-2020 09:42 AM
JayJohnsonWashoeCounty
Regular Contributor

I have a point layer of zipcode centroids with an attribute value of COVID-19 cases for each zipcode.  I am currently displaying counts per zipcode as "Counts and Amounts(size)" based on the value that attribute for each record. 

What I would like to do instead is symbolize by "% of total cases".  Is there a way to do this without adding a field to the zipcode centroids that contains the # total cases (sum of all records)?  In other words, is there a way (Arcade or otherwise) to utilize the total summed value of an attribute field in a table without using a second field that explicitly contains that total value?

Jay
Washoe County GIS
0 Kudos
1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

Arcade FeatureSet can be used to get the information, but it is not use-able for symbol rendering.  Here is an example using it in a Popup configuration.

https://www.arcgis.com/home/item.html?id=c2d3ddc1352548cbb76d29f611b86dea 

var a = FeatureSetByName($datastore,"Deaths",['Deaths','Country_Region'],false)
var usa = filter(a, "Country_Region = 'US'")
var USAtotal = sum(usa,'Deaths')
return 'percentage of US Deaths '+ text(round(($feature.Deaths / USAtotal)*100,2)) +'% '+ textformatting.newline +$feature["Province_State"]+' deaths ' + text($feature.Deaths,'#,###') + ' / '+ 'US Total '+ text(USAtotal,'#,###')

View solution in original post

2 Replies
MarkBockenhauer
Esri Regular Contributor

Arcade FeatureSet can be used to get the information, but it is not use-able for symbol rendering.  Here is an example using it in a Popup configuration.

https://www.arcgis.com/home/item.html?id=c2d3ddc1352548cbb76d29f611b86dea 

var a = FeatureSetByName($datastore,"Deaths",['Deaths','Country_Region'],false)
var usa = filter(a, "Country_Region = 'US'")
var USAtotal = sum(usa,'Deaths')
return 'percentage of US Deaths '+ text(round(($feature.Deaths / USAtotal)*100,2)) +'% '+ textformatting.newline +$feature["Province_State"]+' deaths ' + text($feature.Deaths,'#,###') + ' / '+ 'US Total '+ text(USAtotal,'#,###')

JayJohnsonWashoeCounty
Regular Contributor

Thanks Mark.  Too bad that can't be used for symbolization, which would be very handy.

Jay
Washoe County GIS
0 Kudos