This example shows the steps for importing data from a CSPro survey. The questionnaire setup and data for a village survey in Africa are stored in two files: cspro.dcf and cspro.dat. The survey contains two records: person and housing. There is a page of data on each person including information on their age, sex, martial status, education, literacy, work and family. The information on each house includes data on the size, facilities, rental status and occupants. There are a number of value sets for some columns that label the numeric codes for these. Some columns have multiple value sets that group the codes in a number of different ways: for example, age has a number of groupings, one for grouping into 5 year bands, another for grouping into 10 year bands, and one for a ten year grouping ignoring those under 10 years old. The value set information can be displayed on a separate page if required.
- To import data from the survey select File | Open then locate the file
cspro.dcf and click Open.
The default location for this file on a Windows PC is C:\Program Files\GenxxEd\Examples.
Once the .dcf has been opened you must select the CSPro data file that is described by this .dcf file. Usually this file will have the same name but with the extension .dat. However, if another extension has been used you can use the file open dialog to select the file.
- Select the file CSPro.dat and click Open. (This file will be in the same folder as the previous file)
After both files have been selected a dialog appears where you can the level and records from the file using the select records dialog.
When the level and records have been selected a second dialog will appear where you can select items within the chosen records.
Using the default options when selecting records and items will produce the following spreadsheet:
- Select records from CSPro survey file
- Select items from CSPro survey file
- How to import or export data
- Supported data file formats for a full listing of the data and spreadsheet file formats that Genstat can import or export.
- Using Genstat with Excel
- Genstat spreadsheet file formats
- Spreadsheet limits
The CSPRO procedure can be used to import data directly into the server.