How do you total up data within a polygon?

02-20-2020 02:34 PM
New Contributor III

I used the code below to find out which neighborhood each Census block group is within. I now want to find out the total internet subscriptions for each neighborhood. I'm don't know the correct terminology to search for how to do this.

Xander Bakker any help would be appreciated. 

var pnt= Centroid(Geometry($feature))
var neighborhood = FeatureSetByName($map,"Shreveport_Neighborhoods",["NAME"])
var fsIntersectHood = Intersects(neighborhood, pnt)
var fneighborhood = first(fsIntersectHood)
if (fneighborhood == null) return ""
    return fneighborhood.NAME
Tags (1)
0 Kudos
1 Reply
Esri Esteemed Contributor

Hi Gerald Sneary ,

Let me see if I understand what you are trying to achieve. You have a layer with the census block groups, and from within this layer you want to know in which neighborhood the census block is located and read the attribute with the internet subscriptions? Or is this a value stored at the census block group and you will first need to select the neighborhood that it intersects with and then the other census block groups that intersect with that neighborhood (can there be partial overlap, and if so, how do you want to handle that) and sum all the internet subscriptions from the selected census block groups? Sorry, but I haven't worked with census block (group) data and I am not sure what is stored where. Both options are possible to achieve with Arcade though.

0 Kudos