Skip to content

Commit eba082b

Browse files
authored
Merge pull request #550 from cmu-delphi/dev
Sync dev -> main
2 parents 7bf94e3 + 6ed820b commit eba082b

File tree

110 files changed

+4650
-4106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+4650
-4106
lines changed

.Rbuildignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@
1717
^DEVELOPMENT.md$
1818
man-roxygen
1919
^.venv$
20-
^sandbox.R$
20+
^sandbox.R$
21+
^README.Rmd$
22+
^README_cache$
23+
^pkgdown-watch.R$
24+
^.editorconfig$

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ docs
1313
renv/
1414
renv.lock
1515
.Rprofile
16-
sandbox.R
16+
sandbox.R
17+
# Vignette caches
18+
*_cache/
19+
vignettes/*.html
20+
vignettes/*.R
21+
!vignettes/_common.R

DESCRIPTION

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Type: Package
21
Package: epiprocess
2+
Type: Package
33
Title: Tools for basic signal processing in epidemiology
4-
Version: 0.9.0
4+
Version: 0.9.6
55
Authors@R: c(
66
person("Jacob", "Bien", role = "ctb"),
77
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
@@ -20,13 +20,19 @@ Authors@R: c(
2020
person("Hadley", "Wickham", role = "ctb",
2121
comment = "Author of included rlang fragments"),
2222
person("Posit", role = "cph",
23-
comment = "Copyright holder of included rlang fragments")
23+
comment = "Copyright holder of included rlang fragments"),
24+
person("Johns Hopkins University Center for Systems Science and Engineering", role = "dtc",
25+
comment = "Owner of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
26+
person("Johns Hopkins University", role = "cph",
27+
comment = "Copyright holder of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
28+
person("Carnegie Mellon University Delphi Group", role = "dtc",
29+
comment = "Owner of claims-based CLI data from the Delphi Epidata API")
2430
)
25-
Description: This package introduces a common data structure for
26-
epidemiological data reported by location and time, provides another
27-
data structure to work with revisions to these data sets over time,
28-
and offers associated utilities to perform basic signal processing
29-
tasks.
31+
Description: This package introduces common data structures for working with
32+
epidemiological data reported by location and time and offers associated
33+
utilities to perform basic signal processing tasks. The package is designed
34+
to be used in conjunction with `epipredict` for building and evaluating
35+
epidemiological models.
3036
License: MIT + file LICENSE
3137
URL: https://cmu-delphi.github.io/epiprocess/
3238
Depends:
@@ -35,7 +41,8 @@ Imports:
3541
checkmate,
3642
cli,
3743
data.table,
38-
dplyr (>= 1.0.8),
44+
dplyr (>= 1.1.0),
45+
epidatasets,
3946
genlasso,
4047
ggplot2,
4148
glue,
@@ -53,17 +60,19 @@ Imports:
5360
vctrs,
5461
waldo
5562
Suggests:
56-
covidcast,
5763
devtools,
5864
epidatr,
65+
here,
5966
knitr,
6067
outbreaks,
68+
readr,
6169
rmarkdown,
6270
testthat (>= 3.1.5),
6371
withr
6472
VignetteBuilder:
6573
knitr
6674
Remotes:
75+
cmu-delphi/epidatasets,
6776
cmu-delphi/epidatr,
6877
glmgen/genlasso,
6978
reconverse/outbreaks
@@ -78,10 +87,9 @@ Collate:
7887
'archive.R'
7988
'autoplot.R'
8089
'correlation.R'
81-
'data.R'
8290
'epi_df.R'
8391
'epi_df_forbidden_methods.R'
84-
'epiprocess.R'
92+
'epiprocess-package.R'
8593
'group_by_epi_df_methods.R'
8694
'methods-epi_archive.R'
8795
'grouped_epi_archive.R'

DEVELOPMENT.md

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
## Setting up the development environment
22

33
```r
4-
install.packages(c('devtools', 'pkgdown', 'styler', 'lintr')) # install dev dependencies
5-
devtools::install_deps(dependencies = TRUE) # install package dependencies
6-
devtools::document() # generate package meta data and man files
7-
devtools::build() # build package
4+
install.packages(c('devtools', 'pkgdown', 'styler', 'lintr', 'pak')) # install dev dependencies
5+
pak::pkg_install(".") # install package and dependencies
86
```
97

108
## Validating the package
@@ -13,8 +11,12 @@ devtools::build() # build package
1311
styler::style_pkg() # format code
1412
lintr::lint_package() # lint code
1513

14+
devtools::check() # run R CMD check, which runs everything below
15+
devtools::document() # generate package meta data and man files
1616
devtools::test() # test package
17-
devtools::check() # check package for errors
17+
devtools::build_vignettes() # build vignettes only
18+
devtools::run_examples() # run doc examples
19+
devtools::check(vignettes = FALSE) # check package without vignettes
1820
```
1921

2022
## Developing the documentation site
@@ -24,20 +26,16 @@ Our CI builds two version of the documentation:
2426
- https://cmu-delphi.github.io/epiprocess/ from the `main` branch and
2527
- https://cmu-delphi.github.io/epiprocess/dev from the `dev` branch.
2628

27-
The documentation site can be previewed locally by running in R:
28-
29-
```r
30-
# Should automatically open a browser
31-
pkgdown::build_site(preview=TRUE)
32-
```
33-
34-
If the above does not open a browser, you can try using a Python server from the
35-
command line:
29+
We include the script `pkgdown-watch.R` that will automatically rebuild the
30+
documentation locally and preview it. It can be used with:
3631

37-
```bash
38-
R -e 'devtools::document()'
39-
R -e 'pkgdown::build_site()'
40-
python -m http.server -d docs
32+
```sh
33+
# Make sure you have servr installed
34+
R -e 'renv::install("servr")'
35+
# Will start a local server
36+
Rscript pkgdown-watch.R
37+
# You may need to first build the site with
38+
R -e 'pkgdown::build_site(".", examples = FALSE, devel = TRUE, preview = FALSE)'
4139
```
4240

4341
## Versioning

NAMESPACE

+6-4
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ S3method(key_colnames,default)
4242
S3method(key_colnames,epi_archive)
4343
S3method(key_colnames,epi_df)
4444
S3method(mean,epi_df)
45-
S3method(next_after,Date)
46-
S3method(next_after,integer)
4745
S3method(print,epi_archive)
4846
S3method(print,epi_df)
4947
S3method(print,grouped_epi_archive)
@@ -59,8 +57,13 @@ export(as_epi_archive)
5957
export(as_epi_df)
6058
export(as_tsibble)
6159
export(autoplot)
60+
export(cases_deaths_subset)
6261
export(clone)
6362
export(complete)
63+
export(covid_case_death_rates_extended)
64+
export(covid_incidence_county_subset)
65+
export(covid_incidence_outliers)
66+
export(deprecated_quo_is_present)
6467
export(detect_outlr)
6568
export(detect_outlr_rm)
6669
export(detect_outlr_stl)
@@ -85,11 +88,9 @@ export(guess_period)
8588
export(is_epi_df)
8689
export(is_grouped_epi_archive)
8790
export(key_colnames)
88-
export(max_version_with_row_in)
8991
export(mutate)
9092
export(new_epi_archive)
9193
export(new_epi_df)
92-
export(next_after)
9394
export(relocate)
9495
export(rename)
9596
export(revision_summary)
@@ -100,6 +101,7 @@ export(ungroup)
100101
export(unnest)
101102
export(validate_epi_archive)
102103
export(version_column_names)
104+
import(epidatasets)
103105
importFrom(checkmate,anyInfinite)
104106
importFrom(checkmate,anyMissing)
105107
importFrom(checkmate,assert)

NEWS.md

+32
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@
22

33
Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicate PR's.
44

5+
# epiprocess 0.10
6+
7+
## Breaking changes
8+
9+
- Moved example datasets from being hosted in the package to being reexported
10+
from the `epidatasets` package. The datasets can no longer be loaded with
11+
`data()` but can be accessed with `epiprocess::` or, after loading the
12+
package, just the name of the dataset (#520). Those with names starting with
13+
`jhu` have been renamed to a more uniform scheme and now have names starting
14+
with `covid`. The data set previously named `jhu_confirmed_cumulative_num` has
15+
been removed from the package, but a renamed version is has been removed from
16+
the package, but a renamed version is still available in `epidatasets`.
17+
18+
## Bug fixes
19+
20+
- Removed `.window_size = 1` default from `epi_slide_{mean,sum,opt}`; this
21+
argument is now mandatory, and should nearly always be greater than 1 except
22+
for testing purposes.
23+
24+
## Improvements
25+
26+
- `epi_slide` and `epix_slide` now provide some hints if you forget a `~` when
27+
using a formula to specify the slide computation, and other bits of forgotten
28+
syntax.
29+
- Improved validation of `.window_size` arguments.
30+
- Rewrote a lot of the package documentation to be more consistent and
31+
informative. Simplified and streamlined the vignettes.
32+
33+
## Cleanup
34+
35+
- Removed vignette dependency on `covidcast`.
36+
537
# epiprocess 0.9
638

739
## Breaking changes

0 commit comments

Comments
 (0)