Skip to content
Christian Testa edited this page Jul 8, 2016 · 16 revisions

Welcome to the QualtricsTools wiki!

Please refer to some of the other guides in this wiki for purpose-specific instructions. Here, I'll give some example code and functions that one might find helpful.

Installing and Running the Shiny App

Before installing, you must install R or Rstudio, devtools, and Pandoc. Follow the previous links, and there are directions on each page on how to install them. After installing each of these, run the following commands in R:

devtools::install_github("ctesta01/QualtricsTools")
library(QualtricsTools)
QualtricsTools::app()

The QualtricsTools Shiny app should now be running! Enjoy!

Generating Reports with Shiny

better sample survey loaded into shiny

From the QualtricsTools Shiny application, a user can upload a Qualtrics Survey File (QSF) and the exported CSV responses from Qualtrics. If the CSV is from Insights, there are 3 header rows before the response data begins. If the response set is "Legacy" response data, the CSV uses 2 header rows. After uploading and setting the number of header rows, the application will automatically process the survey into four resources: results tables, a question dictionary, text appendices, and display logic. The results tables, text appendices, and display logic can be downloaded as a Microsoft Word document, and the question dictionary can be downloaded as a CSV.

example results tables

Manually Generating a Report

survey <- ask_for_qsf()
responses <- ask_for_csv()
blocks <- blocks_from_survey(survey)
questions <- questions_from_survey(survey)
questions <- remove_trash_questions(questions, blocks)
questions <- clean_question_text(questions)
questions <- human_readable_qtype(questions)
blocks <- remove_trash_blocks(blocks)
questions <- link_responses_to_questions(questions, responses)
questions <- generate_results(questions)
blocks <- questions_into_blocks(questions, blocks)
results_tables <- tabelize_blocks(blocks)
docx_path <- html_to_docx(results_tables)

The above code block is how one would go from start to finish manually using the package's functions to create a docx file containing the results tables for the survey. Of course the Shiny app included handles this automatically for you, but it's nice to see the sequence of events.

Remember, you can use ?QualtricsTools::function_name_goes_here to get the package's documentation for a specific function.

Most Helpful Functions

  • get_setup -- This function takes a couple different optional parameters, but the point is that it will ask you for the QSF, the CSV, automatically process them, and place the output in the global scope in R.
  • uncodeable_question_dictionary -- This creates a question dictionary for only the questions that were not automatically processed. This has been useful for me in debugging the package as I've built it, and also in knowing what's missing from the output. There's a wiki entry on this, check it out!
  • lean_responses -- This function reshapes the responses into data where each row corresponds to an individual response, and each of the columns are descriptions of the question. This is really helpful for getting the data into a useable format for working in software like Tableau.