Join (combining 2 Objects) Help

##
Help in using Join

Introduction | Requirement | Walk-through | Details

Introduction
The Join utility allows you to combine the data from 2 related data objects into a JGOFS constructed object. The 2 data objects or datasets must have a relationship that is evident in the data itself, such as collected from the same cast, taken from the same bottle, etc. An example would be the case of a dataset that has a station number but no latitude/longitude values. This utility can be used to add that data from an event log or cruise log data object.

Requirement
The datasets, or data objects, must contain at least one parameter in common. The event number or the station number or the cruise identifier may serve as the common parameter in many objects.

Walk through
The first screen presents 2 frames: the top frame lists the name of the data object that you have started with as object 1. You will be Joining this object with a second object. Now is the time to select Cancel if you want to add sub-selections - eliminating either rows or columns - to this object. To do that, return to the Plotting and Other Operations menu and choose the item Sub-selections of data.

In the bottom frame, you are presented with a selection of "Hosts serving JGOFS Directories" from which you are to choose the second object. Follow the links of categories until you reach this second object. (Note: we are hoping that the process of following category links will be familiar to anyone who used a JGOFS server to display the first object.)

When you click on the second object, the bottom frame of the screen will change to display the second object's specification and its parameter list. If you wish to keep all of the parameters listed, simply check the box labeled, Keep all parameters. On the other hand, if you prefer to select only some of the parameters, do so by clicking on each of the parameters to keep. On some browsers, you may need to hold down the Shift key while selecting. Proceed to the next screen by clicking on Continue.

Now, the screen displays the specifications of both objects, together with the current sub-selections, if any. You are presented with 2 possibilities at this point: Join and Cancel.

Click on the Join button to combine the 2 data objects. Then, you may return to the 'Plotting and Other Operations' menu and use this constructed object to plot, list, or use with any other menu option.

Details
The process of combining 2 data objects is outlined here so as to provide an explanation of the resulting constructed object:

- The second object is read into memory.
- The parameter (variable) list of the newly "constructed" object is the union of the variable lists of the two input objects. The match set of parameters is the intersection of the two lists.
- Record (row) matching is attempted. Records of the two objects match when the values for all parameters in the match set have the same value. Numeric matching is used if both values are numeric, otherwise string matching is used.
- The resulting number of records is the number of records in the first object that have a match with some record in the second object.

Note: it is possible that many records from each object have the same set of values for the match set of variables. In such cases, each record from the first object is matched with the first matching record from the second object. Subsequent matching records from the second object do not appear in the constructed object.