Displayr allows you to visualize data from multiple variables (or questions) in the same chart. The process is different depending on what variable sets you want to show and how similar they are. The simplest method is to create a crosstab to use as the input. However, you may also need to create new variable sets/banners as a way to combine the data together. Below are examples of visualizations you can create with each method:
From a crosstab:
From a Banner table:
By combining similar variables into a Multi variable set first:
By combining similar variable sets into a Grid variable set first:
By combining tables first:
See the description and requirements of each method in the sections below.
- Method - Create a crosstab from two dissimilar variable sets
- Method - Create a banner table from many dissimilar variable sets
- Method - Combine similar variables into a Multi variable set
- Method - Combine similar variable sets into a Grid variable set
- Method - Combine tables of similar variables into a larger table
Requirements
- A data set containing multiple variables that you want to show on the same visualization.
- See any other additional requirements in each section below.
Method - Create a crosstab from two dissimilar variable sets
You can use an existing crosstab to create visualizations, see How to Create a Crosstab. Crosstabs contain results from two different variable sets. Below, is a crosstab that shows age in the rows and gender in the columns:
Both data points can be visualized together:
Steps:
- Select the crosstab on the page.
- From the object inspector, click Visualization and select the appropriate visualization type. (You can also do this from the object inspector if you'd like the table to not be shown after creating the visualization).
- Make any formatting changes in the Data or Chart tab of the object inspector. See Visualization Options for details.
Method - Create a banner table from many dissimilar variable sets
Banners can be used to combine multiple questions (variable sets) that don't use the same values together as rows/columns in a single table, see How to Create and Customize a Banner. Banners are typically placed in the columns of a crosstab, but can be in a Summary table or rows of a table as well. Below is a banner table containing preferred cola in the rows and a demographic banner in the columns:
Which can be visualized as:
Steps:
- Select the table that uses the banner on the page.
- From the toolbar, click Visualization and select the appropriate visualization type and click on the page to place. (You can also do this from the object inspector if you'd like the table to not be shown after creating the visualization).
- Make any formatting changes in the Data or Chart tab of the object inspector. See Visualization Options for details.
Method - Combine similar variables into a Multi variable set
When you have variables that use the same scale (i.e. the same categories, numeric values, scale) you can Combine them into a variable set with a -Multi Structure in order to show them next to one another on the same table and visualization, see How to Combine Variables into a Variable Set for more detail.
In the example below, I have multiple numeric variables that contain data about how many times respondents dined at each fast food restaurant in the last month (on the left) and I've combined them into a Numeric-Multi set on the right to group them together.
You can then create a table of the variable set to use in the chart below.
Steps:
- In the Data Sources tree, select the variables that you want to combine and right-click and select Combine > As Variable Set, see How to Combine Variables into a Variable Set for more detail.
- You can create the visualization from the variable set directly (or by using it in a table first). To use the variable set directly, select it in the Data Sources tree.
- From the toolbar, go to Visualization
and select your desired visualization. In this example, I selected Column > Column.
- Click onto the page to place the visualization.
- This creates a nested table that isn't shown on the page, but that you can modify further via the object inspector > Data tab.
- Make any formatting changes to the visualization in the Data or Chart tab of the object inspector. See Visualization Options for details.
Method - Combine similar variable sets into a Grid variable set
If you have multiple variable sets that contain similar data, such as various things asked about the same brands. You can combine those questions into a grid variable set and then use it as the input for the visualization.
For example, in a survey about fast food restaurants, I have questions about brand awareness for restaurants, whether someone has eaten at the restaurant in the past month, and whether they have ever eaten at the restaurant.
Since these questions have the same answer lists, I can combine them into a single variable set (or grid):
And use that new variable set as the input to a visualization:
Steps:
- OPTIONAL: Right-click and select Duplicate if you wish to retain the original separate variable sets (as combining them into a grid will change all the items using those sets).
- In the Data Sources tree, select the variable sets that you want to combine into the grid. See How to Combine Separate Questions into a Grid in Displayr for specifics related to the Structure and labeling requirements of the variables.
- With the variables selected, right-click and select Combine > As Grid. A new variable set will appear in the Data Sources tree with a grid structure.
- You can create the visualization from the variable set directly (or by using it in a table first). To use the variable set directly, selected it in the Data Sources tree.
- From the toolbar, go to Visualization
and select your desired visualization. In this example, I selected Column > Column.
- Click onto the page to place the visualization.
- This creates a nested table that isn't shown on the page, but that you can modify further via the object inspector > Data tab.
- Make any formatting changes in the Data or Chart tab of the object inspector. See Visualization Options for details.
Method - Combine tables of similar variables into a larger table
If you have multiple variable sets that contain similar but not exactly the same data, it can be hard to reformat things to combine them as a grid (the ideal Method). Instead, you can create an individual table for each set and combine those tables together to create the input for your visualization. Note that stat testing will not be done on the combined table.
You can use the combined table as an input to your visualization just like any other table:
Steps:
- Select the tables that you want to combine and right-click > Combine. See How to Combine Tables in Displayr for more details.
- Select the combined table.
- From the toolbar, click Visualization and select the appropriate visualization type. (You can also do this from the object inspector if you'd like the table to not be shown after creating the visualization).
- Make any formatting changes in the Data or Chart tab of the object inspector. See Visualization Options for details.