Select to view content in your preferred language

Symbology, Arcade and Group By

620
1
01-02-2023 06:00 AM
מנהלפורטל
New Contributor

Hello,

I have a points layer containing the following fields: city, date, sample_value.

My objective is to create a dynamic symbology using ArcGIS Online dashboard and a date filter, where the user selects a data range, and the cities midpoints render according to the count of the samples in that city and selected date range above a certain value (let's say 500) / count of all samples in city and selected date range * 100.

Is this possible with Arcade? If so, how?

I have gotten closer to the result using the pop-up arcade builder, but have not figured out if it possible using the symbology one:

var fs = FeatureSetByName($map, "historical_data")
var fs_filt = Filter(fs, 'sample_value> 500' )

var group_exp = {
name: 'anomaly_count',
expression: 'OBJECTID',
statistic: 'COUNT'
}

return GroupBy(
fs_filt,
['local_authority'],
group_exp
)

Tags (3)
0 Kudos
1 Reply
jcarlson
MVP Esteemed Contributor

The short answer is no, it's not possible in Arcade.

Arcade has a number of different profiles, each with different capabilities. The Visualization profile is one of the more limited of the bunch, so even if you got your Popup expression working, it would not apply to your symbology the same. Expressions there evaluate per-feature, and can only access other attributes of the same feature. Essentially, it can't "see" the other features or their attributes.

- Josh Carlson
Kendall County GIS