Closed cwhd closed 6 years ago
I created a test survey in Qualtrics and exported it. It turns out that qsf format is a json representation of a survey! Here's what it looks like:
{ "SurveyEntry": { "SurveyID": "SV_6rkcCNbP5aPTTN3", "SurveyName": "HDM Manual Example", "SurveyDescription": null, "SurveyOwnerID": "UR_eLO7lu1Mhv7HCrb", "SurveyBrandID": "portlandstate", "DivisionID": null, "SurveyLanguage": "EN", "SurveyActiveResponseSet": "RS_8nOLjkrk4eIM8p7", "SurveyStatus": "Inactive", "SurveyStartDate": "0000-00-00 00:00:00", "SurveyExpirationDate": "0000-00-00 00:00:00", "SurveyCreationDate": "2018-07-04 06:19:00", "CreatorID": "UR_eLO7lu1Mhv7HCrb", "LastModified": "2018-07-04 06:46:57", "LastAccessed": "0000-00-00 00:00:00", "LastActivated": "0000-00-00 00:00:00", "Deleted": null }, "SurveyElements": [{ "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "BL", "PrimaryAttribute": "Survey Blocks", "SecondaryAttribute": null, "TertiaryAttribute": null, "Payload": [{ "Type": "Default", "Description": "Default Question Block", "ID": "BL_9mDBH5mdLXwl2Lj", "BlockElements": [{ "Type": "Question", "QuestionID": "QID2" }, { "Type": "Question", "QuestionID": "QID7" }, { "Type": "Question", "QuestionID": "QID1" }, { "Type": "Question", "QuestionID": "QID3" }, { "Type": "Question", "QuestionID": "QID8" }] }, { "Type": "Trash", "Description": "Trash \/ Unused Questions", "ID": "BL_24T9G2aYvefjeFT", "BlockElements": [{ "Type": "Question", "QuestionID": "QID4" }, { "Type": "Question", "QuestionID": "QID5" }, { "Type": "Question", "QuestionID": "QID6" }] }, { "Type": "Standard", "SubType": "", "Description": "Block 1", "ID": "BL_e9UcWXsVyv5N92J" }] }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "FL", "PrimaryAttribute": "Survey Flow", "SecondaryAttribute": null, "TertiaryAttribute": null, "Payload": { "Flow": [{ "ID": "BL_9mDBH5mdLXwl2Lj", "Type": "Block", "FlowID": "FL_2" }, { "ID": "BL_e9UcWXsVyv5N92J", "Type": "Standard", "FlowID": "FL_3" }], "Properties": { "Count": 3 }, "FlowID": "FL_1", "Type": "Root" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SO", "PrimaryAttribute": "Survey Options", "SecondaryAttribute": null, "TertiaryAttribute": null, "Payload": { "BackButton": "false", "SaveAndContinue": "true", "SurveyProtection": "PublicSurvey", "BallotBoxStuffingPrevention": "false", "NoIndex": "Yes", "SecureResponseFiles": "true", "SurveyExpiration": "None", "SurveyTermination": "DefaultMessage", "Header": "", "Footer": "", "ProgressBarDisplay": "None", "PartialData": "+1 week", "ValidationMessage": "", "PreviousButton": " \u2190 ", "NextButton": " \u2192 ", "SkinLibrary": "portlandstate", "SkinType": "MQ", "Skin": "psuplain", "NewScoring": 1 } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SCO", "PrimaryAttribute": "Scoring", "SecondaryAttribute": null, "TertiaryAttribute": null, "Payload": { "ScoringCategories": [], "ScoringCategoryGroups": [], "ScoringSummaryCategory": null, "ScoringSummaryAfterQuestions": 0, "ScoringSummaryAfterSurvey": 0, "DefaultScoringCategory": null, "AutoScoringCategory": null } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "STAT", "PrimaryAttribute": "Survey Statistics", "SecondaryAttribute": null, "TertiaryAttribute": null, "Payload": { "MobileCompatible": true, "ID": "Survey Statistics" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID1", "SecondaryAttribute": "-", "TertiaryAttribute": null, "Payload": { "QuestionText": "-", "DefaultChoices": false, "DataExportTag": "Q1", "QuestionType": "CS", "Selector": "HBAR", "Configuration": { "QuestionDescriptionOption": "UseText", "CSSliderMin": 0, "CSSliderMax": 100, "GridLines": 10, "NumDecimals": "0", "ShowValue": true, "CustomStart": false }, "QuestionDescription": "-", "Choices": { "1": { "Display": "Strawberries" }, "2": { "Display": "Blueberries" } }, "ChoiceOrder": [1, 2], "Validation": { "Settings": { "EnforceRange": null, "Type": "ChoicesTotal", "ChoiceTotal": "100" } }, "GradingData": [], "Language": [], "NextChoiceId": 3, "NextAnswerId": 1, "Labels": [], "QuestionID": "QID1" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID3", "SecondaryAttribute": "-", "TertiaryAttribute": null, "Payload": { "QuestionText": "-", "DefaultChoices": false, "DataExportTag": "Q3", "QuestionType": "CS", "Selector": "HSLIDER", "Configuration": { "QuestionDescriptionOption": "UseText", "CSSliderMin": 0, "CSSliderMax": 100, "GridLines": 10, "NumDecimals": "0", "ShowValue": true, "CustomStart": false }, "QuestionDescription": "-", "Choices": { "1": { "Display": "Strawberries" }, "2": { "Display": "Bananas" } }, "ChoiceOrder": [1, 2], "Validation": { "Settings": { "EnforceRange": null, "Type": "ChoicesTotal", "ChoiceTotal": "100" } }, "GradingData": [], "Language": [], "NextChoiceId": 3, "NextAnswerId": 1, "Labels": [], "QuestionID": "QID3" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID8", "SecondaryAttribute": "-", "TertiaryAttribute": null, "Payload": { "QuestionText": "-", "DefaultChoices": false, "DataExportTag": "Q8", "QuestionType": "CS", "Selector": "VRTL", "SubSelector": "TX", "Configuration": { "QuestionDescriptionOption": "UseText" }, "QuestionDescription": "-", "Choices": { "1": { "Display": "Blueberries" }, "2": { "Display": "Bananas" } }, "ChoiceOrder": [1, 2], "Validation": { "Settings": { "EnforceRange": "OFF", "Type": "ChoicesTotal", "ChoiceTotal": "100" } }, "GradingData": [], "Language": [], "NextChoiceId": 3, "NextAnswerId": 1, "Labels": [], "ClarifyingSymbolType": "None", "QuestionID": "QID8" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "PROJ", "PrimaryAttribute": "CORE", "SecondaryAttribute": "1.0.0", "TertiaryAttribute": null, "Payload": null }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "QC", "PrimaryAttribute": "Survey Question Count", "SecondaryAttribute": "8", "TertiaryAttribute": null, "Payload": null }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID4", "SecondaryAttribute": "Click to write the question text", "TertiaryAttribute": null, "Payload": { "QuestionText": "Click to write the question text", "DefaultChoices": false, "DataExportTag": "Q4", "QuestionType": "SBS", "Selector": "SBSMatrix", "Configuration": { "QuestionDescriptionOption": "UseText", "RepeatHeaders": "none" }, "QuestionDescription": "Click to write the question text", "Choices": { "1": { "Display": "Click to write Statement 1" }, "2": { "Display": "Click to write Statement 2" } }, "ChoiceOrder": [1, 2], "Validation": { "Settings": { "ForceResponse": "OFF", "ForceResponseType": "ON", "Type": "None" } }, "GradingData": [], "Language": [], "NextChoiceId": 3, "NextAnswerId": 2, "NumberOfQuestions": 1, "AdditionalQuestions": { "1": { "QuestionText": "Click to write Column 1", "Answers": { "1": { "Display": "Answer 1" }, "2": { "Display": "Answer 2" } }, "RecodeValues": [], "VariableNaming": [], "AnalyzeChoices": [], "QuestionType": "Matrix", "Selector": "Likert", "SubSelector": "SingleAnswer", "ChoiceColumnWidthPixels": null, "DataExportTag": "Q4#1", "QuestionID": "QID4#1", "Choices": { "1": { "Display": "Click to write Statement 1" }, "2": { "Display": "Click to write Statement 2" } }, "ChoiceDataExportTags": false, "QuestionDescription": "Click to write Column 1", "Configuration": { "QuestionDescriptionOption": "UseText" } } }, "ChoiceDataExportTags": false, "QuestionID": "QID4" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID5", "SecondaryAttribute": "Click to write the question text", "TertiaryAttribute": null, "Payload": { "QuestionText": "Click to write the question text", "DefaultChoices": false, "DataExportTag": "Q5", "QuestionType": "Slider", "Selector": "HBAR", "Configuration": { "QuestionDescriptionOption": "UseText", "CSSliderMin": 0, "CSSliderMax": 100, "GridLines": 10, "NumDecimals": "0", "ShowValue": true, "CustomStart": false, "NotApplicable": false, "MobileFirst": true }, "QuestionDescription": "Click to write the question text", "Choices": { "1": { "Display": "Click to write Choice 1" }, "2": { "Display": "Click to write Choice 2" } }, "ChoiceOrder": [1, 2], "Validation": { "Settings": { "ForceResponse": "OFF", "ForceResponseType": "ON", "Type": "None" } }, "GradingData": [], "Language": [], "NextChoiceId": 3, "NextAnswerId": 1, "Labels": [], "QuestionID": "QID5" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID6", "SecondaryAttribute": "Click to write the question text", "TertiaryAttribute": null, "Payload": { "QuestionText": "Click to write the question text", "DefaultChoices": false, "DataExportTag": "Q6", "QuestionType": "Matrix", "Selector": "Bipolar", "Configuration": { "QuestionDescriptionOption": "UseText", "TextPosition": "inline", "ChoiceColumnWidth": 25, "RepeatHeaders": "none", "MobileFirst": true }, "QuestionDescription": "Click to write the question text", "Choices": { "1": { "Display": "Click to write Statement 1:Right", "ExclusiveAnswer": false }, "2": { "Display": "Click to write Statement 2:Right", "ExclusiveAnswer": false } }, "ChoiceOrder": [1, 2], "Validation": { "Settings": { "EnforceRange": null, "ForceResponse": "OFF", "ForceResponseType": "ON", "Type": "None" } }, "GradingData": [], "Language": [], "NextChoiceId": 3, "NextAnswerId": 11, "Answers": { "1": { "Display": "1", "ExclusiveAnswer": false }, "2": { "Display": "2", "ExclusiveAnswer": false }, "3": { "Display": "3" }, "4": { "Display": "4" }, "5": { "Display": "5" }, "6": { "Display": "6" }, "7": { "Display": "7" }, "8": { "Display": "8" }, "9": { "Display": "9" }, "10": { "Display": "10" } }, "AnswerOrder": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "ChoiceDataExportTags": false, "QuestionID": "QID6", "DataVisibility": { "Private": false, "Hidden": false }, "AnswerColumns": 10 } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "RS", "PrimaryAttribute": "RS_8nOLjkrk4eIM8p7", "SecondaryAttribute": "Default Response Set", "TertiaryAttribute": null, "Payload": null }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID2", "SecondaryAttribute": "Please give your judgment for each pair of nodes below toward Criteria:", "TertiaryAttribute": null, "Payload": { "QuestionText": "<span style=\"color: rgb(51, 51, 51); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 234);\">Please give your judgment for each pair of nodes below toward Criteria:<\/span>", "DefaultChoices": false, "DataExportTag": "Q2", "QuestionType": "DB", "Selector": "TB", "Configuration": { "QuestionDescriptionOption": "UseText" }, "QuestionDescription": "Please give your judgment for each pair of nodes below toward Criteria:", "ChoiceOrder": [], "Validation": { "Settings": { "Type": "None" } }, "GradingData": [], "Language": [], "NextChoiceId": 4, "NextAnswerId": 1, "QuestionID": "QID2" } }, { "SurveyID": "SV_6rkcCNbP5aPTTN3", "Element": "SQ", "PrimaryAttribute": "QID7", "SecondaryAttribute": "What type of fruit do you want with breakfast?", "TertiaryAttribute": null, "Payload": { "QuestionText": "What type of fruit do you want with breakfast?", "DefaultChoices": false, "DataExportTag": "Q7", "QuestionType": "DB", "Selector": "TB", "Configuration": { "QuestionDescriptionOption": "UseText" }, "QuestionDescription": "What type of fruit do you want with breakfast?", "ChoiceOrder": [], "Validation": { "Settings": { "Type": "None" } }, "GradingData": [], "Language": [], "NextChoiceId": 4, "NextAnswerId": 1, "QuestionID": "QID7" } }] }
Bad news, PSU doesn't have access to the Qualtrics API! I reached out to Qualtrics when I couldn't get things to work programmatically and they gave me someone to contact. I've reached out, so let's see what happens.
Qualtrics will be used to manage surveys as defined by the HDM-R-Core. Qualtrics has an API that can be used for many things, including creating and managing surveys and extracting data . There is already a CRAN module that can be used for importing data from Qualtrics into R .
CRAN package the connects to Qualtrics: https://cran.r-project.org/web/packages/qualtRics/index.html
Qualtrics API: https://api.qualtrics.com/
Here is information about the file format Qualtrics expects: https://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/import-and-export-surveys/