problem "summarize" tool

3956
3
Jump to solution
02-02-2016 12:58 AM
Highlighted
New Contributor

code polygon
% coverfragility
a504
a155
a352
b1005
c201
c803

d

1003
e602
e404

I have to summarize the "code polygon" so that from the various entrys corresponding to the same code, it only remains the one with highest "%cover". When you use the summarize tool, for each of the fields of the output table you have to choose which parameters you want to appear. But in this case I would like that the "fragility" value in the output table corresponds to the one in the same entry as the highest "%cover" value. The output table would have to look like this:

code polygon% cover
fragility
a504
b1005
c803
d1003
e602

Since I have several thousand entries in my input table, could anyone help me find a way to do this authomatically?

Thanks in advance

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Esteemed Contributor

If you say automatically, I would answer "using Python code", but there is a manual way too, that can be easily implemented. If you summarize using the "code polygon" and as statistics Maximum of "% cover" you will have a table that contains the code polygon and the maximum % cover found for that code polygon.

You can concatenate those two fields into one, generating a value like a50, b100, c80, etc. If you do this too in your original table, you can use this field to join the fragility from the original table to the summarized table.

Please note that when you have more than one fragility values for a polygon code with the maximum % cover in that polygon code, it will only yield 1 result.

View solution in original post

3 Replies
Highlighted
Esri Esteemed Contributor

If you say automatically, I would answer "using Python code", but there is a manual way too, that can be easily implemented. If you summarize using the "code polygon" and as statistics Maximum of "% cover" you will have a table that contains the code polygon and the maximum % cover found for that code polygon.

You can concatenate those two fields into one, generating a value like a50, b100, c80, etc. If you do this too in your original table, you can use this field to join the fragility from the original table to the summarized table.

Please note that when you have more than one fragility values for a polygon code with the maximum % cover in that polygon code, it will only yield 1 result.

View solution in original post

Highlighted
New Contributor

I appreciate very much your reply. I've done it the way you suggested; it took just several minutes.

Thanks a lot, very helpful!

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

You may also be interested in this post Query and summarize revisited... by the master Dan Patterson

Reply
0 Kudos