Select to view content in your preferred language

problem "summarize" tool

4545
3
Jump to solution
02-02-2016 12:58 AM
dmasana
Deactivated User

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)
0 Kudos
1 Solution

Accepted Solutions
XanderBakker
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
XanderBakker
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.

dmasana
Deactivated User

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

Thanks a lot, very helpful!

0 Kudos
XanderBakker
Esri Esteemed Contributor

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

0 Kudos