Date support for {epidemics} #210
pratikunterwegs
started this conversation in
General
Replies: 1 comment 1 reply
-
Thanks for sharing. Getting dates and timesteps is always a big time sink when working with models alongside data. A few thoughts, building on experiences of interacting with various models and packages:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion comes from a query by @sbfnk as to what it would take for {epidemics} to be suitable for submitting output to scenario modelling hubs; an example of the submission requirements and guidelines can be found on the Midas Hub flu modelling repo.
{epidemics} currently has very basic support for time as it returns a 'time' column that is to be interpreted as 'days since start of epidemic', which might make it challenging to use the package for scenario modelling over a specific timeframe with defined start and end dates. This sort of functionality was needed when {epidemics} was used recently for this report.
This Gist shows a prototype of new functionality in the default model that improves how time is handled. This can be tried from the
dev-epiweek
branch.time_end
andincrement
arguments have been removed;time_end
has been replaced byduration
, which is expected to be the epidemic duration in days;increment
is now set to a default of 1.0, which is expected to be 1 day;start_date
argument allows an optional start date to be passed by the user; defaulting to the current date.Note that the example plot spans the year end causing the epiweek to reset.
This functionality could be extended to all models - it would be great to hear what could be added to serve related use cases.
Beta Was this translation helpful? Give feedback.
All reactions