User Tools

Site Tools


howtos:workwithdata:coordexample

Coordinate Data Format Examples

The following examples will use the array object pop[c,s,t] which contains population data for North America by country, sex, and time where

c is the set country composed of: Canada, US, Mexico

s is the set sex composed of: male, female

t is the sequence time from 2000 to 2004

allCoord=off

If the allCoord parameter is set to off, data from the rightmost index are placed in columns. The import file may appear as follows:

!Years  	2000	2001	2002	2003	2004
Canada  female  12	14	16	18	20
US  	male  	100	120	140	160	180
Mexico 	female  20	22	24	26	28
Canada	male	10	12	14	16	18

Note that with coordinate format, there does not need to be data for every member of the set and the rows can be in any order. (In the above example, US female and Mexico male are not in the file.) However, the row labels in the import file must match the element names of the set. TOOL matches the labels to the element names to determine where to put the data in the object array.

allCoord=on

If the allCoord parameter is set to on, all data are in a single column. The import file may appear as follows:

Canada  female  2000	12	
Canada	female	2001	14	
Canada  female  2002	16	
Canada  female  2003	18	
Canada  female  2004	20
US  	male  	2000	100	
US  	male  	2001	120	
US  	male  	2002	140	
US  	male  	2003	160	
US  	male  	2004	180
Mexico 	female  2000	20	
Mexico 	female  2001	22
Mexico 	female  2002	24
Mexico 	female  2003	26
Mexico 	female  2004	28
Canada	male	2000	10	
Canada	male	2001	12	
Canada	male	2002	14	
Canada	male	2003	16	
Canada	male	2004	18
howtos/workwithdata/coordexample.txt · Last modified: 2010/01/19 16:28 by deryn.crockett