Skip to content

Commit 0613150

Browse files
authored
Autoload epidatasets as a dependency rather than reexporting epidatasets data (#577)
* stop reexporting epidatasets data * import epidatasets in package file * version * docs: document (GHA) --------- Co-authored-by: nmdefries <[email protected]>
1 parent e5ec121 commit 0613150

10 files changed

+31
-93
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: epiprocess
22
Type: Package
33
Title: Tools for basic signal processing in epidemiology
4-
Version: 0.10.0
4+
Version: 0.10.1
55
Authors@R: c(
66
person("Jacob", "Bien", role = "ctb"),
77
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
@@ -37,13 +37,13 @@ Description: This package introduces common data structures for working with
3737
License: MIT + file LICENSE
3838
URL: https://cmu-delphi.github.io/epiprocess/
3939
Depends:
40+
epidatasets,
4041
R (>= 3.6)
4142
Imports:
4243
checkmate,
4344
cli,
4445
data.table,
4546
dplyr (>= 1.1.0),
46-
epidatasets,
4747
genlasso,
4848
ggplot2,
4949
glue,

NAMESPACE

-5
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,14 @@ S3method(ungroup,epi_df)
5151
S3method(ungroup,grouped_epi_archive)
5252
S3method(unnest,epi_df)
5353
export("%>%")
54-
export(archive_cases_dv_subset)
5554
export(arrange)
5655
export(arrange_canonical)
5756
export(as_epi_archive)
5857
export(as_epi_df)
5958
export(as_tsibble)
6059
export(autoplot)
61-
export(cases_deaths_subset)
6260
export(clone)
6361
export(complete)
64-
export(covid_case_death_rates_extended)
65-
export(covid_incidence_county_subset)
66-
export(covid_incidence_outliers)
6762
export(deprecated_quo_is_present)
6863
export(detect_outlr)
6964
export(detect_outlr_rm)

NEWS.md

+19
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat
66

77
## Breaking changes
88

9+
10+
## Improvements
11+
12+
13+
## Bug fixes
14+
15+
16+
## Cleanup
17+
18+
- Moved example datasets from being reexported in the package to being fetched
19+
from `epidatasets`. The `epidatasets` package is now auto-loaded as a
20+
dependency of `epiprocess`. The datasets can still be accessed, after loading
21+
the package, with `data()` or the name of the dataset alone, or with
22+
`epidatasets::` (#577).
23+
24+
# epiprocess 0.10
25+
26+
## Breaking changes
27+
928
- Moved example datasets from being hosted in the package to being reexported
1029
from the `epidatasets` package. The datasets can no longer be loaded with
1130
`data()` but can be accessed with `epiprocess::` or, after loading the

R/reexports.R

-37
Original file line numberDiff line numberDiff line change
@@ -75,40 +75,3 @@ tidyr::full_seq
7575
#' @importFrom ggplot2 autoplot
7676
#' @export
7777
ggplot2::autoplot
78-
79-
80-
# epidatasets -------------------------------------------------------------------
81-
82-
#' @rdname epidatasets_reexports
83-
#'
84-
#' @title Selected example data sets from `epidatasets`
85-
#'
86-
#' @description Data sets re-exported from `epidatasets`; please see
87-
#' documentation for each of these objects in `epidatasets`.
88-
#'
89-
#' A brief description of the format of each of the objects above are described
90-
#' in matching order below.
91-
#'
92-
#' @keywords internal
93-
#' @export
94-
delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset)
95-
96-
#' @rdname epidatasets_reexports
97-
#' @keywords internal
98-
#' @export
99-
delayedAssign("covid_incidence_county_subset", epidatasets::covid_incidence_county_subset)
100-
101-
#' @rdname epidatasets_reexports
102-
#' @keywords internal
103-
#' @export
104-
delayedAssign("covid_incidence_outliers", epidatasets::covid_incidence_outliers)
105-
106-
#' @rdname epidatasets_reexports
107-
#' @keywords internal
108-
#' @export
109-
delayedAssign("archive_cases_dv_subset", epidatasets::archive_cases_dv_subset)
110-
111-
#' @rdname epidatasets_reexports
112-
#' @keywords internal
113-
#' @export
114-
delayedAssign("covid_case_death_rates_extended", epidatasets::covid_case_death_rates_extended)

man/epidatasets_reexports.Rd

-40
This file was deleted.

vignettes/correlation.Rmd

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ library(epiprocess)
2424
library(dplyr)
2525
```
2626

27-
The data is included in this package (via the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:
27+
The data is included in the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/),
28+
which is loaded along with `epiprocess`, and can be accessed with:
2829
```{r}
2930
x <- covid_case_death_rates_extended %>%
3031
arrange(geo_value, time_value)

vignettes/epi_archive.Rmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ signal is subject to very heavy and regular revision; you can read more about it
3737
on its [API documentation
3838
page](https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/doctor-visits.html).
3939

40-
The data is included in this package (via the [`epidatasets`
41-
package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:
40+
The data is included in the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/),
41+
which is loaded along with `epiprocess`, and can be accessed with:
4242

4343
```{r, message = FALSE, warning = FALSE}
4444
library(epiprocess)

vignettes/epi_df.Rmd

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ library(epiprocess)
3232
library(dplyr)
3333
```
3434

35-
The data is included in this package (via the [`epidatasets`
36-
package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:
35+
The data is included in the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/),
36+
which is loaded along with `epiprocess`, and can be accessed with:
3737

3838
```{r}
3939
edf <- cases_deaths_subset %>%
@@ -276,8 +276,8 @@ edf_missing %>%
276276
We can also use the `tsibble` package to detect and fill time gaps. We'll work
277277
with county-level reported COVID-19 cases in MA and VT.
278278

279-
The data is included in this package (via the [`epidatasets`
280-
package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:
279+
The data is included in the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/),
280+
which is loaded along with `epiprocess`, and can be accessed with:
281281

282282
```{r, warning = FALSE, message = FALSE}
283283
library(epiprocess)

vignettes/epiprocess.Rmd

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ object, which we prepared by downloading the data using
3737
`epidatr::pub_covidcast()`.
3838

3939
```{r, results=FALSE, warning=FALSE, message=FALSE}
40-
library(epidatasets)
4140
library(epidatr)
4241
library(epiprocess)
4342
library(dplyr)

vignettes/growth_rate.Rmd

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ library(dplyr)
2424
library(tidyr)
2525
```
2626

27-
The data is included in this package (via the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:
27+
The data is included in the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/),
28+
which is loaded along with `epiprocess`, and can be accessed with:
2829

2930
```{r}
3031
x <- cases_deaths_subset %>%

0 commit comments

Comments
 (0)