Closed aspina7 closed 5 years ago
on epicurves, when you use scale_x_date(date_breaks = "1 week") - the axis labels change to full dates, is it possible to keep it with the default 2013-W01 for example?
For this one, I think the answer is: don't use scale_x_date(date_breaks = "1 week")
since incidence should do this by default for weekly incidence.
When library(excel.link), message about someone called daniela - supress messages...
Interesting design.... the author uses the package startup message as a sort of dedication page..
The solution is suppressPackageStartupMessages(library("excel.link"))
on epicurves, when you use scale_x_date(date_breaks = "1 week") - the axis labels change to full dates, is it possible to keep it with the default 2013-W01 for example?
For this one, I think the answer is: don't use
scale_x_date(date_breaks = "1 week")
since incidence should do this by default for weekly incidence.
mmmm dont think it did though - only put the axis labels every couple of weeks, or will it automatically add them all but just making them go slanted?
mmmm dont think it did though - only put the axis labels every couple of weeks, or will it automatically add them all but just making them go slanted?
By default, it will only put labels at six points along the curve. That can be changed by setting n_breaks = nrow(<incidence object>)
in the plot function. I'll make a quick PR to fix it
on epicurves - possible to add a 2 weekly moving average?
I'm not exactly sure what this means... Does this mean that you want the epicurve on a bi-weekly basis or that you want to track data on a bi-weekly basis?
* Find a better way to reference lines/chunks (is there some kind of hyperlink function?), for "Introduction to this template" section
We've seen that referencing lines doesn't really work too well. Referencing chunks by name is the best way to go so far.
Were we going to find a way around not using do(..)?
I believe the plan is to add a stratifying option to the proportion functions so that a lot of the boilerplate can go away.
Consider adding an option to age_pyramid which returns proportions rather than counts; and option to remove NAs; Horizontal_lines does not seem to work either....
This is more than one point!
Alex: haha horizontal lines I think you fixed already and i didnt update this
on epicurves - possible to add a 2 weekly moving average?
I'm not exactly sure what this means... Does this mean that you want the epicurve on a bi-weekly basis or that you want to track data on a bi-weekly basis?
you add a line on top of the bars for epicurves, for each week you take the x number of weeks before and x number of weeks after to calculate the average. Essentially just smooths out the epicurve - useful for when your surveillance/reporting coverage fluctuates by week.
Can do it with rollapply in zoo package - but wonder if worth adding as an option to incidence package?
Zhian: I think this is a reasonable request for the epicurve. It seems similar to the goals of https://github.com/reconhub/incidence/issues/75 and https://github.com/reconhub/incidence/issues/83
Alex: mmm simpler than those requests. In most cases, for each week - you take the counts from x number of weeks before, average those counts and plot for that week. See ecdc report
essentially it would be: Case counts: week 1 = 2, week 2 = 3, week 3 = 3, week 4 = 4 2 week retrospective moving average: week 1 = NA, week 2 = NA, week 3 = 2.5, week 4 = 3
Zhian: Yup, but the I would need to write a general function that would annotate the epicurve, which would also fit those purposes.
Were we going to find a way around not using do(..)?
I believe the plan is to add a stratifying option to the proportion functions so that a lot of the boilerplate can go away.
you or me?
Zhian: I could give it a stab
- [ZHIAN] consider option of add_totals for proportions function,- so it just sums the counts of res, then runs proportions function and bind_rows. If you look at what I did in the CFR section of the cholera template, having to bind_rows of an overall and a group specific CFR calculation is a bit long winded....
I think this and getting rid of do()
are intertwined....
Everywhere:
[x] [Zhian] text size in plots doesnt respond to theme_set base_size from setup chunk; only when setting element_text in the plot itself. Need to adapt outbreak and survey templates accordingly.
[x]
[Discussion] would be good to also output a document (beside the word) which summarises what datasets were used (and their file paths), starting cases, dropped cases where the output is. And maybe warnings/errors?[moved to nice-to-haves pr][x] [Zhian] in tab_* functions, change the warning when dropping NAs to be "call. = FALSE" to the warning function - as descriptive is no longer a user-facing function.
[x] [Zhian] add a license to the repo? see https://github.com/R4EPI/sitrep/issues/44
[x] [Kate/Neale / Alex / Zhian] decide if also want to show code for making implicit NAs out of explicit e.g. "Missing" chars to NA. So if you want to make "No answer" an implicit NA, you would use fct_recode(NULL = "No answer")
[x] [Kate] update all sitrep::descriptive tables with groupers to use sitrep::rename_redundant and augment_redundant for renaming similar columns
[x]
[Neale] Add chi-squared test and t.test examples to website (there is already an example of this in the vaccination survey)[moved to https://github.com/R4EPI/R4EPIs-website/issues/19#issue-494502584 on website][x] [Zhian/Alex] consider dropping sitrep::discreptive in favour of arsenal::tableby (dplyr compatible? simple enough syntax for beginners?) - decided against, syntax too dense
[x] [Neale] Under "## Installing and loading required packages " add that can check where your packages are using .libPaths() and give link to wiki/training material. Currently only says: "Program Files/R/R-[version]/library" which wont always be the case (particularly on MSF computers).
[x] [Neale?] double check that case_when is doing what it should when NAs are involved. case_when doesnt leave NAs as NAs, need to add extra argument. see below:
[x] [Neale?] switch all factor stuff to forcats (swap recode_factor out) - cross reference with point under "surveys" - all of the factor cleaning needs a bit of a fix
[x] [Neale] add to intro to templates that feedback is always welcome via github. a la https://github.com/R4EPI/sitrep/issues/33#issue-400251292
[x] [Alex] check the ceramics package as a map tile solution. See spatial analysis issue. Package is not quite there yet, but may be in the future.
[x] [Alex] Clean up sitrep::univariate_analysis - lot of unecessary repeating. Also need to add stratified.
Surveys:
Extras:
[NICE TO HAVE] if have time then add in the options to add sample size calculations see https://github.com/R4EPI/sitrep/issues/5[moved to nice to have pr][NICE TO HAVE] on all plots - make y axis numbering go to top of axis, this happens because of expand(c(0,0)[moved to nice to have pr][see: https://github.com/reconhub/incidence/issues/105] on epicurves - possible to add a 2 weekly moving average? - issue posted on recon. Long term issue case.[moved to nice to have pr]Outbreaks:
[x] [ZHIAN] Fix cowplot alignment of epicurvs and ar/cfr, so that ticks are in the middle of bars
From measles:
#### Demographics