Skip to content

Instantly share code, notes, and snippets.

@hnykda
Created February 15, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hnykda/91f9f195ed62033fe92bba583223912c to your computer and use it in GitHub Desktop.
Save hnykda/91f9f195ed62033fe92bba583223912c to your computer and use it in GitHub Desktop.
example
gwi-123
# raw data from qualtrics:
```
respondent_id,q2,q3,s2,panelprovider
respid-1,1,0,44,ondevice
respid-2,2,,1,usamp
respid-3,2,,3,usamp
```
# minimal preprocessing ->
```
new_respondent_id,q2,q3,s2 <- columns names
ondevice-respid-1,1,0,44
usamp-respid-2,2,,1
usamp-respid-3,2,,3
```
# needed by platform
```
new_respondent_id,q2_1,q2_2,q3,s2_44,s2_1,s2_3
ondevice-respid-1,1,0,0,1,0,0
usamp-respid-2,0,1,,1,0,1,0
usamp-respid-3,0,1,,0,0,1
```
# needed in chronicle
```
{
new_respondent_id: ondevice-respid-1,
gwi-123: {
q2: [q2_1], # second respondent: q2: [q2_2]
q3: [q3_1],
s2: [s2_44]
}
asked: {
gwi-123:
{
q2: [q2_1, q2_2],
q3: [q3_1],
s2: [s2_1, s2_44, s2_3]
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment