R4EPI / sitrep

Report templates and helper functions for applied epidemiology
https://r4epi.github.io/sitrep/
GNU General Public License v3.0
40 stars 14 forks source link

To Do List #70

Closed aspina7 closed 5 years ago

aspina7 commented 5 years ago

Everywhere:


Surveys:


Extras:


Outbreaks:

From measles:





zkamvar commented 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.

zkamvar commented 5 years ago

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"))

aspina7 commented 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.

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?

zkamvar commented 5 years ago

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

zkamvar commented 5 years ago

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?

zkamvar commented 5 years ago
* 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.

zkamvar commented 5 years ago

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.

zkamvar commented 5 years ago

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

aspina7 commented 5 years ago

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.

aspina7 commented 5 years ago

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

zkamvar commented 5 years ago
  • [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....