-
Notifications
You must be signed in to change notification settings - Fork 16
[fb-survey] Create codebook-generating tool #1071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a7b139e
create codebook tool; share utils with qsf differ
nmdefries 632e325
display waves together for a given item
nmdefries a718456
move item maps to CSV; rename randomization field
nmdefries 3d39357
rename short_question to description; add non-Qualtrics fields; creat…
nmdefries bd56750
drop module item pre-wave 11
nmdefries 6d7d894
add display logic
nmdefries b330822
rename item to variable for generality
nmdefries d8d3f77
add other text items
nmdefries acbbe09
switch display logic to show item name and response code
nmdefries 5d62048
describe manual mapping files
nmdefries e55b308
add module randomization field
nmdefries bb8ca54
mark module-based display logic as randomized to match
nmdefries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| ## Tools for parsing .qsf files | ||
|
|
||
| ### `qsf-differ` | ||
|
|
||
| Compare two .qsf files to find survey items that have been added, removed, or | ||
| changed. This tool returns a list of item names and Qualtrics question IDs | ||
| (QIDs) by change type. | ||
|
|
||
| ### `generate-codebook` | ||
|
|
||
| Process one .qsf file at a time to create a new codebook or add to an existing | ||
| codebook (in CSV format). This tool processes a qsf to retrieve information | ||
| about a survey item text, format, and randomization. | ||
|
|
||
| ##### Dependencies | ||
|
|
||
| The following files are used to define fields that cannot be parsed from the | ||
| .qsf, for example, which new survey questions replace which old survey | ||
| questions. These mapping files are created manually and need to be updated for | ||
| every new survey wave. | ||
|
|
||
| * `item_replacement_map.csv`: Lists in-survey name of an `new_item` and the | ||
| in-survey name of the `old_item` it replaces. `new_item` should be the name | ||
| of a single item and be unique, but the `old_item` column has no formatting | ||
| requirements. It can hold a list of items, if the corresponding new survey | ||
| item is replacing multiple old questions, and a given item name can appear | ||
| in multiple rows of the `old_item` field. | ||
| * `item_shortquestion_map.csv`: Lists in-survey name of an `item` and a short | ||
| description of the contents of the question. `item` should be the name of a | ||
| single item and be unique, but the `description` column has no formatting | ||
| requirements. | ||
| * `static_microdata_fields.csv`: Lists additional fields that are included in | ||
| the microdata but are not derived from the .qsf file. Columns that appear in | ||
| the codebook but not in `static_microdata_fields.csv` are marked as missing | ||
| and filled with `NA`. This item will rarely need to be updated. | ||
|
|
||
| ### .qsf Background | ||
|
|
||
| A .qsf file is a Qualtrics-specific json containing two elements: SurveyEntry | ||
| with survey metadata (start date, ID, name, etc) and SurveyElements with a list | ||
| of survey components. To catalogue included items by survey wave, we would | ||
| examine the SurveyElements object. | ||
|
|
||
| SurveyElement types are BL (block), FL (flow), SO (survey options), SCO | ||
| (scoring), PROJ (?), notes, STAT (statistics), QC (question count), SQ (survey | ||
| questions), and RS (response set). [Detailed info | ||
| here](https://gist.github.com/ctesta01/d4255959dace01431fb90618d1e8c241). | ||
|
|
||
| The SQ (survey question) objects contain most of the information we're | ||
| interested in. Within each SQ item, details are stored in the Payload element, | ||
| which can contain any subset of the following fields: | ||
|
|
||
| * `QuestionText` | ||
| * `QuestionType` | ||
| * `Selector` | ||
| * `Configuration` | ||
| * `QuestionDescription` | ||
| * `Choices` | ||
| * `ChoiceOrder` | ||
| * `Validation` | ||
| * `AnalyzeChoices` | ||
| * `Language` | ||
| * `QuestionText_Unsafe` | ||
| * `DataExportTag` | ||
| * `QuestionID` | ||
| * `DataVisibility` | ||
| * `NextChoiceId` | ||
| * `NextAnswerId` | ||
| * `DefaultChoices` | ||
| * `SubSelector` | ||
| * `DisplayLogic` | ||
| * `GradingData` | ||
| * `Answers` | ||
| * `AnswerOrder` | ||
| * `ChoiceDataExportTags` | ||
| * `Randomization` | ||
| * `RecodeValues` | ||
| * `DynamicChoices` | ||
| * `DynamicChoicesData` | ||
| * `SearchSource` | ||
| * `QuestionJS` | ||
|
|
||
| The meaning of "Answers" and "Choices" differs for matrix vs non-matrix | ||
| items. "Choices" list the vertical components -- subquestions for matrix | ||
| items and answer choices for non-matrix items. "Answers" list the answer | ||
| choices for matrix items and are missing for non-matrix items. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.