-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature request: new epiweek/epiyear functions would benefit from option to use "US-CDC" defn or "isoweek" #564
Comments
I have just looked into it, and I am afraid I either misunderstood this issue or you simply want |
You are right. With the “Monday” option, this would replicate isoweek. Adding this option (and this bit of documentation) will clarify the distinction between the US CDC version of epiweek and the notion of epiweek used in many other parts of the world.
An alternative that comes to mind would be to refer to isoweek as the appropriate choice of functions when the user desires the non-US definition to be used.
I suppose I was trying to clarify things in response to the many queries on the web from people trying to understand the US definition of epieweek and how it differs from the definition used elsewhere.
Thanks for looking into this. Either solution would close this from my perspective.
From: Vitalie Spinu [mailto:notifications@github.com]
Sent: Tuesday, October 3, 2017 2:31 PM
To: tidyverse/lubridate <lubridate@noreply.github.com>
Cc: Robert Balshaw <Robert.Balshaw@umanitoba.ca>; Author <author@noreply.github.com>
Subject: Re: [tidyverse/lubridate] Feature request: new epiweek/epiyear functions would benefit from option to use "US-CDC" defn or "isoweek" (#564)
I have just looked into it, and I am afraid I either misunderstood this issue or you simply want isoweek and isoyear. isoweek is like eipiweek but starts on Monday, same for isoyear. So there is no issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#564 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AS8Q_-uPfESEFT5iK-SSBN64_0oSmtpHks5soot_gaJpZM4OTFDg>.
|
Ok. I am altering the documentation then: #' @description `epiweek()` is the US CDC version of epidemiological week. It
#' follows same rules as `isoweek()` but starts on Sunday. In other parts of
#' the world the convention is to start epidemiological weeks on Monday,
#' which is the same as `isoweek`. If I ever write a new datetime package, everything will be ISO by default :) |
Thanks. That’s a tidier solution.
Rob
From: Vitalie Spinu [mailto:notifications@github.com]
Sent: Tuesday, October 3, 2017 3:39 PM
To: tidyverse/lubridate <lubridate@noreply.github.com>
Cc: Robert Balshaw <Robert.Balshaw@umanitoba.ca>; Author <author@noreply.github.com>
Subject: Re: [tidyverse/lubridate] Feature request: new epiweek/epiyear functions would benefit from option to use "US-CDC" defn or "isoweek" (#564)
Ok. I am altering the documentation then:
#' @description `epiweek()` is the US CDC version of epidemiological week. It
#' follows same rules as `isoweek()` but starts on Sunday. In other parts of
#' the world the convention is to start epidemiological weeks on Monday,
#' which is the same as `isoweek`.
If I ever write a new datetime package, everything will be ISO by default :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#564 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AS8Q_zd0p1aeIyP_i8DASbeXnIjaUCSEks5soptegaJpZM4OTFDg>.
|
Hi @vspinu I assume the documentation for
... with no mention of US vs ISO. |
Hi – I’ve not been part of this conversation for a long time, but I’d suggest that though the connection to the US vs. ISO definitions is implicitly there, it would be good to be explicit.
Rob
From: Stéphane Guillou [mailto:notifications@github.com]
Sent: Tuesday, July 23, 2019 12:19 AM
To: tidyverse/lubridate <lubridate@noreply.github.com>
Cc: Robert Balshaw <Robert.Balshaw@umanitoba.ca>; Author <author@noreply.github.com>
Subject: Re: [tidyverse/lubridate] Feature request: new epiweek/epiyear functions would benefit from option to use "US-CDC" defn or "isoweek" (#564)
Hi @vspinu<https://github.com/vspinu>
I assume the documentation for epiyear() should also have the same information? Currently it only says:
epiyear() returns years according to the epidemilogical week calendars.
... with no mention of US vs ISO.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#564?email_source=notifications&email_token=AEXRB7ZSHEKEIWAUJ6L3PDLQA2IDVA5CNFSM4DSMKDQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2R6NBI#issuecomment-514057861>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEXRB7Y62FA3W3ZCYQEIGODQA2IDVANCNFSM4DSMKDQA>.
|
<< continuing a discussion in #492 >>
The US/CDC uses an epiweek defined as starting on Sunday. Much of the rest of the world uses epiweeks that start on Monday (as in the definitions used by
isoweek
).It would be helpful if the epiweek and epiyear functions had an option to permit the choice of either definition, perhaps following the
week_start
option as inwday
?As well, the documentation could indicate the rationale for this option, perhaps something as simple as
"The US/CDC uses an epiweek defined as starting on Sunday. Much of the rest of the world uses epiweeks starting on Monday -- as in the definitions used by
isoweek
.Could these be added?
Thank you!
The text was updated successfully, but these errors were encountered: