Closed thibautjombart closed 6 years ago
We may be interested in the R package MMWRweek, which provides functionality to convert Dates to MMWR day, week, and year and the reverse according to the MMWR week definition.
I expected you'd have good suggestions @caijun ;) Definitely looks relevant. Beyond this one, there was a question of using arbitrary epi week definition. I think this may actually motivate a small package in its own right. Could be a wrapper for isoweek and MMWRweek, and then some further code to implement arbitrary week definition. What do you think?
@thibautjombart could you give a specific example of using arbitrary epi week?
Moreover, before developing a new package epiweek
, I think we need to summarise various definitions of weeks used in epidemiological reports, e.g. ISO 8601 week, MMWR week etc. Any other epi weeks?
@caijun for arbitrary week definition, I mean week 0 or 1 could be the week of the first reported case, or the first onset of symptoms. It means generally speaking we should be able to count weeks from a given day. Formally, that means we'd find week definitions so that:
Does it make sense?
I see. Yes, there are various epidemiological data analysis using the (reporting, symptom onset, confirmation, whatever) date of the first case as the start of the week. Definitely, we should support this kind of definition of epi week.
Besides, I find a useful discussion on epidemiological week definitions. It listed five types of epi weeks. Together with the arbitrary week you mentioned, I think the epiweek
package should support 6 kinds of epi week definitions.
Besides, from the above SO discussion, we see that sometimes one may not be able to reproduce the epidemic curve because of using the incorrect epi week definition. Therefore, it's necessary to develop a epiweek package to guide epidemiologists the usages of different epi week definitions. Of course, it is necessary to point out the epi week definition in epidemiological reports, especially when weekly epidemic curve is presented.
The url may also be helpful.
Thanks for the useful links. Besides, I not there is an epiweek package: https://cran.r-project.org/web/packages/EpiWeek/index.html
But it only covers part of what we are discussing here. It would be useful to post this on the forum, see if others have comments / suggestions. Would you like to start this, or shall I?
Unrelated: if we create a RECON package for epi weeks, would you like to lead this?
I just glimpse the manual of the EpiWeek package and it involves only one definition of epidemiological week. It's a good idea to post this issue on the forum to see whether it's necessary to develop such an R package. I think it's better that you post this issue on the forum so that more people maybe participate in the discussion.
I am glad to lead the development of the RECON package for epi weeks.
Great for the package lead. Will post and link from here.
Posted on the forum: http://discourse.repidemicsconsortium.org/t/epiweeks-what-do-people-need/84
I will summarise feedback here.
Key issue to address: what do we call the package? There is an epitrix.. could be an epiwix?
How about epiweeks
? But it very similar to the existing R package EpiWeek
. epiwix
is pronounced as epiweeks
, is a good choice.
Yes a bit too similar - this is why I thought a mis-spelled version was an alternative ;)
OK, let's name it epiwix
.
I don't know if this is still ongoing. If it is, it is externalised, so closing this issue.
Ask Johannes @ WHO :)