Skip to content

paula updates to ajs #331

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

Open
wants to merge 1 commit into
base: recode_templates
Choose a base branch
from
Open

paula updates to ajs #331

wants to merge 1 commit into from

Conversation

aspina7
Copy link
Member

@aspina7 aspina7 commented Mar 20, 2025

Updated so that:

  • some chunk rearrangement and simplification to be more straight forward
  • accordingly renamed some chunks (e.g. prep_nonDHIS_data not appropriate as there are several chunks)
  • Removal of summarytools as doesn't work
  • Clearer explanations
  • Age calculations corrected (note still need to check 2 months = 62 days or 56? Show years at 24 months onwards?).
  • Other typos corrected

Note it's now aligned with the measles outbreak recode Rmd.

Updated so that:

- some chunk rearrangement and simplification to be more straight forward
- accordingly renamed some chunks (e.g. prep_nonDHIS_data not appropriate as there are several chunks)
- Removal of summarytools as doesn't work
- Clearer explanations
- Age calculations corrected (note still need to check 2 months = 62 days or 56? Show years at 24 months onwards?).
- Other typos corrected

Note it's now aligned with the measles outbreak recode Rmd.
Copy link
Member Author

@aspina7 aspina7 left a comment

Choose a reason for hiding this comment

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

@PBBlomquist couple comments



#linelist_raw <- rio::import(here::here("Data", "linelist.xlsx"), which = "Sheet1")
linelist_raw <- import("dat_msl.RDS")
Copy link
Member Author

Choose a reason for hiding this comment

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

think you just forgot to remove your line of rds data?

This chunk demonstrates how to recode factor variables. You will need to add to
it based on your dataset by comparing to the variables in the standard data
dictionary.
This chunk is for recoding factor (categorical) variables. You will need to edit this section to recode the values in your dataset to suit the values in the expected linelist format. You can look at the data dictionary object (`recode_dict`) and the outputs from the `browse_data` chunk to write the correct code.
Copy link
Member Author

Choose a reason for hiding this comment

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

can stick to 80 characters a line pls? theres a setting in rstudio to have guideline show

age_num >=2 & age_unit == "Year" ~ age_num,
age_num >= 24 & age_unit == "Month" ~ as.numeric(age_num * 12),
age_num >=2 & age_unit == "Year" ~ as.numeric(age_num),
age_num >= 24 & age_unit == "Month" ~ as.numeric(age_num / 12),
Copy link
Member Author

Choose a reason for hiding this comment

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

lolz oops

age_num >=2 & age_unit == "Month" ~ age_num,
age_num >=56 & age_unit == "Day" ~ as.numeric(age_num / 30),
age_num >=2 & age_num <24 & age_unit == "Month" ~ age_num,
age_num >=62 & age_num < 730 & age_unit == "Day" ~ as.numeric(age_num / 30),
Copy link
Member Author

Choose a reason for hiding this comment

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

happy with leaving as 62, the reason i put over 56 is that if they are born jan or feb then they could be two months old at 59 days .... with the added brainfart that i just multiplied 28 by 2.

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.

2 participants