The steps required to use a data file that contains no or limited metadata, such as Excel files, CSV files, and SQL databases, will depend upon how it has been created. It is generally difficult-to-impossible to correctly set up a CSV or Excel file without both access to the questionnaire and access to the person who exported the CSV file. The process will be much easier if the file has been created in accordance with the Excel and CSV Data File Specifications (and better yet if in a better file different format).
Setting up a CSV or Excel File
- Select Anything > Data > Data Set > Add, or click the button to the right of the Data Sets tree.
- On the next screen, select My Computer then navigate to and select your Excel or CSV file and then click Open.
- Copy each variable label from the source file, then go back into Displayr and select the corresponding variable. In the object inspector on the right, go to Properties > Label and then paste in the label.
- From the Data Sets tree, hold down your Ctrl key and select all the variables with the same code frame and then click Values from the object inspector. To select variables from one contiguous group, click on the first variable, hold down the Shift key, and then click on the last variable in the group. To also select data from a non-contiguous group of variables, hold down the Ctrl key and click on the next group of variables.
- Type in the correct value labels (e.g., 0 = Not selected and 1 = Selected). Alternatively, you can select Import from the Values Attributes dialogue box and paste the labels in (it can be helpful to first Export the value labels within Displayr and then paste them into Excel to ensure the format that Displayr anticipates for the labels.
- For each of the remaining variables, click the Values button and enter the correct value labels.
- Select the variable set that corresponds to the first multiple-response question. Ensure that the Structure and Label of the question are correct. Click OK.
- Click the Values button to view the Value Attributes dialog box, so you can confirm that the correct values are being counted.
- Repeat this process for all the questions in the file.
- To fix any other more-advanced metadata issues that might be present, see How to Fix Metadata Issues in Displayr.
Setting up when all the variables are Text
Sometimes CSV files contain all text. For example, rather than recording, say, a 1 for male the file instead contains Male. In such instances, the first things to be done are:
- Select each of the variables with a Structure of Text.
- Change the Structure (e.g., to Categorical if that is appropriate).
- Select Publish > Export Data > Download as SPSS File (.SAV) and save it as a .sav file.
- Import the newly-created file as a new data file.
Setting up an SQL database
When importing an SQL Database, you need to follow all the steps described above for a CSV file.
You can click the button in the Data Sets tree and select SQL. See How to Import Data from SQL for more information.