ropensci / qualtRics

Download ⬇️ Qualtrics survey data directly into R!
https://docs.ropensci.org/qualtRics
Other
215 stars 70 forks source link

Question: how do you actually use `column_map`? #283

Closed svenhalvorson closed 2 years ago

svenhalvorson commented 2 years ago

Hey ya'll,

I have been using the Qualtrics API for about a year and found the column_map from your library's use of this API call very interesting. I thought that the exportColumnMap was supposed to give information about the columns that you would get from exporting the responses but it does not. Example:

image

Will export 3 columns (one for the radio and two for the text entries) but column_map gives:

image

Which doesn't associate two choices with text entry. There are other examples.

I went through a tech support conversation with them and they said this is the intended behavior. My question is, how do you actually use this call given that the values in qname are not a 1:1 mapping to the column names qualtrics will export? Does anyone have methods of converting column_map to the actual exported names? Or am I missing the point of this API call?

Thanks

jmobrien commented 2 years ago

The column_map() points to the older v2 survey endpoint (which is not the one you linked, actually). This feature can be inaccurate for various reasons. I couldn't diagnose what happened in your case without more information, but it doesn't matter--there's a new function extract_colmap() that can be applied to a response data frame (that was downloaded with add_column_map = TRUE, the default). That should produce a more consistent column map.

That said, in both the older and newer versions the way that Qualtrics provides can be less-than-intuitive, like marking text-entry fields with name extensions (_TEXT) or a variable flag (textEntry) depending on situation, but not both.

The function for extracting the new column map does incorporate a few more things that should help, and more broadly this is an area that's a work in progress, but for now you may just need to spend some time reviewing it to get to know where the info is for your use case.