Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm looking for some general frequency, summarize tool. What I basically want is some tool like the summarize tool in ArcGIS (right click in the attribute table> summarize) that runs on all attributes and objects that I select (it would be great if that tool could output to excel for example but that is totally optional). I have way to many objects and attributes to use do this manually...

I know this should be possible to create with ArcPy (although I don't find summarize in Arcpy), but this looks like something that can be useful to a lot of people so I believe something like this must already exist? ArcGIS is no requirement, if it runs on shape files or anything I can export to, that's fine.

If this does not exist, then I will try to develop it myself and maybe post it somewhere online cause it looks like something useful.

Thanks

EDIT: I've written a small tool in python to basically do summarize. It works on shape files and summarizes to Excel (but other formats are easy to use too) and should be OS independent. If anyone would like to see it I will clean the code up and publish it.

EDIT2: The tool can be found here: https://bitbucket.org/tcoopman/shapesummarize/

share|improve this question
add comment

2 Answers

What about the Summary Statistics tool?

Available statistics types are:

  • SUM—Adds the total value for the specified field.
  • MEAN—Calculates the average for the specified field.
  • MIN—Finds the smallest value for all records of the specified field.
  • MAX—Finds the largest value for all records of the specified field.
  • RANGE—Finds the range of values (MAX minus MIN) for the specified field.
  • STD—Finds the standard deviation on values in the specified field.
  • COUNT—Finds the number of values included in statistical calculations. This counts each value except null values. To determine the number of null values in a field, use the COUNT statistic on the field in question, and a COUNT statistic on a different field which does not contain nulls (for example, the OID if present), then subtract the two values.
  • FIRST—Finds the first record in the Input Table and uses its specified field value.
  • LAST—Finds the last record in the Input Table and uses its specified field value.

...and it's callable from Python:

import arcpy
from arcpy import env
env.workspace = "C:/data/Habitat_Analysis.gdb"
arcpy.Statistics_analysis("futrds", "C:/output/output.gdb/stats", [["Shape_Length", "SUM"]], "NM")
share|improve this answer
    
I've tried this, but this doesn't work very well for me, because count for example only counts NULL not empty fields like "" or 0. I want a summary of all the values in the field. –  tmske Feb 21 '12 at 7:12
    
@tmske - have you tried Dan's suggestion in his answer? –  Chad Cooper Feb 22 '12 at 11:40
    
I did one minimal try to use the tool, but I couldn't get the tool to run. I didn't try very hard to be honest, but I've build my own solution, see the EDIT in my post. –  tmske Feb 22 '12 at 14:48
add comment

There is also the Descriptive statistics and Frequency Distributions tool on the geoprocessing website.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.