Create pop-up that shows value relative to average of all values for that field?

414
2
Jump to solution
02-17-2021 04:04 PM
Labels (1)
KevinBracy_Knight
New Contributor III

Hi there,

I'd really like to create a pop-up graph that simply shows the value of the selected polygon compared to the mean for that field (or median in some cases). For example, I would like to click on a polygon of property value and simply have a two-bar chart (or any kind of chart really) that shows what the property value for a home and compares it to the average of all property values in my city. I have a heap of variables I'd like to do this for (home quality, flood risk, distance to city center, etc.). I've watched about three hours of how-to videos for Arcade today. I feel like the answer is out there, but can't find it!

Thanks so much in advance!

Kevin

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Notable Contributor

Easy enough to do with Arcade's Average function (or Mean, which is for some reason a separate function...)

  1. Add an expression to your layer. I'll call mine "Average Size".
  2. Expression text: Average($layer, 'size'), size being the field name.
  3. Repeat as needed to get your average values for each field. Median and other percentiles don't seem to be possible at present, but maybe someday!
  4. Create a bar chart.
  5. In the Chart Fields section, your expressions should be available to add.
    jcarlson_0-1613618565452.png

  6. Repeat as needed to get charts comparing all your attributes.
    jcarlson_1-1613618709579.png

     

That's it!

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Notable Contributor

Easy enough to do with Arcade's Average function (or Mean, which is for some reason a separate function...)

  1. Add an expression to your layer. I'll call mine "Average Size".
  2. Expression text: Average($layer, 'size'), size being the field name.
  3. Repeat as needed to get your average values for each field. Median and other percentiles don't seem to be possible at present, but maybe someday!
  4. Create a bar chart.
  5. In the Chart Fields section, your expressions should be available to add.
    jcarlson_0-1613618565452.png

  6. Repeat as needed to get charts comparing all your attributes.
    jcarlson_1-1613618709579.png

     

That's it!

- Josh Carlson
Kendall County GIS
KevinBracy_Knight
New Contributor III

Thanks so much! I think i was missing how to code for a field vs a cell!

0 Kudos