Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples to timeset documentation #203

Open
capnrefsmmat opened this issue Nov 4, 2023 · 0 comments
Open

Add examples to timeset documentation #203

capnrefsmmat opened this issue Nov 4, 2023 · 0 comments

Comments

@capnrefsmmat
Copy link
Contributor

The timeset documentation describes the valid inputs for arguments like time_values:

epidatr/R/model.R

Lines 65 to 88 in ee952c5

#' Timeset
#'
#' @description
#' Many API calls accept timesets to specify the time ranges of data being
#' requested. Timesets can be specified with `epirange()`, as `Date` objects, or
#' with wildcards.
#'
#' Timesets are not special R types; the term simply describes any value that
#' would be accepted by epidatr to specify the time value of an epidata query.
#' The allowed values are:
#'
#' - Dates: `Date` instances, integer-like values, or integer-like strings that
#' take the form YYYYMMDD.
#' - Epiweeks: Integer-like values or integer-like strings that take the form
#' YYYYWW.
#' - EpiRanges: A range returned by `epirange()`, or a list of multiple ranges.
#' - Wildcard: The string `"*"`, which request all available time values.
#'
#' Please refer to the specific endpoint documentation for guidance on using
#' dates vs weeks. Most endpoints support only one or the other. Some (less
#' commonly used) endpoints may not accept the `"*"` wildcard, but this can be
#' simulated with a large `epirange()`.
#'
#' @name timeset

This should include an @examples section with examples of various different timesets, with labels saying how they're interpreted.

Since timesets are linked in every API function that takes them as input, this should serve as the primary documentation of how to set dates, instead of deferring to epirange and other things.

@dsweber2 dsweber2 added this to the Z: epidatr & epidatpy milestone Nov 8, 2023
@nmdefries nmdefries self-assigned this Nov 29, 2023
@nmdefries nmdefries removed their assignment Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants