Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Re: Calculating average of zonal data in contour map

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Calculating average of zonal data in contour map

Oct 21, 2009 7:50 AM
(1330 views)

Hi Guys,

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.

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?

Thanks.

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.

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?

Thanks.

12 REPLIES 12

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

Anybody? Sorry for the push but I would appreciate any help asap..

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

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>Summary to find the mean of whatever columns you want by Zone.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

So how do I get the data values from each zone in a different table?

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?

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?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

"then you can make a new column called Zone that identifies each point (row) as being in Zone z1 or z2 or z3 etc"

In other words, how can I do this easily?

In other words, how can I do this easily?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

Thanks for your response, MS.

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:

Zone Average of data in zone for a particular column

Z1 X

Z2 XX

Z3 XX

Z4 XX

Z5 XX

and so on.

How do I get the Zone column and the Average column?

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:

Zone Average of data in zone for a particular column

Z1 X

Z2 XX

Z3 XX

Z4 XX

Z5 XX

and so on.

How do I get the Zone column and the Average column?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

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.

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.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

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:

Zone=If(And(1<=X<2,1<=Y<2), "Z1", And(2<=:X<3,1<=:Y<2), "Z2"))

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?

Zone=If(And(1<=X<2,1<=Y<2), "Z1", And(2<=:X<3,1<=:Y<2), "Z2"))

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculating average of zonal data in contour map

Don't know why it didn't take all my feedback.

Anyway, I went on the contour map, and used Customize and added a script and then entered the following:

Zone = If(

And( 1 <= X < 10, 1 <= Y < 20 ), "Z1",

And( 20 <= :X < 45, 21 <= :Y < 67 ), "Z2"))

When I hit OK, it did something but I did not get any error in the log window.

So,where am I supposed to see the newly assigned zones? Will those be in the data table?

Anyway, I went on the contour map, and used Customize and added a script and then entered the following:

Zone = If(

And( 1 <= X < 10, 1 <= Y < 20 ), "Z1",

And( 20 <= :X < 45, 21 <= :Y < 67 ), "Z2"))

When I hit OK, it did something but I did not get any error in the log window.

So,where am I supposed to see the newly assigned zones? Will those be in the data table?