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 on 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 Tips to Get an Excel or CSV File Working Well in Displayr (and better yet, if in a better file format). Note that if you are looking to instead import tables of data from Excel that are already calculated, then see How to Import Excel Tables into Displayr.
Setting up a CSV or Excel File
- In the Data Sources tree, click + Add Data or the + sign.
- Expand the Advanced data file options section and update the Data format to Data Set.
- Click Upload file, navigate to and select your Excel or CSV file, and then click Open.
- The Excel file will appear in the Data Sources tree as a data set.
- Copy each variable label from the source file, then go back into Displayr and select the corresponding variable. In the object inspector, go to General > General > Label and then paste in the label.
- From the Data Sources tree, hold down your Ctrl key, select all the variables with the same code frame, and then click Data > Properties > 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 Nominal (for categorical) if that is appropriate.
- Select Share > 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 a 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 Sources tree and select SQL. See How to Import Data by Connecting to an SQL Database for more information.
Next
How to Fix Metadata Issues in Displayr