Skip to content

[CTIS] New child schooling and child age indicators for Wave 12 #1541

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 7 commits into from
Apr 4, 2022

Conversation

nmdefries
Copy link
Contributor

Description

Add new indicators to both API and contingency tables at FB's request.

Add new variable creation function for non-schooling, non-vaccine children-related items (e.g. age breakdown).

Changelog

  • binary.R
  • contingency_indicators.R
  • variables.R
  • responses.R

@nmdefries nmdefries changed the title [CTIS] New ... indicators for Wave 12 [CTIS] New child schooling and child age indicators for Wave 12 Feb 28, 2022
Copy link
Contributor

@capnrefsmmat capnrefsmmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I want to push back on a couple of the API additions because I don't think they're really necessary for the API, just for contingency tables.

Also, we're going to need to add these all to the documentation pages for the API and contingency tables, which should be... fun.

Comment on lines 408 to 414
# misc children
"smoothed_whas_child_under_18", "weight", "ch_has_child_under_18", 6, compute_binary_response, jeffreys_binary,

"smoothed_woldest_child_under_5", "weight", "ch_oldest_child_under_5", 6, compute_binary_response, jeffreys_multinomial_factory(4),
"smoothed_woldest_child_5_to_11", "weight", "ch_oldest_child_5_to_11", 6, compute_binary_response, jeffreys_multinomial_factory(4),
"smoothed_woldest_child_12_to_15", "weight", "ch_oldest_child_12_to_15", 6, compute_binary_response, jeffreys_multinomial_factory(4),
"smoothed_woldest_child_16_to_17", "weight", "ch_oldest_child_16_to_17", 6, compute_binary_response, jeffreys_multinomial_factory(4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need daily updates on these in the API, unless we want to track the COVID baby boom... seems like something for demographic contingency tables. Was this part of a list from Facebook?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, they're all from FB. I'll loop you in on Asana.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed from API and weekly/monthly contingency tables with plan to include in demographic contingency tables.

Comment on lines 327 to 331
"smoothed_wchild_school_public", "weight", "s_child_school_public", 6, compute_binary_response, jeffreys_multinomial_factory(5),
"smoothed_wchild_school_private", "weight", "s_child_school_private", 6, compute_binary_response, jeffreys_multinomial_factory(5),
"smoothed_wchild_school_homeschool", "weight", "s_child_school_homeschool", 6, compute_binary_response, jeffreys_multinomial_factory(5),
"smoothed_wchild_school_not", "weight", "s_child_school_not", 6, compute_binary_response, jeffreys_multinomial_factory(5),
"smoothed_wchild_school_other", "weight", "s_child_school_other", 6, compute_binary_response, jeffreys_multinomial_factory(5),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure these need to be in the API, since we don't expect them to change rapidly over time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed from API. Added to monthly contingency tables only.

@@ -193,6 +193,7 @@ load_response_one <- function(input_filename, params, contingency_run) {
input_data <- code_activities(input_data, wave)
input_data <- code_vaccines(input_data, wave)
input_data <- code_schooling(input_data, wave)
input_data <- code_children(input_data, wave)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function name sounds ominous

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@nmdefries nmdefries requested a review from capnrefsmmat April 1, 2022 21:03
@nmdefries
Copy link
Contributor Author

@krivard This is ready to merge and deploy

@krivard krivard merged commit e5196eb into main Apr 4, 2022
@krivard krivard deleted the ndefries/wave12-new-indicators branch April 4, 2022 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants