Skip to content

Commit eadf7c8

Browse files
authored
Merge pull request #1569 from cmu-delphi/release/indicators_v0.3.9_utils_v0.3.3
Release covidcast-indicators 0.3.9
2 parents 7493e3e + 06954ad commit eadf7c8

File tree

12 files changed

+519
-154
lines changed

12 files changed

+519
-154
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.8
2+
current_version = 0.3.9
33
commit = True
44
message = chore: bump covidcast-indicators to {new_version}
55
tag = False

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,27 @@
7979
"smoothed_inperson_school_fulltime", "smoothed_winperson_school_fulltime",
8080
"smoothed_inperson_school_parttime", "smoothed_winperson_school_parttime",
8181
"smoothed_vaccinate_children", "smoothed_wvaccinate_children",
82-
["smoothed_vaccine_barrier_appointment_time_tried", "msa"], ["smoothed_wvaccine_barrier_appointment_time_tried", "msa"],
83-
["smoothed_vaccine_barrier_childcare_tried", "msa"], ["smoothed_wvaccine_barrier_childcare_tried", "msa"],
84-
["smoothed_vaccine_barrier_document_tried", "msa"], ["smoothed_wvaccine_barrier_document_tried", "msa"],
85-
["smoothed_vaccine_barrier_eligible_tried", "msa"], ["smoothed_wvaccine_barrier_eligible_tried", "msa"],
86-
["smoothed_vaccine_barrier_language_tried", "msa"], ["smoothed_wvaccine_barrier_language_tried", "msa"],
87-
["smoothed_vaccine_barrier_no_appointments_tried", "msa"], ["smoothed_wvaccine_barrier_no_appointments_tried", "msa"],
88-
["smoothed_vaccine_barrier_none_tried", "msa"], ["smoothed_wvaccine_barrier_none_tried", "msa"],
89-
["smoothed_vaccine_barrier_technical_difficulties_tried", "msa"], ["smoothed_wvaccine_barrier_technical_difficulties_tried", "msa"],
90-
["smoothed_vaccine_barrier_technology_access_tried", "msa"], ["smoothed_wvaccine_barrier_technology_access_tried", "msa"],
91-
["smoothed_vaccine_barrier_time_tried", "msa"], ["smoothed_wvaccine_barrier_time_tried", "msa"],
92-
["smoothed_vaccine_barrier_travel_tried", "msa"], ["smoothed_wvaccine_barrier_travel_tried", "msa"],
93-
["smoothed_vaccine_barrier_type_tried", "msa"], ["smoothed_wvaccine_barrier_type_tried", "msa"],
82+
["smoothed_vaccine_barrier_appointment_time_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_appointment_time_tried", "msa", "county", "state"],
83+
["smoothed_vaccine_barrier_childcare_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_childcare_tried", "msa", "county", "state"],
84+
["smoothed_vaccine_barrier_document_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_document_tried", "msa", "county", "state"],
85+
["smoothed_vaccine_barrier_eligible_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_eligible_tried", "msa", "county", "state"],
86+
["smoothed_vaccine_barrier_language_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_language_tried", "msa", "county", "state"],
87+
["smoothed_vaccine_barrier_no_appointments_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_no_appointments_tried", "msa", "county", "state"],
88+
["smoothed_vaccine_barrier_none_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_none_tried", "msa", "county", "state"],
89+
["smoothed_vaccine_barrier_technical_difficulties_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_technical_difficulties_tried", "msa", "county", "state"],
90+
["smoothed_vaccine_barrier_technology_access_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_technology_access_tried", "msa", "county", "state"],
91+
["smoothed_vaccine_barrier_time_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_time_tried", "msa", "county", "state"],
92+
["smoothed_vaccine_barrier_travel_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_travel_tried", "msa", "county", "state"],
93+
["smoothed_vaccine_barrier_type_tried", "msa", "county", "state"], ["smoothed_wvaccine_barrier_type_tried", "msa", "county", "state"],
9494
["smoothed_try_vaccinate_1m", "hrr"], ["smoothed_wtry_vaccinate_1m", "hrr"],
9595
["smoothed_try_vaccinate_1m", "msa"], ["smoothed_wtry_vaccinate_1m", "msa"],
96-
["smoothed_dontneed_reason_dont_spend_time", "hrr"], ["smoothed_wdontneed_reason_dont_spend_time", "hrr"],
97-
["smoothed_dontneed_reason_had_covid", "hrr"], ["smoothed_wdontneed_reason_had_covid", "hrr"],
98-
["smoothed_dontneed_reason_not_beneficial", "hrr"], ["smoothed_wdontneed_reason_not_beneficial", "hrr"],
99-
["smoothed_dontneed_reason_not_high_risk", "hrr"], ["smoothed_wdontneed_reason_not_high_risk", "hrr"],
100-
["smoothed_dontneed_reason_not_serious", "hrr"], ["smoothed_wdontneed_reason_not_serious", "hrr"],
101-
["smoothed_dontneed_reason_other", "hrr"], ["smoothed_wdontneed_reason_other", "hrr"],
102-
["smoothed_dontneed_reason_precautions", "hrr"], ["smoothed_wdontneed_reason_precautions", "hrr"],
96+
["smoothed_dontneed_reason_dont_spend_time", "hrr"], ["smoothed_wdontneed_reason_dont_spend_time", "hrr", "msa"],
97+
["smoothed_dontneed_reason_had_covid", "hrr"], ["smoothed_wdontneed_reason_had_covid", "hrr", "msa"],
98+
["smoothed_dontneed_reason_not_beneficial", "hrr"], ["smoothed_wdontneed_reason_not_beneficial", "hrr", "msa"],
99+
["smoothed_dontneed_reason_not_high_risk", "hrr"], ["smoothed_wdontneed_reason_not_high_risk", "hrr", "msa"],
100+
["smoothed_dontneed_reason_not_serious", "hrr"], ["smoothed_wdontneed_reason_not_serious", "hrr", "msa"],
101+
["smoothed_dontneed_reason_other", "hrr"], ["smoothed_wdontneed_reason_other", "hrr", "msa"],
102+
["smoothed_dontneed_reason_precautions", "hrr"], ["smoothed_wdontneed_reason_precautions", "hrr", "msa"],
103103
"smoothed_screening_tested_positive_14d", "smoothed_wscreening_tested_positive_14d",
104104
"smoothed_travel_outside_state_7d", "smoothed_wtravel_outside_state_7d",
105105
"smoothed_belief_vaccinated_mask_unnecessary", "smoothed_wbelief_vaccinated_mask_unnecessary",

facebook/delphiFacebook/R/binary.R

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ get_binary_indicators <- function() {
131131
"smoothed_wvaccinate_children", "weight", "v_vaccinate_children", 6, compute_binary_response, jeffreys_binary,
132132
"smoothed_vaccinate_child_oldest", "weight_unif", "v_vaccinate_child_oldest", 6, compute_binary_response, jeffreys_binary,
133133
"smoothed_wvaccinate_child_oldest", "weight", "v_vaccinate_child_oldest", 6, compute_binary_response, jeffreys_binary,
134-
134+
135+
"smoothed_wchild_vaccine_already", "weight", "v_child_vaccine_already", 6, compute_binary_response, jeffreys_multinomial_factory(5),
136+
"smoothed_wchild_vaccine_yes_def", "weight", "v_child_vaccine_yes_def", 6, compute_binary_response, jeffreys_multinomial_factory(5),
137+
"smoothed_wchild_vaccine_yes_prob", "weight", "v_child_vaccine_yes_prob", 6, compute_binary_response, jeffreys_multinomial_factory(5),
138+
"smoothed_wchild_vaccine_no_prob", "weight", "v_child_vaccine_no_prob", 6, compute_binary_response, jeffreys_multinomial_factory(5),
139+
"smoothed_wchild_vaccine_no_def", "weight", "v_child_vaccine_no_def", 6, compute_binary_response, jeffreys_multinomial_factory(5),
140+
135141
"smoothed_try_vaccinate_1m", "weight_unif", "v_try_vaccinate_1m", 6, compute_binary_response, jeffreys_binary,
136142
"smoothed_wtry_vaccinate_1m", "weight", "v_try_vaccinate_1m", 6, compute_binary_response, jeffreys_binary,
137143

@@ -332,11 +338,26 @@ get_binary_indicators <- function() {
332338
"smoothed_inperson_school_parttime", "weight_unif", "s_inperson_school_parttime", 6, compute_binary_response, jeffreys_binary,
333339
"smoothed_winperson_school_parttime", "weight", "s_inperson_school_parttime", 6, compute_binary_response, jeffreys_binary,
334340

335-
"smoothed_inperson_school_fulltime_oldest", "weight_unif", "s_inperson_school_fulltime_oldest", 6, compute_binary_response, jeffreys_binary,
336-
"smoothed_winperson_school_fulltime_oldest", "weight", "s_inperson_school_fulltime_oldest", 6, compute_binary_response, jeffreys_binary,
337-
"smoothed_inperson_school_parttime_oldest", "weight_unif", "s_inperson_school_parttime_oldest", 6, compute_binary_response, jeffreys_binary,
338-
"smoothed_winperson_school_parttime_oldest", "weight", "s_inperson_school_parttime_oldest", 6, compute_binary_response, jeffreys_binary,
339-
341+
"smoothed_inperson_school_fulltime_oldest", "weight_unif", "s_inperson_school_fulltime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
342+
"smoothed_winperson_school_fulltime_oldest", "weight", "s_inperson_school_fulltime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
343+
"smoothed_inperson_school_parttime_oldest", "weight_unif", "s_inperson_school_parttime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
344+
"smoothed_winperson_school_parttime_oldest", "weight", "s_inperson_school_parttime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
345+
"smoothed_wremote_school_fulltime_oldest", "weight", "s_remote_school_fulltime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
346+
347+
"smoothed_wschool_safety_measures_mask_students", "weight", "s_school_safety_measures_mask_students", 6, compute_binary_response, jeffreys_binary,
348+
"smoothed_wschool_safety_measures_mask_teachers", "weight", "s_school_safety_measures_mask_teachers", 6, compute_binary_response, jeffreys_binary,
349+
"smoothed_wschool_safety_measures_restricted_entry", "weight", "s_school_safety_measures_restricted_entry", 6, compute_binary_response, jeffreys_binary,
350+
"smoothed_wschool_safety_measures_separators", "weight", "s_school_safety_measures_separators", 6, compute_binary_response, jeffreys_binary,
351+
"smoothed_wschool_safety_measures_extracurricular", "weight", "s_school_safety_measures_extracurricular", 6, compute_binary_response, jeffreys_binary,
352+
"smoothed_wschool_safety_measures_symptom_screen", "weight", "s_school_safety_measures_symptom_screen", 6, compute_binary_response, jeffreys_binary,
353+
"smoothed_wschool_safety_measures_ventilation", "weight", "s_school_safety_measures_ventilation", 6, compute_binary_response, jeffreys_binary,
354+
"smoothed_wschool_safety_measures_testing_staff", "weight", "s_school_safety_measures_testing_staff", 6, compute_binary_response, jeffreys_binary,
355+
"smoothed_wschool_safety_measures_testing_students", "weight", "s_school_safety_measures_testing_students", 6, compute_binary_response, jeffreys_binary,
356+
"smoothed_wschool_safety_measures_vaccine_staff", "weight", "s_school_safety_measures_vaccine_staff", 6, compute_binary_response, jeffreys_binary,
357+
"smoothed_wschool_safety_measures_vaccine_students", "weight", "s_school_safety_measures_vaccine_students", 6, compute_binary_response, jeffreys_binary,
358+
"smoothed_wschool_safety_measures_cafeteria", "weight", "s_school_safety_measures_cafeteria", 6, compute_binary_response, jeffreys_binary,
359+
"smoothed_wschool_safety_measures_dont_know", "weight", "s_school_safety_measures_dont_know", 6, compute_binary_response, jeffreys_binary,
360+
340361
# beliefs
341362
"smoothed_belief_masking_effective", "weight_unif", "b_belief_masking_effective", 6, compute_binary_response, jeffreys_binary,
342363
"smoothed_wbelief_masking_effective", "weight", "b_belief_masking_effective", 6, compute_binary_response, jeffreys_binary,
@@ -396,9 +417,7 @@ get_binary_indicators <- function() {
396417
"smoothed_want_info_employment", "weight_unif", "i_want_info_employment", 6, compute_binary_response, jeffreys_binary,
397418
"smoothed_wwant_info_employment", "weight", "i_want_info_employment", 6, compute_binary_response, jeffreys_binary,
398419
"smoothed_want_info_none", "weight_unif", "i_want_info_none", 6, compute_binary_response, jeffreys_binary,
399-
"smoothed_wwant_info_none", "weight", "i_want_info_none", 6, compute_binary_response, jeffreys_binary,
400-
401-
420+
"smoothed_wwant_info_none", "weight", "i_want_info_none", 6, compute_binary_response, jeffreys_binary
402421
)
403422

404423

facebook/delphiFacebook/R/contingency_indicators.R

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ get_aggs <- function() {
141141
"pct_vaccinate_children", "v_vaccinate_children", compute_binary, jeffreys_binary,
142142
"pct_vaccinate_child_oldest", "v_vaccinate_child_oldest", compute_binary, jeffreys_binary,
143143

144+
"pct_child_vaccine_already", "v_child_vaccine_already", compute_binary, jeffreys_multinomial_factory(5),
145+
"pct_child_vaccine_yes_def", "v_child_vaccine_yes_def", compute_binary, jeffreys_multinomial_factory(5),
146+
"pct_child_vaccine_yes_prob", "v_child_vaccine_yes_prob", compute_binary, jeffreys_multinomial_factory(5),
147+
"pct_child_vaccine_no_prob", "v_child_vaccine_no_prob", compute_binary, jeffreys_multinomial_factory(5),
148+
"pct_child_vaccine_no_def", "v_child_vaccine_no_def", compute_binary, jeffreys_multinomial_factory(5),
149+
144150
"pct_accept_vaccine_defyes", "v_accept_vaccine_defyes", compute_binary, jeffreys_multinomial_factory(4),
145151
"pct_accept_vaccine_probyes", "v_accept_vaccine_probyes", compute_binary, jeffreys_multinomial_factory(4),
146152
"pct_accept_vaccine_probno", "v_accept_vaccine_probno", compute_binary, jeffreys_multinomial_factory(4),
@@ -448,11 +454,39 @@ get_aggs <- function() {
448454

449455
# schooling
450456
"pct_inperson_school_fulltime", "s_inperson_school_fulltime", compute_binary, jeffreys_binary,
451-
"pct_inperson_school_parttime", "s_inperson_school_parttime", compute_binary, jeffreys_binary
457+
"pct_inperson_school_parttime", "s_inperson_school_parttime", compute_binary, jeffreys_binary,
458+
459+
"pct_remote_school_fulltime_oldest", "s_remote_school_fulltime_oldest", compute_binary, jeffreys_multinomial_factory(3),
460+
"pct_inperson_school_fulltime_oldest", "s_inperson_school_fulltime_oldest", compute_binary, jeffreys_multinomial_factory(3),
461+
"pct_inperson_school_parttime_oldest", "s_inperson_school_parttime_oldest", compute_binary, jeffreys_multinomial_factory(3),
462+
463+
"pct_school_safety_measures_mask_students", "s_school_safety_measures_mask_students", compute_binary, jeffreys_binary,
464+
"pct_school_safety_measures_mask_teachers", "s_school_safety_measures_mask_teachers", compute_binary, jeffreys_binary,
465+
"pct_school_safety_measures_restricted_entry", "s_school_safety_measures_restricted_entry", compute_binary, jeffreys_binary,
466+
"pct_school_safety_measures_separators", "s_school_safety_measures_separators", compute_binary, jeffreys_binary,
467+
"pct_school_safety_measures_extracurricular", "s_school_safety_measures_extracurricular", compute_binary, jeffreys_binary,
468+
"pct_school_safety_measures_symptom_screen", "s_school_safety_measures_symptom_screen", compute_binary, jeffreys_binary,
469+
"pct_school_safety_measures_ventilation", "s_school_safety_measures_ventilation", compute_binary, jeffreys_binary,
470+
"pct_school_safety_measures_testing_staff", "s_school_safety_measures_testing_staff", compute_binary, jeffreys_binary,
471+
"pct_school_safety_measures_testing_students", "s_school_safety_measures_testing_students", compute_binary, jeffreys_binary,
472+
"pct_school_safety_measures_vaccine_staff", "s_school_safety_measures_vaccine_staff", compute_binary, jeffreys_binary,
473+
"pct_school_safety_measures_vaccine_students", "s_school_safety_measures_vaccine_students", compute_binary, jeffreys_binary,
474+
"pct_school_safety_measures_cafeteria", "s_school_safety_measures_cafeteria", compute_binary, jeffreys_binary,
475+
"pct_school_safety_measures_dont_know", "s_school_safety_measures_dont_know", compute_binary, jeffreys_binary
452476
)
453477

454478
aggs <- create_aggs_product(regions, groups, indicators)
455-
479+
480+
481+
monthly_indicators <- tribble(
482+
~name, ~metric, ~compute_fn, ~post_fn,
483+
"pct_child_school_public", "s_child_school_public", compute_binary, jeffreys_multinomial_factory(5),
484+
"pct_child_school_private", "s_child_school_private", compute_binary, jeffreys_multinomial_factory(5),
485+
"pct_child_school_homeschool", "s_child_school_homeschool", compute_binary, jeffreys_multinomial_factory(5),
486+
"pct_child_school_not", "s_child_school_not", compute_binary, jeffreys_multinomial_factory(5),
487+
"pct_child_school_other", "s_child_school_other", compute_binary, jeffreys_multinomial_factory(5)
488+
)
489+
monthly_aggs <- create_aggs_product(regions, groups, monthly_indicators)
456490

457491
### Include handful of original public tables not already covered by set above
458492
common_group <- c("agefull", "gender", "race", "hispanic")
@@ -509,7 +543,7 @@ get_aggs <- function() {
509543
aggs <- rbind(aggs, cut1_aggs, cut2_aggs, cut3_aggs, cut456_aggs, cut456_marginal_aggs)
510544

511545
weekly_aggs <- aggs
512-
monthly_aggs <- aggs
546+
monthly_aggs <- rbind(aggs, monthly_aggs)
513547

514548
return(list("week"=weekly_aggs, "month"=monthly_aggs))
515549
}

facebook/delphiFacebook/R/responses.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ load_response_one <- function(input_filename, params, contingency_run) {
193193
input_data <- code_activities(input_data, wave)
194194
input_data <- code_vaccines(input_data, wave)
195195
input_data <- code_schooling(input_data, wave)
196+
input_data <- code_children(input_data, wave)
196197
input_data <- code_beliefs(input_data, wave)
197198
input_data <- code_news_and_info(input_data, wave)
198199
input_data <- code_gender(input_data, wave)

0 commit comments

Comments
 (0)