Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag duplicates variable labels #5

Open
arthur-shaw opened this issue Dec 21, 2023 · 0 comments
Open

Flag duplicates variable labels #5

arthur-shaw opened this issue Dec 21, 2023 · 0 comments
Labels
variable 🔢 Variable label

Comments

@arthur-shaw
Copy link
Contributor

arthur-shaw commented Dec 21, 2023

Problem

Duplicate variable labels might arise in two ways. First, Survey Solutions' variable labels for multi-component variables might be the same for all components if the variable label reaches the 80-character limit before the component label can be added. For example, a multi-select question might have question text used as its label that is so long that the multi-select answer option component does not appear in the variable label. Second, data users might accidentally apply to the same variable label to more than one variable.

To identify these issues, one needs a means of listing variables with duplicate variable labels and, potentially, of asserting that no duplicate variable labels exist.

Implementation ideas

Somehow, one would need to create a data set of varname and varlabel. From there, it's a matter of removing missing labels and using duplicates, list to communicate where duplicate variable labels lie. This would need to occur with preserve - restore combo to revert to the data in memory before looking for duplicate variable labels.

The uselabel command does something similar, but only for value labels.

The describe, replace does what's needed, replacing the data in memory with the contents a data set of variable metadata.

@arthur-shaw arthur-shaw added the variable 🔢 Variable label label Dec 21, 2023
@arthur-shaw arthur-shaw changed the title Add command to flag duplicates variable labels Flag duplicates variable labels Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
variable 🔢 Variable label
Projects
None yet
Development

No branches or pull requests

1 participant