Data editing > Data-mapped variables > Advantages of data-mapping files
 
Advantages of data-mapping files
A data-mapping file contains information about what is contained in a data file and where specific information is located within it. The Quancept data acquisition package produces such a file, the project qdi (questionnaire data information) file. This file contains details of all the variables defined, their possible values (that is, the possible responses), and where the information for particular variables is located in the data records.
There are many advantages of using a data-mapping files, for example:
Refer to data fields by name
Instead of having to specify the columns which refer to the data, you can use the names they were given in the data-mapping file. You do not need to write specifications to transfer this information — it happens automatically in the same way as Quantum automatically sets entries in the C array according to the data read in. This means that Quantum will set the values of data-mapped variables for variables whose names appear in the mapping file that is being used.
Refer to responses by name
The data-mapping file contains the column and code values for each of the responses in a categorical question. Because of this, there is no need to write this in your Quantum specifications; you can just refer to the response text itself. At first, this may seem a bit cumbersome, for example, it may seem easier to write:
c=c233'1'
as opposed to:
c=opinions$I liked the first brand much more than the second$
However, you do not need to specify the whole response text, just enough to uniquely identify it. (In addition, it is very likely that the specifications will have been automatically generated rather than handwritten.) The above example could therefore be written as:
c=opinions$I liked\$
You type in the characters which uniquely identify the text and then append the \ character to ignore the remaining characters in the string.
Recoding is not required if the data layout changes
When referring to data fields by name, and response codes by the response text, the data locations are derived entirely from the data-mapping files. The advantage of this is that if the data layout changes, all you need to do is use the data-mapping file for the new data set. Furthermore, Quantum lets you analyze many data sets with many different mapping files — all in the same run. You do not need to write complex recoding specifications as this is handled automatically, which in turn, means less chance of error.
Automatically generate specifications
Data-mapping files can contain a complete description of one or more data files. This can include field names, response texts and their locations. In fact, everything that would be required to generate the main body of a Quantum run can be held in data-mapping files and the Quantum specifications can be generated automatically. Obviously, there will always be some reason why specifications generated in this way would need to be manually adjusted, but this can be kept to a minimum freeing you from the routine tasks (where mistakes are likely). This allows you to concentrate on the more complex requirements.
For more information about generating a Quantum specification automatically, see Automatically generating a Quantum spec.
All this does not mean that you must have data-mapping files to use data-mapped variables. However, without a data-mapping file, you would have to manually load values into the data-mapped variables, which removes many of these advantages.
See also
Data-mapped variables