Point-and-Click Interface for Creating Categorical Variables
V
Vian de Villiers
Problem
Researchers often need to create new categorical variables based on conditions from existing variables (e.g., grouping a numeric variable into bands).
Currently, this requires writing conditional JavaScript, such as:
if (sumCola < 5) 1;
else if (sumCola >= 5 && sumCola <= 10) 2;
else if (sumCola > 10) 3;
else NaN;
This creates a barrier for non-technical users and increases the likelihood of syntax errors.
Proposed Feature
Introduce a point-and-click interface for creating new categorical variables using logical conditions.
What It Should Do:
* Allow users to select an existing variable
* Define conditions using dropdowns (e.g., <, <=, >, between)
* Add multiple condition rows visually
* Automatically assign category values and labels
* Generate the underlying logic without requiring JavaScript
Impact:
* Removes reliance on code
* Reduces errors
*Makes variable creation faster and more accessible for all researchers