<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calculating average of zonal data in contour map in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/854#M854</link>
    <description>Don't know why it didn't take all my feedback. &lt;BR /&gt;&lt;BR /&gt;Anyway, I went on the contour map, and used Customize and added a script and then entered the following:&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 22 Oct 2009 16:02:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-22T16:02:21Z</dc:date>
    <item>
      <title>Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/844#M844</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I have this contour map which is divided into several square zones (4x4). I wanted to calculate the average of all the data points in all the zones (e.g. say Average of Z1 = , Average of Z2 = , )on the contour map. The number of points in a zone varies at the edge of the circular countor map. &lt;BR /&gt;Is there an easier way of doing this other than manually selecting data points from each zone, labeling them into a different column (where it assigns a 1 or a 0) and then take the average? &lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 21 Oct 2009 14:50:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/844#M844</guid>
      <dc:creator />
      <dc:date>2009-10-21T14:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/845#M845</link>
      <description>Anybody? Sorry for the push but I would appreciate any help asap..</description>
      <pubDate>Wed, 21 Oct 2009 19:21:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/845#M845</guid>
      <dc:creator />
      <dc:date>2009-10-21T19:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/846#M846</link>
      <description>I'm not sure I understand exactly what you have said about your zones. If you can identify which zone each point (row) is in by some algorithm then you can make a new column called Zone that identifies each point (row) as being in Zone z1 or z2 or z3 etc. Then you can use Tables&amp;gt;Summary to find the mean of whatever columns you want by Zone.</description>
      <pubDate>Wed, 21 Oct 2009 20:07:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/846#M846</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2009-10-21T20:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/847#M847</link>
      <description>So how do I get the data values from each zone in a different table? &lt;BR /&gt;&lt;BR /&gt;I can select the data points on my contour map with the lasso tool and then see the data values highlighted in the data table. Do I have to copy all the selected rows and make a new table for each zone?</description>
      <pubDate>Wed, 21 Oct 2009 20:34:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/847#M847</guid>
      <dc:creator />
      <dc:date>2009-10-21T20:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/848#M848</link>
      <description>"then you can make a new column called Zone that identifies each point (row) as being in Zone z1 or z2 or z3 etc"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In other words, how can I do this easily?</description>
      <pubDate>Wed, 21 Oct 2009 20:59:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/848#M848</guid>
      <dc:creator />
      <dc:date>2009-10-21T20:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/849#M849</link>
      <description>I am not sure of how you came up with the zones. Have you specified the grid by your self or did JMP do that automatically? In any case you may have to set up an conditional statement to decide in what zone each point reside, e.g. &lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2009 23:10:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/849#M849</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2009-10-21T23:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/850#M850</link>
      <description>Thanks for your response, MS.&lt;BR /&gt;&lt;BR /&gt;Yes, I am using a script to generate a grid which I superimpose on top of my contour plot, so my zones are predetermined and do not change. Now when I select the data points inside each zone (say zone Z1)with the lasso tool, I can see that the data points (i.e. corresponding rows for all columns) for that zone (Z1) are highlighted in my data table. Now what I want is something like this:&lt;BR /&gt;&lt;BR /&gt;Zone   Average of data in zone for a particular column&lt;BR /&gt;Z1         X&lt;BR /&gt;Z2         XX&lt;BR /&gt;Z3        XX  &lt;BR /&gt;Z4        XX&lt;BR /&gt;Z5        XX&lt;BR /&gt;&lt;BR /&gt;and so on.&lt;BR /&gt;&lt;BR /&gt;How do I get the Zone column and the Average column?</description>
      <pubDate>Wed, 21 Oct 2009 23:22:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/850#M850</guid>
      <dc:creator />
      <dc:date>2009-10-21T23:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/851#M851</link>
      <description>Using my first suggestion you assign the zone to each row by applying the appropriate conditional formula. This can be done by script or by a column formula in the data table. Then, once you have given each row its zone label (Z1 etc.) you can use the Summary command in the Tables menu get the mean for each zone, as suggested above.&lt;BR /&gt;&lt;BR /&gt;If your zones equally sized and defined exactly by the ranges of your x and y data, then my second suggestion would work fine (i just tested with a small data set). Just choose the save/generate grid (present in JMP 8 at least) and specify 4x4 grid. And you will get a data table with 16 rows, 1 for each zone, and a column with the mean of all data within each zone. The zones are of course not named Z1 etc but rather defined by the grid cell borders.</description>
      <pubDate>Wed, 21 Oct 2009 23:55:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/851#M851</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2009-10-21T23:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/852#M852</link>
      <description>Ok I am trying to use your first suggestion. So I went on the contour map, and used Customize and added a script and then entered the following:&lt;BR /&gt;&lt;BR /&gt;Zone=If(And(1&amp;lt;=X&amp;lt;2,1&amp;lt;=Y&amp;lt;2), "Z1", And(2&amp;lt;=:X&amp;lt;3,1&amp;lt;=:Y&amp;lt;2), "Z2"))&lt;BR /&gt;&lt;BR /&gt;I then hit Apply and Ok but it did nothing, no errors too. Where am I supposed to see the rows with zones? Would they be in the raw data table?</description>
      <pubDate>Thu, 22 Oct 2009 15:44:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/852#M852</guid>
      <dc:creator />
      <dc:date>2009-10-22T15:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/853#M853</link>
      <description>Don't know why it didn't take all my feedback. &lt;BR /&gt;&lt;BR /&gt;Anyway, I went on the contour map, and used Customize and added a script and then entered the following:&lt;BR /&gt;&lt;BR /&gt;Zone = If(&lt;BR /&gt;	And( 1 &amp;lt;= X &amp;lt; 10, 1 &amp;lt;= Y &amp;lt; 20 ), "Z1",&lt;BR /&gt;	And( 20 &amp;lt;= :X &amp;lt; 45, 21 &amp;lt;= :Y &amp;lt; 67 ), "Z2"))&lt;BR /&gt;&lt;BR /&gt;When I hit OK, it did something but I did not get any error in the log window. &lt;BR /&gt;So,where am I supposed to see the newly assigned zones? Will those be in the data table?</description>
      <pubDate>Thu, 22 Oct 2009 16:01:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/853#M853</guid>
      <dc:creator />
      <dc:date>2009-10-22T16:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/854#M854</link>
      <description>Don't know why it didn't take all my feedback. &lt;BR /&gt;&lt;BR /&gt;Anyway, I went on the contour map, and used Customize and added a script and then entered the following:&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Oct 2009 16:02:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/854#M854</guid>
      <dc:creator />
      <dc:date>2009-10-22T16:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/855#M855</link>
      <description>Well, that formula was just an conceptual example. To get it in the data table you can manually add a new nominal column "Zone" and chose "Formula" under "Column Properties" enter your code (only the part to the right  of the equal sign).&lt;BR /&gt;&lt;BR /&gt; Remember that your "X" and "Y" must refer to other columns and if you paste your formula you must use :X and :Y, otherwise JMP may think they're parameters rather than columns. Alternatively you can use the formula editor but for this quite complicated formula it is easier to type it in a script window and copy and paste to the column formula.&lt;BR /&gt;&lt;BR /&gt;You may also of course do it all by scripting, i-e create a column and use the "For each Row" command to fill the column with your zone labels.</description>
      <pubDate>Thu, 22 Oct 2009 17:49:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/855#M855</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2009-10-22T17:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating average of zonal data in contour map</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/856#M856</link>
      <description>Ok that idea worked. Still a little tedious but I will try and automate it.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help and patience.</description>
      <pubDate>Fri, 23 Oct 2009 14:58:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-average-of-zonal-data-in-contour-map/m-p/856#M856</guid>
      <dc:creator />
      <dc:date>2009-10-23T14:58:07Z</dc:date>
    </item>
  </channel>
</rss>

