@@ -440,12 +440,6 @@ get_aggs <- function() {
440
440
" pct_inperson_school_fulltime_oldest" , " s_inperson_school_fulltime_oldest" , compute_binary , jeffreys_multinomial_factory(3 ),
441
441
" pct_inperson_school_parttime_oldest" , " s_inperson_school_parttime_oldest" , compute_binary , jeffreys_multinomial_factory(3 ),
442
442
443
- " pct_child_school_public" , " s_child_school_public" , compute_binary , jeffreys_multinomial_factory(5 ),
444
- " pct_child_school_private" , " s_child_school_private" , compute_binary , jeffreys_multinomial_factory(5 ),
445
- " pct_child_school_homeschool" , " s_child_school_homeschool" , compute_binary , jeffreys_multinomial_factory(5 ),
446
- " pct_child_school_not" , " s_child_school_not" , compute_binary , jeffreys_multinomial_factory(5 ),
447
- " pct_child_school_other" , " s_child_school_other" , compute_binary , jeffreys_multinomial_factory(5 ),
448
-
449
443
" pct_school_safety_measures_mask_students" , " s_school_safety_measures_mask_students" , compute_binary , jeffreys_binary ,
450
444
" pct_school_safety_measures_mask_teachers" , " s_school_safety_measures_mask_teachers" , compute_binary , jeffreys_binary ,
451
445
" pct_school_safety_measures_restricted_entry" , " s_school_safety_measures_restricted_entry" , compute_binary , jeffreys_binary ,
@@ -458,20 +452,21 @@ get_aggs <- function() {
458
452
" pct_school_safety_measures_vaccine_staff" , " s_school_safety_measures_vaccine_staff" , compute_binary , jeffreys_binary ,
459
453
" pct_school_safety_measures_vaccine_students" , " s_school_safety_measures_vaccine_students" , compute_binary , jeffreys_binary ,
460
454
" pct_school_safety_measures_cafeteria" , " s_school_safety_measures_cafeteria" , compute_binary , jeffreys_binary ,
461
- " pct_school_safety_measures_dont_know" , " s_school_safety_measures_dont_know" , compute_binary , jeffreys_binary ,
455
+ " pct_school_safety_measures_dont_know" , " s_school_safety_measures_dont_know" , compute_binary , jeffreys_binary
456
+ )
462
457
463
- # misc children
464
- " pct_has_child_under_18" , " ch_has_child_under_18" , compute_binary , jeffreys_binary ,
458
+ aggs <- create_aggs_product(regions , groups , indicators )
465
459
466
- " pct_oldest_child_under_5" , " ch_oldest_child_under_5" , compute_binary , jeffreys_multinomial_factory(4 ),
467
- " pct_oldest_child_5_to_11" , " ch_oldest_child_5_to_11" , compute_binary , jeffreys_multinomial_factory(4 ),
468
- " pct_oldest_child_12_to_15" , " ch_oldest_child_12_to_15" , compute_binary , jeffreys_multinomial_factory(4 ),
469
- " pct_oldest_child_16_to_17" , " ch_oldest_child_16_to_17" , compute_binary , jeffreys_multinomial_factory(4 )
470
460
461
+ monthly_indicators <- tribble(
462
+ ~ name , ~ metric , ~ compute_fn , ~ post_fn ,
463
+ " pct_child_school_public" , " s_child_school_public" , compute_binary , jeffreys_multinomial_factory(5 ),
464
+ " pct_child_school_private" , " s_child_school_private" , compute_binary , jeffreys_multinomial_factory(5 ),
465
+ " pct_child_school_homeschool" , " s_child_school_homeschool" , compute_binary , jeffreys_multinomial_factory(5 ),
466
+ " pct_child_school_not" , " s_child_school_not" , compute_binary , jeffreys_multinomial_factory(5 ),
467
+ " pct_child_school_other" , " s_child_school_other" , compute_binary , jeffreys_multinomial_factory(5 )
471
468
)
472
-
473
- aggs <- create_aggs_product(regions , groups , indicators )
474
-
469
+ monthly_aggs <- create_aggs_product(regions , groups , monthly_indicators )
475
470
476
471
# ## Include handful of original public tables not already covered by set above
477
472
common_group <- c(" agefull" , " gender" , " race" , " hispanic" )
@@ -528,7 +523,7 @@ get_aggs <- function() {
528
523
aggs <- rbind(aggs , cut1_aggs , cut2_aggs , cut3_aggs , cut456_aggs , cut456_marginal_aggs )
529
524
530
525
weekly_aggs <- aggs
531
- monthly_aggs <- aggs
526
+ monthly_aggs <- rbind( aggs , monthly_aggs )
532
527
533
528
return (list (" week" = weekly_aggs , " month" = monthly_aggs ))
534
529
}
0 commit comments