Select to view content in your preferred language

Summary Statistics as Variables

3527
3
06-10-2015 05:46 PM
ColeRoberts
New Contributor II

I'm going to try this one more time before I give up until I'm more familiar with Python scripting. I've simplified things a bit and although I'm in the process of learning python, I would still like to have a functional tool in the meantime.

**I've attached my model with explanations of the various user inputs and outputs so I don't have to describe as much in text.

In this case we have 2 selected summarizations: total population and household population. The mean and standard deviation will be calculated for both summarizations using the SUMMARY STATISTICS tool which will hopefully be utilized to calculate the ZScore with the CALCULATE FIELD tool.

How can I utilize the calculated mean and standard deviations in the CALCULATE FIELD tool? Or is there a way to calculate the summary statistics with one long string using the CALCULATE FIELD tool?

Any help is much appreciated!

Cheers,

Cole

Modelbuilder Explanation.png

0 Kudos
3 Replies
ToddBlanchette
Occasional Contributor II

Hi Cole,

The "Get Field Value (Model Builder)" tool might help you out in this case.  Its purpose is to select a value from a chosen field, in the first line of a table.  Its specifically meant for something like this where your resulting table from Summary Statistics only creates one entry.  Use four of them to grab the values you need for your expression.

Here's the help file for the tool:

ArcGIS Help 10.1

See if that helps!

Cheers,

Todd

0 Kudos
ColeRoberts
New Contributor II

That's what I've used in the past but in this case I'm wondering if it's possible to iterate through each column and spit out as many field values as the summary statistics tables contains. In this example there are only 2 demographics variables selected but other times up to 40 may be selected. It would be a waste of time to create that many field tools when you could just export to excel and import back to Arc. If possible they would need to be named according to the column headers.

The more I talk through this the more I realize that Python is really the way to go. Especially since the next step would be automating the expression when calculating the zscore field.

Any thoughts?

Working Model PNG.png

0 Kudos
ToddBlanchette
Occasional Contributor II

From reading your last statement, then yes - going over to Python will make this infinitely easier for you, if you are familiar with it.  Setting up variables and iteration is so much easier in that environment, especially if you want to automate your calculation expression based on field names.  The string manipulation features will help immensely.

Good luck to you!