Data manipulation in Displayr involves the creation and manipulation of variable sets. This article describes how to combine, split, duplicate, change the values of, reset, and create new variable sets.
Combining and splitting variable sets
Variable sets can be grouped together, by selecting them and pressing Combine. They can be split into multiple variable sets, each of which contains one variable, by pressing Split.
Duplicating variable sets
It can be useful to have multiple versions of the same data. For example, maybe you want to show age in some analyses with all its categories, and in other analyses grouped into Under 45 and 45 or more. This is done by selecting a variable set and pressing Duplicate, and then modifying the duplicate as per your needs.
Some new users are reticent to do this, as they fear that the app will slow down as the resulting data file gets larger. However, duplicating a variable set does not duplicate the underlying data, so this concern isn't justified.
Changing the structure of a variable set
As a quick recap on the previous section describing Variable Sets, the structure of a variable set determines how it is shown in a table. You can change the structure of a variable set to perform different types of analyses. The table below summarizes a Ordinal - Multi variable set, showing rating categories across brands.
Sometimes it is useful to restructure variable sets that show as multiple rows and columns so the data is more readily crosstabbed with banners and other variable sets. For example, you can show a Top 2 Box of the percentage of people who selected Love or Like (a Top 2 Box), by changing the variable set's Structure > Binary-Multi and checking Count This Value for Like and Love categories in the Value Attributes, see How to Create Top Two Category Variable(s) (Top 2 Boxes) for more detail.
We can also see the average of the numeric ratings instead of percentages for each rating category by changing Structure > Numeric - Multi:
Changing the values of variables (recoding Value Attributes)
In the Variable Sets article, you learned how the Value Attributes of are used in calculations. You can modify these Value Attributes as needed to ensure your calculations are being performed as expected. This is especially important when you are working with a data set that did not have meta data, as the underlying Values for categories are arbitrarily assigned.
For example, the variable set above may be on a scale of 1 to 5 or -2 to 2. These two scales would give you very different averages. You can confirm and change the settings to whatever you want through object inspector > Properties > General > DATA VALUES > Values.
You can edit all of this information in the window directly or use the Export and Import buttons to copy and paste the information to Excel for faster editing. Hovering over a label or value will show you the original as it was on Import. You can always reset the Value Attributes to their original state by clicking on object inspector > DATA VALUES > Reset.
You can reset the various attributes of a variable set by selecting the variable and clicking the Reset menu.
Creating new variables
In addition to creating new variable sets by duplicating them and modifying them, you can also create new variables by clicking the floating + button that appears when you hover over variables in the Data Sets tree, as shown below. Common ways of creating new variables include:
- Ready-Made New Variables, which contain the most common ways of creating new variables. For example, the recording below shows the creating of an NPS variable.
- Text Categorization, which involves converting text data into categorical or numeric variables.