Deriving a list or geospatial field
There are occasions when data that should be recorded as a list item is imported into SPSS® Modeler with the wrong attributes. For example, as separate geospatial fields, such as an x coordinate and a y coordinate, or a longitude and latitude, as individual rows in a .csv file. In this situation, you must combine the individual fields into a single list field; one way to do this is by using the Derive node.
- In your stream, attach a Derive node to your Source node.
- On the Settings tab of the Derive node, select Formula from the Derive as list.
- In Field Type select either Collection for a
non-geospatial list, or Geospatial. By default, SPSS Modeler uses a "best guess" approach to
set the correct list detail; you can select Specify... to open the
Values dialog box. This dialog can be used for a collection to enter further
information about the data in your list, and for geospatial it can be used to set the type of the
data and specify the coordinate system of the data.Note: For geospatial, the coordinate system you specify must exactly match the coordinate system of the data. If this is not the case, geospatial functionality will produce incorrect results.
- In the Formula pane, enter the formula to combine your data into the
correct list format. Alternatively, click the calculator button to open the Expression Builder.
A simple example of a formula to derive a list is [x, y], where x and y are separate fields in the data source. The new derived field that is created is a list where the value for each record is the concatenated x and y values for that record.
Note: Fields that are combined into a list in this way must have the same storage type.
For more information about lists, and depths of lists, see List storage and associated measurement levels.