Created
March 9, 2023 15:47
-
-
Save embruna/8f58832f5392e68c853978392594f21e to your computer and use it in GitHub Desktop.
Qualtrics_with_R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# posts / tutorials -------------------------------------------------------- | |
# https://www.adrianbruegger.com/post/import-qualtrics-csv-files/ | |
# https://www3.nd.edu/~sberry5/qualtricsAPI.html | |
# https://blogs.uoregon.edu/rclub/2016/05/18/bringing-in-qualtrics-and-other-data/ | |
# https://druedin.com/2019/12/01/getting-qualtrics-data-into-r/ | |
# the 'qualtRics' package ------------------------------------------------- | |
# https://github.com/ropensci/qualtRics | |
# "The qualtRics R package implements the retrieval of survey data using the | |
# Qualtrics API and aims to reduce the pre-processing steps needed | |
# in analyzing such survey" | |
# how to get qualtrics API key | |
# https://api.qualtrics.com/instructions/docs/Instructions/api-key-authentication.md | |
# vignettes | |
# 1) https://cran.rstudio.com/web/packages/qualtRics/vignettes/qualtRics.html | |
# | |
# 2) https://cran.r-project.org/web/packages/qualtRics/qualtRics.pdf | |
# install.packages('qualtRics') | |
library(qualtRics) | |
qualtrics_api_credentials(api_key = "-------", | |
base_url = "ufl.ca1.qualtrics.com", | |
install = TRUE, | |
overwrite = TRUE) | |
# Once your Qualtrics API credentials are stored, you can see what surveys | |
# are available to you. | |
library(qualtRics) | |
surveys <- all_surveys() | |
surveys[1] # id numbers of the surveys | |
mysurvey <- fetch_survey(surveyID = surveys$id[1], | |
verbose = TRUE) | |
# what are the questions in a certain survey? | |
questions <- survey_questions(surveyID = surveys$id[1]) | |
questions$question[5] | |
mysurvey <- fetch_survey(surveyID = surveys$id[1], | |
save_dir = "./---/data_raw", | |
verbose = TRUE, | |
force_request = TRUE) | |
mysurvey <- readRDS(file = "./----/data_raw/filenamne.rds") | |
# the 'QualtricsTools' package -------------------------------------------- | |
# https://github.com/emma-morgan/QualtricsTools | |
# "QualtricsTools is an R package that automatically processes Qualtrics survey | |
# data into reports breaking down the responses to each question. | |
# The package creates reports that summarize the results of closed-ended | |
# questions, compiles appendices of open-ended text responses, and generates | |
# question dictionaries that describe the details of each survey question." | |
# devtools::install_github("emmamorgan-tufts/QualtricsTools") | |
library(QualtricsTools) | |
app() | |
# Load and Process Survey Data into R | |
get_setup() | |
# Start and run the Shiny app | |
app() | |
# Create a Report of Question Results Tables | |
make_results_tables() | |
# Create a Report of Text Appendices, for each free response part of the survey | |
make_text_appendices() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment