jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

Show variable labels of sav files when hovering variables #1190

Open keunes opened 3 years ago

keunes commented 3 years ago
* Enhancement: Import the question titles/labels when opening sav file, instead of the question code * Purpose: Make analysis easier * Use-case: Importing an sav file from SurveyMonkey and run basic stats **Describe the solution you'd like** Automatically pick up the questions, just as happens when importing a CSV file. **Additional context**

As noted the sav file comes from SurveyMonkey - I'm not sure it actually actually contains the questions (though that would surprise me). I tried opening in a text editor, but that provides garble. I tried to edit the data (supposedly the questions can be edited there) but ran into #1189.

boutinb commented 3 years ago

Can't you save the file in csv format from SPSS? I thought the labels were also loaded in JASP, could you send me your save file?

keunes commented 3 years ago

@boutinb I have three formats that I downloaded from SurveyMonkey, and indeed I could open a sav file and save it as a csv. The thing is:

I would like the combo of having numerical values, with the labels (for ordinal/nominal variables), and also the questions. Now, I am not sure, but I would expect the questions are available in the SPSS file that SurveyMonkey exports. But maybe I'm wrong and SurveyMonkey does not include the question texts in the sav export? (which would be odd, given that it does include the texts in the csv export).

could you send me your save file?

I'm afraid not - we included a prize draw so the dataset contains personal data. And I don't think it's posible to manipulate which columns (questions) are included in the download. Do you know if a sav file can be 'inspected' in any other way, to see if it might somewhere contain the question texts?

If not, next week I could do a dummy survey in SurveyMonkey, reply a few times, and export the sav file to share with you.

keunes commented 3 years ago

I just managed to get an SPSS trial installed, and opened the same data file.

The file does contain the question labels: image

In the dataset view, SPSS also just display the question codes: image

But a hover reveals the label: image

Maybe my request should be changed to "Display question label in the Analysis screen"

That's what SPSS does, and it makes analysis a whole lot easier: image

Currently in JASP: image

boutinb commented 3 years ago

Hi @keunes, a big disadvantage with question label, is that they can be quite long, making it quite unclear in a Variables List to see exactly which question it is: as the variable name must be cut to fit the width of the list, and as many questions may start with the same words, many variable names would look the same (only if your cursor is on it, the whole question is then displayed in a tooltip). One solution would be to import both question names & labels, so that the names are displayed in the variable list, but the labels are displayed in the tooltip (when the cursor is on a variable). But that can be quite some work to implement. Another easier solution would be to have a setting somewhere to specify to import the question labels in place of the question names in a sav file: you would have the disadvantage to have this long names, but you would have at least the choice.

keunes commented 3 years ago

One solution would be to import both question names & labels, so that the names are displayed in the variable list, but the labels are displayed in the tooltip (when the cursor is on a variable).

I think that should be the way to go. Personally I typically prefer waiting longer for a proper fix, than waiting shorter for a workaround :)

tomtomme commented 8 months ago

@JorisGoosen & @keunes Since data edit mode we have the "Description" field for every variable - do we already import the descriptions from SAV files there? Then it should be easy to show a popup, that shows the full description, when one is hovering above a variable e.g. within the variable list in computed columns or within the variable list within an analysis. Or is this harder than I imagine?

We also have the "Long name" field. I do not think that SPSS has an equivalent for this and wonder where and how it could be used. Maybe it would be nice to be able to switch between "Name" and "Long name" in variable lists or even in data edit mode etc.

JorisGoosen commented 8 months ago

We do not yet get this information from spss files.

Adding the short and long label would probably not be too much work. But before we get on that we are going to work on some more refactoring of the underlying code for the variables.

Like for instance https://github.com/jasp-stats/jasp-desktop/pull/5367 Once that is done I can have a look at https://github.com/jasp-stats/jasp-issues/issues/2500 and getting as much info from readstat as possible.

tomtomme commented 3 months ago

@keunes We now have such a pop-up in data-view via 0.19 beta: Screenshot_20240527_131516

This is from an imported SAV. However there is no such popup yet in the analysis-view, so I will mark this one for 0.20. Maybe this it can be included then.

JorisGoosen commented 3 months ago

Would be good to inventarise where one would need to see these tooltips.

tomtomme commented 3 months ago

Thats it already. Showing them in the results / tables / plots is not as important because there the process of finding the right vars to analyse is already done