User Tools

Site Tools


howtos:workwithdata:importing_and_tabulating_record-based_datasets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:workwithdata:importing_and_tabulating_record-based_datasets [2011/06/09 18:28]
chris.strashok
howtos:workwithdata:importing_and_tabulating_record-based_datasets [2011/06/24 18:55] (current)
chris.strashok
Line 1: Line 1:
 ====== Importing and Tabulating Record Based Datasets ====== ====== Importing and Tabulating Record Based Datasets ======
  
-The record dataFormat option for the create tool allows you to read in a source data file into a two dimensional variable consisting of a numerical record id and a user defiend ​set of fields. This technique requires the format of the source data to have unique column descriptions with fields are usually related in some way. This technique is useful for:+The record dataFormat option for the create tool allows you to read in a source data file into a two dimensional variable consisting of a numerical record id and a user defined ​set of fields. This technique requires the format of the source data to have unique column descriptions with fields ​that are usually related in some way. This technique is useful for:
  
 [[importing_and_tabulating_record-based_datasets#​creating sets from source data|creating sets from source data]]; \\ [[importing_and_tabulating_record-based_datasets#​creating sets from source data|creating sets from source data]]; \\
Line 14: Line 14:
 ===== creating sets from source data ===== ===== creating sets from source data =====
  
-The create-fieldname parameter in the sample code below allows you to populate a pre-defined informant from your source data file. In this example the data is based on age and region, so we are intereseted in creating informants for these two parameters. We can either use these informants directly in the model structure or they can be mapped to an existing informant.+The create-fieldname parameter in the sample code below allows you to populate a pre-defined informant from your source data file. In this example the data is based on age and region, so we are intereseted in creating informants for these two parameters. We can either use these informants directly in the model structure or they can be [[howtos:​toolcoding:​using_maps|mapped]] to an existing informant.
  
 <​code>​ <​code>​
Line 20: Line 20:
  file=$fullFileName,​ firstLine=1,​ delimiter=",",​ \  file=$fullFileName,​ firstLine=1,​ delimiter=",",​ \
  replaceWhiteSpaceInData="​_",​ \  replaceWhiteSpaceInData="​_",​ \
- indexTo-Column_A=Column_A,​ create-Column_A=on,​ \+ indexTo-Column_A=Column_A,​ create-Column_A=on,​ \ (the create-Column parameter is only required if the corresponding informant has not already been created)
  indexTo-Column_C=Column_C,​ create-Column_C=on,​ \  indexTo-Column_C=Column_C,​ create-Column_C=on,​ \
  takeField=Column_F,​ \  takeField=Column_F,​ \
Line 32: Line 32:
 </​code>​ </​code>​
  
-{{:​howtos:​workwithdata:​record-format-ex1.gif|{{:​howtos:​workwithdata:​record_format_ex1_rev1.jpg|}}}}+{{:​howtos:​workwithdata:​record-format-ex1.gif|{{:​howtos:​workwithdata:​record_format_ex1_rev1.jpg|}}
 \\ \\
 [[importing_and_tabulating_record-based_datasets#​Importing and Tabulating Record Based Datasets|back to top]] [[importing_and_tabulating_record-based_datasets#​Importing and Tabulating Record Based Datasets|back to top]]
Line 62: Line 62:
  replaceWhiteSpaceInData="​_",​ \  replaceWhiteSpaceInData="​_",​ \
  takefield=Column_A,​ \  takefield=Column_A,​ \
- indexTo-Column_C=Column_C,​ create-Column_C=on,​ \+ indexTo-Column_C=Column_C,​ create-Column_C=on,​ \ (the create-Column parameter is only required if the corresponding informant has not already been created)
  takeField=Column_I)  takeField=Column_I)
  
howtos/workwithdata/importing_and_tabulating_record-based_datasets.1307644081.txt.gz ยท Last modified: 2011/06/09 18:28 by chris.strashok