# Calculate the proportion of points within a polygon over a threshold value

I have a set of point observations and a county shapefile for CA. I would like to calculate the proportion of points within each county that are above different threshold values, giving me a result of one value for each county. I can do this in R, but can't seem to figure out how to do it in ArcGIS (10.3).

Note that I editted the answer, thus images won't match exactly what you were asking, but still give the main concept of the workflow. A comment at the end wrap it up to answer your question.

I assume that by proportion you mean to divide the number of points in each polygon (county) to the total number of points in CA.

Here is a work flow:

1. Use spatial join on the polygon layer and join the points layer. Choose the first option, and some statistics. The statistics type doesn't matter in your case, since you will also get a Count field. See image: 1. Divide the Count_ field with the total number of points, in my case 7. You can get it by looking in the attribute table of your points data, or by using summary statistics on the Count_ field in your output table from step 1. Feed the result to a new field (proportion) using float or double as type.

Here is the result table: EDIT: forgot the threshold. Understood your question now (Hopefuly):

I would create a subset for all points above the threshold using select by attributes, and export it to a new layer. Than I would have use the spatial join twice; first to join the points above the threshold, and to the output I would have join the original point layer.

You will get two Count_ fields. you should divide Count_1/Count_2 to get the proportion; where count_1 originates from the first join, and count_2 from the second.

• thanks for your answer. I can't help but think there must be an easier way, (perhaps using a sql expression?) but I believe your approach would solve the problem. – RyanM Apr 9 '15 at 18:28
• @RyanM - you can always use model builder or python to stream this workflow; that is if you have to do it many times. – dof1985 Apr 9 '15 at 22:15