Skip to content

Commit 521bf20

Browse files
authored
Merge pull request #1475 from cmu-delphi/survey-wave-13
Update pipeline to support Wave 13
2 parents 6ef4968 + 6f89e0d commit 521bf20

File tree

6 files changed

+83
-9
lines changed

6 files changed

+83
-9
lines changed

ansible/templates/facebook-params-prod.json.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"Survey of COVID-Like Illness - Wave 11": "fb-survey",
3939
"Survey of COVID-Like Illness - Wave 12": "fb-survey",
4040
"Survey of COVID-Like Illness - Wave 12 - Full Launch": "fb-survey",
41+
"Survey of COVID-Like Illness - Wave 13": "fb-survey",
4142
"Survey of COVID-Like Illness - Wave 4": "fb-survey",
4243
"Survey of COVID-Like Illness - Wave 5": "fb-survey",
4344
"Survey of COVID-Like Illness - Wave 6": "fb-survey",

ansible/templates/sir_complainsalot-params-prod.json.j2

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,40 @@
9090
["smoothed_dontneed_reason_not_high_risk", "hrr"], ["smoothed_wdontneed_reason_not_high_risk", "hrr"],
9191
["smoothed_dontneed_reason_not_serious", "hrr"], ["smoothed_wdontneed_reason_not_serious", "hrr"],
9292
["smoothed_dontneed_reason_other", "hrr"], ["smoothed_wdontneed_reason_other", "hrr"],
93-
["smoothed_dontneed_reason_precautions", "hrr"], ["smoothed_wdontneed_reason_precautions", "hrr"]
93+
["smoothed_dontneed_reason_precautions", "hrr"], ["smoothed_wdontneed_reason_precautions", "hrr"],
94+
"smoothed_screening_tested_positive_14d", "smoothed_wscreening_tested_positive_14d",
95+
"smoothed_travel_outside_state_7d", "smoothed_wtravel_outside_state_7d",
96+
"smoothed_belief_vaccinated_mask_unnecessary", "smoothed_wbelief_vaccinated_mask_unnecessary",
97+
"smoothed_belief_children_immune", "smoothed_wbelief_children_immune",
98+
"smoothed_received_2_vaccine_doses", "smoothed_wreceived_2_vaccine_doses",
99+
"smoothed_vaccine_barrier_eligible", "smoothed_wvaccine_barrier_eligible",
100+
"smoothed_vaccine_barrier_no_appointments", "smoothed_wvaccine_barrier_no_appointments",
101+
"smoothed_vaccine_barrier_appointment_time", "smoothed_wvaccine_barrier_appointment_time",
102+
"smoothed_vaccine_barrier_technical_difficulties", "smoothed_wvaccine_barrier_technical_difficulties",
103+
"smoothed_vaccine_barrier_document", "smoothed_wvaccine_barrier_document",
104+
"smoothed_vaccine_barrier_technology_access", "smoothed_wvaccine_barrier_technology_access",
105+
"smoothed_vaccine_barrier_travel", "smoothed_wvaccine_barrier_travel",
106+
"smoothed_vaccine_barrier_language", "smoothed_wvaccine_barrier_language",
107+
"smoothed_vaccine_barrier_childcare", "smoothed_wvaccine_barrier_childcare",
108+
"smoothed_vaccine_barrier_time", "smoothed_wvaccine_barrier_time",
109+
"smoothed_vaccine_barrier_type", "smoothed_wvaccine_barrier_type",
110+
"smoothed_vaccine_barrier_none", "smoothed_wvaccine_barrier_none",
111+
"smoothed_vaccine_barrier_appointment_location", "smoothed_wvaccine_barrier_appointment_location",
112+
"smoothed_vaccine_barrier_other", "smoothed_wvaccine_barrier_other",
113+
"smoothed_vaccine_barrier_eligible_has", "smoothed_wvaccine_barrier_eligible_has",
114+
"smoothed_vaccine_barrier_no_appointments_has", "smoothed_wvaccine_barrier_no_appointments_has",
115+
"smoothed_vaccine_barrier_appointment_time_has", "smoothed_wvaccine_barrier_appointment_time_has",
116+
"smoothed_vaccine_barrier_technical_difficulties_has", "smoothed_wvaccine_barrier_technical_difficulties_has",
117+
"smoothed_vaccine_barrier_document_has", "smoothed_wvaccine_barrier_document_has",
118+
"smoothed_vaccine_barrier_technology_access_has", "smoothed_wvaccine_barrier_technology_access_has",
119+
"smoothed_vaccine_barrier_travel_has", "smoothed_wvaccine_barrier_travel_has",
120+
"smoothed_vaccine_barrier_language_has", "smoothed_wvaccine_barrier_language_has",
121+
"smoothed_vaccine_barrier_childcare_has", "smoothed_wvaccine_barrier_childcare_has",
122+
"smoothed_vaccine_barrier_time_has", "smoothed_wvaccine_barrier_time_has",
123+
"smoothed_vaccine_barrier_type_has", "smoothed_wvaccine_barrier_type_has",
124+
"smoothed_vaccine_barrier_none_has", "smoothed_wvaccine_barrier_none_has",
125+
"smoothed_vaccine_barrier_appointment_location_has", "smoothed_wvaccine_barrier_appointment_location_has",
126+
"smoothed_vaccine_barrier_other_has", "smoothed_wvaccine_barrier_other_has"
94127
]
95128
},
96129
"quidel": {

facebook/delphiFacebook/R/responses.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ create_complete_responses <- function(input_data, county_crosswalk, params)
617617
"I6_1", "I6_2", "I6_3", "I6_4", "I6_5", "I6_6", "I6_7", "I6_8",
618618
"I7", "K1", "K2", "V11a", "V12a", "V15a", "V15b", "V16", "V3a", # added in Wave 11
619619
"V1alt", "B13a", "V15c", "P1", "P2", "P3", "P4", "P5", "P6", # added in experimental Wave 12
620+
"C17b", "V17_1", "V17_2", "V2b", "V2c", # added in Wave 13
620621

621622
"raceethnicity", "token", "wave", "w12_treatment", "module", "UserLanguage",
622623
"zip5" # temporarily; we'll filter by this column later and then drop it before writing
@@ -694,7 +695,8 @@ surveyID_to_wave <- Vectorize(function(surveyID) {
694695
"SV_6PADB8DyF9SIyXk" = 10,
695696
"SV_4VEaeffqQtDo33M" = 11,
696697
"SV_3TL0r243mLkDzCK" = 12.5, # experimental version of Wave 12
697-
"SV_eDISRi5wQcNU70G" = 12 # finalized version of Wave 12
698+
"SV_eDISRi5wQcNU70G" = 12, # finalized version of Wave 12
699+
"SV_2iv3tPKlYKqnalM" = 13
698700
)
699701

700702
if ( any(names(waves) == surveyID) ) {

facebook/params.json.production.template

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@
2727
"active": {
2828
"Survey of COVID-Like Illness - TODEPLOY ...... - US Expansion": "fb-survey",
2929
"Survey of COVID-Like Illness - TODEPLOY- US Expansion - With Translations": "fb-survey",
30+
"Survey of COVID-Like Illness - Wave 10": "fb-survey",
31+
"Survey of COVID-Like Illness - Wave 11": "fb-survey",
32+
"Survey of COVID-Like Illness - Wave 12": "fb-survey",
33+
"Survey of COVID-Like Illness - Wave 12 - Full Launch": "fb-survey",
34+
"Survey of COVID-Like Illness - Wave 13": "fb-survey",
3035
"Survey of COVID-Like Illness - Wave 4": "fb-survey",
3136
"Survey of COVID-Like Illness - Wave 5": "fb-survey",
3237
"Survey of COVID-Like Illness - Wave 6": "fb-survey",
3338
"Survey of COVID-Like Illness - Wave 7": "fb-survey",
34-
"Survey of COVID-Like Illness - Wave 8": "fb-survey",
35-
"Survey of COVID-Like Illness - Wave 10": "fb-survey",
36-
"Survey of COVID-Like Illness - Wave 11": "fb-survey"
39+
"Survey of COVID-Like Illness - Wave 8": "fb-survey"
3740
},
3841
"dormant": {
3942
"COVID-Like Illness 4-question survey - Amazon - DEPLOY": "",

facebook/qsf-tools/qsf-differ.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
## Writes the lists of new and changed items to STDOUT, so redirect STDOUT to
1010
## your desired location.
1111

12+
options(warn = 1)
13+
1214
suppressPackageStartupMessages({
1315
library(jsonlite)
1416
library(stringr)
@@ -31,8 +33,8 @@ diff_qsf_files <- function(old_qsf_path, new_qsf_path) {
3133
#' Fetch and format a single .qsf file, keeping block and question info
3234
#'
3335
#' @param path path to Qualtrics survey file in .qsf format
34-
#' @param keep_items string or character vector of survey item fields to keep.
35-
#' Setting to "all" keeps all fields.
36+
#' @param keep_items character vector of survey item fields to keep.
37+
#' Setting to c("all") keeps all fields.
3638
#'
3739
#' @return A named list
3840
get_qsf_file <- function(path,
@@ -59,7 +61,7 @@ get_qsf_file <- function(path,
5961
next
6062
}
6163

62-
if (keep_items != "all") {
64+
if (!identical(keep_items, c("all"))) {
6365
question <- question[names(question) %in% c("QuestionID", keep_items)]
6466
}
6567

sir_complainsalot/params.json.template

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,40 @@
8989
["smoothed_dontneed_reason_not_high_risk", "hrr"], ["smoothed_wdontneed_reason_not_high_risk", "hrr"],
9090
["smoothed_dontneed_reason_not_serious", "hrr"], ["smoothed_wdontneed_reason_not_serious", "hrr"],
9191
["smoothed_dontneed_reason_other", "hrr"], ["smoothed_wdontneed_reason_other", "hrr"],
92-
["smoothed_dontneed_reason_precautions", "hrr"], ["smoothed_wdontneed_reason_precautions", "hrr"]
92+
["smoothed_dontneed_reason_precautions", "hrr"], ["smoothed_wdontneed_reason_precautions", "hrr"],
93+
"smoothed_screening_tested_positive_14d", "smoothed_wscreening_tested_positive_14d",
94+
"smoothed_travel_outside_state_7d", "smoothed_wtravel_outside_state_7d",
95+
"smoothed_belief_vaccinated_mask_unnecessary", "smoothed_wbelief_vaccinated_mask_unnecessary",
96+
"smoothed_belief_children_immune", "smoothed_wbelief_children_immune",
97+
"smoothed_received_2_vaccine_doses", "smoothed_wreceived_2_vaccine_doses",
98+
"smoothed_vaccine_barrier_eligible", "smoothed_wvaccine_barrier_eligible",
99+
"smoothed_vaccine_barrier_no_appointments", "smoothed_wvaccine_barrier_no_appointments",
100+
"smoothed_vaccine_barrier_appointment_time", "smoothed_wvaccine_barrier_appointment_time",
101+
"smoothed_vaccine_barrier_technical_difficulties", "smoothed_wvaccine_barrier_technical_difficulties",
102+
"smoothed_vaccine_barrier_document", "smoothed_wvaccine_barrier_document",
103+
"smoothed_vaccine_barrier_technology_access", "smoothed_wvaccine_barrier_technology_access",
104+
"smoothed_vaccine_barrier_travel", "smoothed_wvaccine_barrier_travel",
105+
"smoothed_vaccine_barrier_language", "smoothed_wvaccine_barrier_language",
106+
"smoothed_vaccine_barrier_childcare", "smoothed_wvaccine_barrier_childcare",
107+
"smoothed_vaccine_barrier_time", "smoothed_wvaccine_barrier_time",
108+
"smoothed_vaccine_barrier_type", "smoothed_wvaccine_barrier_type",
109+
"smoothed_vaccine_barrier_none", "smoothed_wvaccine_barrier_none",
110+
"smoothed_vaccine_barrier_appointment_location", "smoothed_wvaccine_barrier_appointment_location",
111+
"smoothed_vaccine_barrier_other", "smoothed_wvaccine_barrier_other",
112+
"smoothed_vaccine_barrier_eligible_has", "smoothed_wvaccine_barrier_eligible_has",
113+
"smoothed_vaccine_barrier_no_appointments_has", "smoothed_wvaccine_barrier_no_appointments_has",
114+
"smoothed_vaccine_barrier_appointment_time_has", "smoothed_wvaccine_barrier_appointment_time_has",
115+
"smoothed_vaccine_barrier_technical_difficulties_has", "smoothed_wvaccine_barrier_technical_difficulties_has",
116+
"smoothed_vaccine_barrier_document_has", "smoothed_wvaccine_barrier_document_has",
117+
"smoothed_vaccine_barrier_technology_access_has", "smoothed_wvaccine_barrier_technology_access_has",
118+
"smoothed_vaccine_barrier_travel_has", "smoothed_wvaccine_barrier_travel_has",
119+
"smoothed_vaccine_barrier_language_has", "smoothed_wvaccine_barrier_language_has",
120+
"smoothed_vaccine_barrier_childcare_has", "smoothed_wvaccine_barrier_childcare_has",
121+
"smoothed_vaccine_barrier_time_has", "smoothed_wvaccine_barrier_time_has",
122+
"smoothed_vaccine_barrier_type_has", "smoothed_wvaccine_barrier_type_has",
123+
"smoothed_vaccine_barrier_none_has", "smoothed_wvaccine_barrier_none_has",
124+
"smoothed_vaccine_barrier_appointment_location_has", "smoothed_wvaccine_barrier_appointment_location_has",
125+
"smoothed_vaccine_barrier_other_has", "smoothed_wvaccine_barrier_other_has"
93126
]
94127
},
95128
"quidel": {

0 commit comments

Comments
 (0)