Overview
When writing a thesis, a paper, or conducting market research, surveys are among the most frequently used and reliable alternatives to pre-existing datasets. Qualtrics allows one to create professional surveys to obtain data from respondents. Being able to integrate such results with statistical software is crucial for performing more advanced data analysis and gaining relevant insights.
Among the advantages of surveys are the ability to:
- target a specific population;
- tailor questions to one’s exact research needs;
- generate data that would not otherwise exist for novel research ideas.
In terms of drawbacks, surveys often suffer from the following issues:
- limited generalizability to the entire population due to potential biases that can affect the data;
- difficult to design optimally;
- despite the substantial amount of work required, lower rigor when compared to pre-existing datasets.
It is essential to be aware of survey data collection limitations to account for possible biases when designing questions.
Design your own survey
During the design phase, a general rule of thumb is to ask broad and general questions at the beginning (e.g., gender, age), followed by more specific questions (e.g., strictly related to research question), and finally more easy to answer questions (e.g., demographics) at the end of the questionnaire.
While drafitng the questions, one should consider that:
-
the survey must align with the main research question and target sample. Always think about your respondents and tailor your questions to them;
-
at the outset of the survey, include an exclusion question to filter out respondents who do not fall within your target audience. For instance, if you are focusing on married couples, the initial question could inquire about the respondent’s current relationship status;
-
survey length is crucial; typically, respondents should be able to complete it within 5 to 10 minutes. Beyond this threshold, an increasing number of respondents are likely to drop out;
-
avoid complex (e.g., technical jargon) and loaded (e.g., unjustified assumptions about the respondent) questions as well as non-specific ones (e.g., asking two or more questions at once).
Qualtrics
This section provides a step-by-step guide to designing a survey in Qualtrics.
- Sign in/sign up on Qualtrics here, and you will be directed to your Qualtrics homepage which should resemble the image below.
-
Click Create a survey to start creating your survey from scratch, or click Create a New Project to access survey templates and guided projects. Then, click Survey to begin.
-
Enter the name of your survey and then select Create a blank survey project to access the survey editor.
- Within the survey editor you will find Qualtrics' most relevant features to help you create your online survey.
(A): tabs that allow you to build and edit survey features. For now, we will focus on the default tab (builder).
(B): select the most appropriate question type and customise it according to your needs.
(C): type your actual questions and all the available answers.
(D): once the survey is complete, you can generate a preview to identify and address any potential issues, and then publish it.
R
The qualtRics R package is designed to facilitate the retrieval of survey data through the Qualtrics API with the goal of streamlining the preprocessing required for the analysis of these surveys.
This package offers an alternative to manually downloading surveys from Qualtrics and then importing them into R. Moreover, it allows to update your dataset in real time without having to download an updated version and upload it again into R.
The following points will guide you to successfully importing your survey data into R by using the Qualtrics API:
-
Log in to your Qualtrics profile and navigate to
Account
Settings
>Qualtrics
IDs
. Your instituion must support API access, and you should ensure that the API is enabled for your account. If you’re unsure, get in touch with your research support team. -
Within
Qualtrics IDs
, you are going to need yourAPI Token
(click geneate token if you don’t have one),Datacenter ID
, andSurvey ID
. -
Open RStudio and follow the code snippets below.
# You need to install the package only once in your environment
install.packages("qualtRics")
library(qualtRics)
# API info
qualtrics_api_credentials(api_key = "ADD_YOUR_API_Token",
base_url = "ADD_YOUR_DATACENTER_ID.qualtrics.com/",
install = TRUE,
overwrite = TRUE)
readRenviron("~/.Renviron")
Using readRenviron("~/.Renviron")
enables you to reload your environment and use your credentials without having to restart R.
# List of all your available surveys
surveys <- all_surveys()
# Select survey to download
mysurvey <- fetch_survey(surveyID = surveys$id[1], # Open "surveys" and replace "1" with the position of the survey you want to download
force_request = TRUE) # Needed to update "mysurvey" with new responses if still active
After you have worked with your data, you can export the new file as a .csv
file.
Python
If you are a Python user, the package QualtricsAPI allows you to leverage the Qualtrics API to upload data to your local environment and proceed with the required analysis.
To successfully use the package it is necessary to have access to one’s personal Qualtrics API. Points 1 and 2 of the R section still hold here.
Open your Python environment and follow the code snippets below.
Import the Credentials
module to create variables that store your Qualtrics API credentials.
Set up your credentials (see numbered list within the R section for a step-by-step guide).
Credentials().qualtrics_api_credentials(token = "ADD_YOUR_API_Token", data_center = "ADD_YOUR_DATACENTER_ID", directory_id = "ADD_YOUR_DIRECTORY_ID")
Import the Responses
module to download your survey questions and responses to your local environment.
All your survey responses should be downloaded now, you can start working with your data.
This article introduced you to creating online surveys.
- Consider the pros and cons of gathering data through an online survey to determine whether conducting a survey is the optimal choice in your specific case.
- Learn how to design a survey and practically implement it in Qualtrics.
- Explore how to export data (survey responses) from Qualtrics to
R
andPython
using the Qualtrics API.