Displayr allows you to categorize your numeric data, for example, "How many years has your business been operating?" or "How old are you?" and the respondent entered a number as their answer. This article describes how to go from having data that is numeric to allocating the numbers into categories as numeric ranges or buckets.
The benefits of categorizing are:
- Allows you to avoid creating categories upfront in your survey question, for when you do not yet understand your market.
- Dynamically create and adjust categories/buckets that suit the distribution of your responses (i.e. if you get a lot of young people answering your survey, you can specify lots of young age categories).
- View percentages instead of an average.
- Break down other questions in your survey by the newly created categories.
- Log in to Displayr and select + Add New to start a new document.
- Select Anything > Data > Data Sets > Add.
- Select My Computer and upload a data set. The data set called bus phone survey.sav has been used in this example.
- Drag Years of operation of business (numeric) from Data Sets tree onto the page and you will get a table that looks similar to below.
- With the table selected, click on Anything > Visualization > Legacy Charts > Histograms to convert your table into a histogram.
- With the chart selected, click the Histogram ribbon tab.
- Click the Categories button.
- This is the tool that will allow you to allocate the numeric data into categories
- Observe that the options are:
- Do not generate categories – currently selected
- Generate categories with equal proportions – this is a starting point, where the data is categorized into 3 categories with equal proportions (e.g. 33%, or as close as it can be, according to the data)
- Generate categories with equal intervals – this is an alternative starting point, where the 3 categories are equally spaced between the minimum and maximum.
- Choose Generate categories with equal proportions.
- Observe that 2 red lines have been overlayed on top of the histogram.
- Behind the scenes, a new data item has been added which represents the percentages of people in each category. The labels of the data match the labels shown above the histogram (“Less than 11,” “11 – 24” and “25 or more”).
- OPTIONAL: You may customize the categories. For example:
- Change the number of categories to 4 by clicking the Categories button again, and changing the number of categories from 3 to 4. A new red line is added on top of the histogram.
- Change the category cutoff points. For example, click on the first red line so it appears selected. Once it appears selected (a new grey rectangle appears around it), click and drag the line to the left or right to change its cutoff point. Once you let go of your mouse, you can observe that the category labels and percentages update automatically. (Tip: when the red lines are overlapping the blue bins, they can be difficult to select. You can change the category cutoff point in the object inspector under Chart > CATEGORY LINE > Category cutoff point.)
- You may now use the new categorized data in other charts or tables:
- Drag Q4. The businesses number of locations from under Data Sets tree onto the page.
- Change it to a chart using Anything > Visualization > Legacy Charts > Miscellaneous > Grid of bars chart.
- In Inputs > DATA > Columns, select the new data Histogram categories - Q5. Years of operation of business (numeric). (Tip: This new data will be at the bottom of the list, not the top!)
- Observe that the chart now shows the data by your categories.
- OPTIONAL: You can change the labels by selecting the variable Histogram categories - Q5. Years of operation of business (numeric) in the Data Sets tree and then clicking the Labels button in the DATA VALUES section of object inspector and entering new labels.
- OPTIONAL: Displayr will normally infer that this data is Numeric, however, if the data is Text, you will first need to convert it to Numeric using Data Manipulation > Structure > Average.
Now that you have made category data, there are two important points to note about Displayr in general that will make you work better:
- Displayr is dynamic: if you further customize your categories in the histogram (e.g. changing the cutoff points or category labels), that will automatically flow through to any chart that shows this categorized data.
- If you make a mistake when categorizing, you can use the Undo button at any time.