Skip to content

Commit

Permalink
Merge branch 'dev' into ndefries/epidatasets-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Oct 2, 2024
2 parents e04f5a7 + 44e7095 commit b6a7d58
Show file tree
Hide file tree
Showing 74 changed files with 4,225 additions and 3,790 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
^.lintr$
^DEVELOPMENT.md$
man-roxygen
^.venv$
^sandbox.R$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ docs
renv/
renv.lock
.Rprofile
sandbox.R
49 changes: 29 additions & 20 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Type: Package
Package: epiprocess
Title: Tools for basic signal processing in epidemiology
Version: 0.8.4
Version: 0.9.0
Authors@R: c(
person("Jacob", "Bien", role = "ctb"),
person("Logan", "Brooks", email = "[email protected]", role = c("aut", "cre")),
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
person("Rafael", "Catoia", role = "ctb"),
person("Nat", "DeFries", role = "ctb"),
person("Daniel", "McDonald", role = "aut"),
Expand All @@ -15,27 +15,35 @@ Authors@R: c(
person("Evan", "Ray", role = "aut"),
person("Dmitry", "Shemetov", role = "ctb"),
person("Ryan", "Tibshirani", role = "aut"),
person("Lionel", "Henry", role = "ctb", comment = "Author of included rlang fragments"),
person("Hadley", "Wickham", role = "ctb", comment = "Author of included rlang fragments"),
person("Posit", role = "cph", comment = "Copyright holder of included rlang fragments"),
person("Johns Hopkins University Center for Systems Science and Engineering", role = "dtc", comment = "Owner of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
person("Johns Hopkins University", role = "cph", comment = "Copyright holder of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
person("Carnegie Mellon University Delphi Group", role = "dtc", comment = "Owner of claims-based CLI data from the Delphi Epidata API")
person("Lionel", "Henry", role = "ctb",
comment = "Author of included rlang fragments"),
person("Hadley", "Wickham", role = "ctb",
comment = "Author of included rlang fragments"),
person("Posit", role = "cph",
comment = "Copyright holder of included rlang fragments"),
person("Johns Hopkins University Center for Systems Science and Engineering", role = "dtc",
comment = "Owner of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
person("Johns Hopkins University", role = "cph",
comment = "Copyright holder of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
person("Carnegie Mellon University Delphi Group", role = "dtc",
comment = "Owner of claims-based CLI data from the Delphi Epidata API")
)
Description: This package introduces a common data structure for epidemiological
data reported by location and time, provides another data structure to
work with revisions to these data sets over time, and offers associated
utilities to perform basic signal processing tasks.
Description: This package introduces a common data structure for
epidemiological data reported by location and time, provides another
data structure to work with revisions to these data sets over time,
and offers associated utilities to perform basic signal processing
tasks.
License: MIT + file LICENSE
Copyright: file inst/COPYRIGHTS
URL: https://cmu-delphi.github.io/epiprocess/
Depends:
R (>= 3.6)
Imports:
checkmate,
cli,
data.table,
dplyr (>= 1.0.8),
epidatasets,
genlasso,
glue,
ggplot2,
lifecycle (>= 1.0.1),
lubridate,
Expand All @@ -48,7 +56,8 @@ Imports:
tidyselect (>= 1.2.0),
tsibble,
utils,
vctrs
vctrs,
waldo
Suggests:
covidcast,
devtools,
Expand All @@ -63,21 +72,21 @@ VignetteBuilder:
Remotes:
cmu-delphi/epidatasets,
cmu-delphi/epidatr,
reconverse/outbreaks,
glmgen/genlasso
glmgen/genlasso,
reconverse/outbreaks
Config/testthat/edition: 3
Config/testthat/parallel: true
Copyright: file inst/COPYRIGHTS
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Depends:
R (>= 2.10)
URL: https://cmu-delphi.github.io/epiprocess/
Collate:
'archive.R'
'autoplot.R'
'correlation.R'
'epi_df.R'
'epi_df_forbidden_methods.R'
'epiprocess.R'
'group_by_epi_df_methods.R'
'methods-epi_archive.R'
Expand Down
10 changes: 10 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

S3method("[",epi_df)
S3method("names<-",epi_df)
S3method(Summary,epi_df)
S3method(arrange_canonical,default)
S3method(arrange_canonical,epi_df)
S3method(arrange_col_canonical,default)
S3method(arrange_col_canonical,epi_df)
S3method(arrange_row_canonical,default)
S3method(arrange_row_canonical,epi_df)
S3method(as_epi_df,data.frame)
S3method(as_epi_df,epi_df)
S3method(as_epi_df,tbl_df)
Expand All @@ -27,6 +32,7 @@ S3method(group_by,epi_df)
S3method(group_by,grouped_epi_archive)
S3method(group_by_drop_default,grouped_epi_archive)
S3method(group_modify,epi_df)
S3method(group_vars,grouped_epi_archive)
S3method(groups,grouped_epi_archive)
S3method(guess_period,Date)
S3method(guess_period,POSIXt)
Expand All @@ -35,6 +41,7 @@ S3method(key_colnames,data.frame)
S3method(key_colnames,default)
S3method(key_colnames,epi_archive)
S3method(key_colnames,epi_df)
S3method(mean,epi_df)
S3method(next_after,Date)
S3method(next_after,integer)
S3method(print,epi_archive)
Expand Down Expand Up @@ -74,6 +81,7 @@ export(filter)
export(full_seq)
export(geo_column_names)
export(group_by)
export(group_epi_df)
export(group_modify)
export(growth_rate)
export(guess_period)
Expand All @@ -90,6 +98,7 @@ export(relocate)
export(rename)
export(revision_summary)
export(slice)
export(sum_groups_epi_df)
export(time_column_names)
export(ungroup)
export(unnest)
Expand Down Expand Up @@ -150,6 +159,7 @@ importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,group_by_drop_default)
importFrom(dplyr,group_map)
importFrom(dplyr,group_modify)
importFrom(dplyr,group_vars)
importFrom(dplyr,groups)
Expand Down
70 changes: 58 additions & 12 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,54 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat

# epiprocess 0.9

## Breaking changes

- `epi_slide` interface has major breaking changes.
- All variables are now dot-prefixed to be more consistent with tidyverse
style for functions that allow tidyeval.
- The `before/after` arguments have been replaced with the `.window_size` and
`.align` arguments.
- `names_sep` has been removed. If you return data frames from your
computations:
- without a name, they will be unpacked into separate columns without name
prefixes
- with a name, it will become a packed data.frame-class column (see
`tidyr::pack`).
- `as_list_col` has been removed. You can now directly return a list from your
slide computations instead. If you were using `as_list_col=TRUE`, you will
need to wrap your output in a list.
- Ungrouped slides are no longer allowed in `epi_slide`. If you used this for
geographic aggregation up to national, consider using `sum_groups_epi_df`.
- Added `sum_groups_epi_df` to allow aggregation across key columns prior to
sliding.
- `epix_slide` interface has major changes.
- All variables are now dot-prefixed to be more consistent with tidyverse
style for functions that allow tidyeval.
- `names_sep` has been removed. If you return data frames from your
computations:
- without a name, they will be unpacked into separate columns without name
prefixes
- with a name, it will become a packed data.frame-class column (see
`tidyr::pack`).
- `as_list_col` has been removed. You can now directly return a list from your
slide computations instead. If you were using `as_list_col=TRUE`, you will
need to wrap your output in a list.
- `as_epi_df()` now checks that every group has unique time values and errors if
this is not the case. The same check is performed at the beginning of
`epi_slide()`. This check is currently not enforced in dplyr operations (like
for joins, mutates, or select), but we plan to add it in the future.
- `as_epi_df()` or `as_epi_archive()` no longer accept `additional_metadata`.
Use the new `other_keys` arg to specify additional key columns, such as age
group columns or other demographic breakdowns. Miscellaneous metadata are no
longer handled by `epiprocess`, but you can use R's built-in `attr<-` instead
for a similar feature.

## Improvements

- Added `complete.epi_df`, which fills in missing values in an `epi_df` with
`NA`s. Uses `tidyr::complete` underneath and preserves `epi_df` metadata.
- Inclusion of the function `revision_summary` to provide basic revision information for `epi_archive`s out of the box. (#492)
- Inclusion of the function `revision_summary` to provide basic revision
information for `epi_archive`s out of the box. (#492)

## Bug fixes

Expand All @@ -21,6 +64,14 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat

## Breaking changes

- `epi_df`'s are now more strict about what types they allow in the time column.
Namely, we are explicit about only supporting `Date` at the daily and weekly
cadence and generic integer types (for yearly cadence).
- `epi_slide` `before` and `after` arguments are now require the user to
specific time units in certain cases. The `time_step` argument has been
removed.
- `epix_slide` `before` argument now defaults to `Inf`, and requires the user to
specify units in some cases. The `time_step` argument has been removed.
- `detect_outlr_stl(seasonal_period = NULL)` is no longer accepted. Use
`detect_outlr_stl(seasonal_period = <value>, seasonal_as_residual = TRUE)`
instead. See `?detect_outlr_stl` for more details.
Expand Down Expand Up @@ -63,6 +114,12 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat
are similar functions for `geo` and `version`).
- Fixed bug where `epix_slide_ref_time_values_default()` on datetimes would
output a huge number of `ref_time_values` spaced apart by mere seconds.
- In `epi_slide()` and `epix_slide()`:
- Multiple "data-masking" tidy evaluation expressions can be passed in via
`...`, rather than just one.
- Additional tidy evaluation features from `dplyr::mutate` are supported: `!!
name_var := value`, unnamed expressions evaluating to data frames, and `=
NULL`; see `?epi_slide` for more details.

## Cleanup

Expand All @@ -71,17 +128,6 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat
of `epi_df`s to let `{epipredict}` work more easily with other libraries (#471).
- Removed some external package dependencies.

## Breaking Changes

- `epi_df`'s are now more strict about what types they allow in the time column.
Namely, we are explicit about only supporting `Date` at the daily and weekly
cadence and generic integer types (for yearly cadence).
- `epi_slide` `before` and `after` arguments are now require the user to
specific time units in certain cases. The `time_step` argument has been
removed.
- `epix_slide` `before` argument now defaults to `Inf`, and requires the user to
specify units in some cases. The `time_step` argument has been removed.

# epiprocess 0.7.0

## Breaking changes:
Expand Down
Loading

0 comments on commit b6a7d58

Please sign in to comment.