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 open the file cspro.dcf using the File | Open menu. This file is located in the Genstat Examples folder.
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.
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.
- How to load data from files
- How to add data to a spreadsheet
- Using Genstat with Excel
- Genstat spreadsheet file formats
- Spreadsheet limits
The CSPRO procedure can be used to import data directly into the server.