Skip to content
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

added nosocomial death analysis section #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

kya2
Copy link
Contributor

@kya2 kya2 commented Nov 1, 2019

I added nosocomial death analysis section with the new MLL community_hcf designation.

@thibautjombart
Copy link
Contributor

Thanks for this. The report is currently failing for me:

/// compiling report: 'temporal_trends_2019-10-17'


processing file: temporal_trends_2019-10-17.Rmd
  |.                                                                |   2%
   inline R code fragments

  |..                                                               |   4%
label: setup (with options) 
List of 1
 $ include: logi FALSE

  |....                                                             |   5%
  ordinary text without R code

  |.....                                                            |   7%
label: read_scripts

Global cleaning rules have been imported from:
 'dictionary/cleaning_rules.xlsx'
and stored into: 'cleaning_rules'.

You can use these to clean data with linelist's function:
'clean_data(... , wordlists = cleaning_rules)'.
  |......                                                           |   9%
  ordinary text without R code

  |.......                                                          |  11%
label: load_data
  |........                                                         |  13%
   inline R code fragments

  |.........                                                        |  15%
label: add_top_zones
  |...........                                                      |  16%
  ordinary text without R code

  |............                                                     |  18%
label: filter
  |.............                                                    |  20%
  ordinary text without R code

  |..............                                                   |  22%
label: custom_colors
  |...............                                                  |  24%
  ordinary text without R code

  |.................                                                |  25%
label: contacts_overall
  |..................                                               |  27%
  ordinary text without R code

  |...................                                              |  29%
label: contacts_sub_coordination
Quitting from lines 347-437 (temporal_trends_2019-10-17.Rmd) 
Error: Column `month_report` is unknown
In addition: Warning messages:
1: New theme missing the following elements: axis.ticks.length.x, axis.ticks.length.x.top, axis.ticks.length.x.bottom, axis.ticks.length.y, axis.ticks.length.y.left, axis.ticks.length.y.right 
2: a tie among values (butembo, katwa, kayna, kyondo) was broken by choosing the first value 

@eeg31
Copy link
Contributor

eeg31 commented Dec 18, 2019

likewise I've submitted a new pull request with Aminata's updates to this report

Copy link
Contributor

@thibautjombart thibautjombart left a comment

Choose a reason for hiding this comment

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

Again, sorry for a fast review:

  • I can confirm the new version compiles fine with the current data (Tues 17 Dec 2019) and looks fine (beautiful!) on my laptop
  • new code looks good
  • one caveat to check out (not necessarily wrong per say, but need checking): the denominator for the proportions is sometimes the whole dataset, sometimes the number of non-missing observations

count(place_death_crude) %>%
spread(place_death_crude, n, fill = 0, drop = FALSE) %>%
mutate(total = nrow(x), # avoid adorn_totals
denom = total - unknown,
Copy link
Contributor

Choose a reason for hiding this comment

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

note: the denominator here excludes unknown place of death; this is not the case later

nosocomial_deaths_overall_time <- x %>%
count(epiweek_report_label, place_death_crude) %>%
spread(place_death_crude, n, fill = 0, drop = FALSE) %>%
adorn_totals(c("col"), name = "total") %>%
Copy link
Contributor

Choose a reason for hiding this comment

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

here the denominator is the total

nosocomial_deaths_sub_coordination <- x %>%
count(sous_coordination, place_death_crude) %>%
spread(place_death_crude, n, fill = 0, drop = FALSE) %>%
adorn_totals("col", name = "total") %>%
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above: denominator is the total

count(top_zones, place_death_crude) %>%
spread(place_death_crude, n, fill = 0, drop = FALSE) %>%
adorn_totals("col", name = "total") %>%
mutate(denom = total,
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, denominator is the total (including unknown)

Copy link
Contributor

@jarvisc1 jarvisc1 left a comment

Choose a reason for hiding this comment

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

Removing review request from history.

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.

4 participants