Git Product home page Git Product logo

qualtdict's Introduction

qualtdict

License: MIT

Project Status: Active – The project has reached a stable, usable state and is being actively developed. check-standard test-coverage Codecov test coverage

Qualtrics is an online survey and data collection software platform. The qualtdict R package builds on the qualtRics R package which implements the retrieval of survey data using the Qualtrics API and aims to reduce the pre-processing steps needed in analyzing such surveys. The current package makes more comprehensive use of the survey metadata and generates a variable dictionary including most of the information essential for data processing and analysis. It also uses a modified version of the RAKE algorithm by Rose. et al. implemented in the package slowraker to generate meaningful names for all variables in the survey, as well as adding a comprehensive set of metadata attributes that uniquely identifies each variable.

Installation

This package can be installed with the remotes package.

install.packages("remotes")
remotes::install_github("lyh970817/qultdict")

Example

You need to first register your Qualtrics credentials with the function qualtrics_api_credentials exported from the package qualtRics.

library(qualtdict)

qualtrics_api_credentials(
  api_key = "<YOUR-QUALTRICS_API_KEY>",
  base_url = "<YOUR-QUALTRICS_BASE_URL>",
  install = TRUE
)

You can then generate a variable dictionary.

mydict <- dict_generate("SV_4YyAHbAxpdbzacl", var_name = "question_name")

You may wish to generate meaningful variable names (if you don’t already have them in the survey) in the dictionary. If doing so, preferably you would also want to define a function that extracts block prefixes from block names.

# Define a block prefix extraction function
block_pattern <- function(x) {
  substring(x, 1, 3)
}

mydict <- dict_generate("SV_4YyAHbAxpdbzacl",
  var_name = "easy_name",
  block_pattern = block_pattern,
  block_sep = "."
)

You might want to check for potential mistakes in the survey with dict_validate.

dict_validate(mydict)

And use the dictionary to download sjlabelled survey data.

survey_dat <- get_survey_data(mydict,
  unanswer_recode = -77,
  unanswer_recode_multi = 0
)

qualtdict's People

Contributors

lyh970817 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jmobrien

qualtdict's Issues

NLP issues

  • Words in NLP to include and to block out

  • Word swapping

Surpress that the order of the words get changed

Data dictionary easy name Question asked in COPING survey
masq.felt_succesful Felt successful
masq.felt_really_happy Felt really happy
masq.felt_optimistic Felt optimistic
masq.lot_felt_fun Felt like I was having a lot of fun
masq.felt_like_i_accomplished_a_lot masq.felt_like_i_accomplished_a_lot
masq.forward_lot_felt Felt like I had a lot to look forward to
masq.felt_really_up_or_lively Felt really 'up' or lively
masq.lot_felt_energy Felt like I had a lot of energy
masq.felt_really_good_about_myself Felt really good about myself
masq.felt_really_talkative Felt really talkative

Looking at this table, is there an option to surpress that the order of the words gets changed from the original?

e.g.:
masq.lot_felt_fun | Felt like I was having a lot of fun

dict_generate warnings

When running the dict_generate function with the new glad_controls_ID credentials I am getting these warnings:

Warning messages: 1: In is.null(.x) || is.na(.x) : 'length(x) = 4 > 1' in coercion to 'logical(1)' 2: In is.null(.x) || is.na(.x) : 'length(x) = 4 > 1' in coercion to 'logical(1)'

We seem to be using ropensci/qualtRics rather than lyh970817/qualtRics

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.