Code Monkey home page Code Monkey logo

qualtricsinr's Introduction

R-CMD-check

You can find the official documentation here.

QualtricsInR

The QualtricsInR package provides a general R wrapper for the Qualtrics API v3 references. The package is built accross the main API calls to manipulate survey objects and responses, as well as general survey and account admnistration functions.

The package was created in order to address the needs of large scale survey projects where the management and handling of multiple surveys can benefit from automation through the API.

There are other important R packages available to automate different aspects of survey manipulation in Qualtrics. The qualtRics R package implements the retrieval of survey data using the Qualtrics API and is currently the only package on CRAN that offers such functionality.

Other related packages are available through Github. Jason Bryer’s R package to work with the previous version of the Qualtrics API. QualtricsTools creates automatic reports in shiny and qsurvey, by James Dunham, focuses on testing and review of surveys before fielding, as well as the analysis of responses afterward.

Getting Started

You can install QualtricsInR from github using the devtools package.

devtools::install_github('ppssphysics/QualtricsInR')

The package is made available on GitHub in order to collect feedback from the community before we consider a submission to CRAN.

Authentication

We provide two authentication methods to set-up your Qualtrics credentials:

  1. Using a plain Token
  2. Using the OAuth 2.0

Both are valid methods. All information on how to retrieve identification parameters and generete tokens from your Qualtrics account can be found here.

Setting a plain text API Token

For convenience, we recommend you define your API token and Qualtrics Data Center ID (optional) in your .Renviron with the names QUALTRICSINR_TOKEN and QUALTRICSINR_DATA_CENTER respectively. Upon loading the QualtricsInR package, your credentials will be automatically set as internal encrypted parameters.

You can always custom set your credentials by calling the set_qualtrics_opts() function:

# set auth options assuming definition in .Renviron
set_qualtrics_opts()
# set auth options by hand
set_qualtrics_opts("9ssssss83jsl83282032932sds2", "mydatacenter")

If you use this method, you will have set your credentials for every new session.

Setting-up an OAuth Client Manager

To generate an OAuth application, follow the steps below in your Qualtrics account:

  1. Go to Account Settings
  2. Create an OAuth application
  3. Use the client id, client secret, and data center id in qualtrics_auth, as below.
qualtrics_auth(id = "xXxxX0X0x", secret = "xXxxX0X0x", data_center = "my.center")

This will authenticate you, returning a bearer token valid for one hour, saving the encrypted credentials in a .qualtrics-oauth file, which will be automatically loaded in all subsequent sessions and automatically refreshed if need be. You should therefore only find the need to run qualtrics_auth once.

Development pipeline

There are close to 200 different API calls provides by Qualtrics. Depending on interest, demand, and help from the community, efforts will be dedicated to the testing and implementation of missing references. Most of the XM Directory related calls are not implemented due to not having access to this feature in our own account.

qualtricsinr's People

Contributors

johncoene avatar ppssphysics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qualtricsinr's Issues

Infinite loop get_activity_log

There seems to be an issue catching the next page offset for certain activity types when retrieving activity logs (get_activity_log). Not clear whether this an issue with Qualtrics reply or something we miss in analyzing the responses. An example of next url returned seems to indicate too long urls?
YIdeF8P74F72QvhwMC-47zxEjdWtEvxrJfM3DEfMFT8qvvwHpEqcRgTCMAtukzWEC-MfpVp48pXNyNkJB4JhMg~~

Get survey, labels argument seems to be not working

useLabels in get_survey_responses() does not seem to be working. Still downloading labels.

QualtricsInR::get_survey_responses(surveys[ i,"id"], exportResponsesInProgress = FALSE,
breakoutSets=FALSE, useLabels = FALSE)

Delete Question call fails

Sending request to delete question from survey fails with message:

Error in add_headers(.headers = my_header) : argument "my_header" is missing, with no default

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.