Skip to content

Commit

Permalink
Autoload epidatasets as a dependency rather than reexporting epidat…
Browse files Browse the repository at this point in the history
…asets data (#577)

* stop reexporting epidatasets data

* import epidatasets in package file

* version

* docs: document (GHA)

---------

Co-authored-by: nmdefries <[email protected]>
  • Loading branch information
nmdefries and nmdefries authored Dec 13, 2024
1 parent e5ec121 commit 0613150
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 93 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: epiprocess
Type: Package
Title: Tools for basic signal processing in epidemiology
Version: 0.10.0
Version: 0.10.1
Authors@R: c(
person("Jacob", "Bien", role = "ctb"),
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
Expand Down Expand Up @@ -37,13 +37,13 @@ Description: This package introduces common data structures for working with
License: MIT + file LICENSE
URL: https://cmu-delphi.github.io/epiprocess/
Depends:
epidatasets,
R (>= 3.6)
Imports:
checkmate,
cli,
data.table,
dplyr (>= 1.1.0),
epidatasets,
genlasso,
ggplot2,
glue,
Expand Down
5 changes: 0 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,14 @@ S3method(ungroup,epi_df)
S3method(ungroup,grouped_epi_archive)
S3method(unnest,epi_df)
export("%>%")
export(archive_cases_dv_subset)
export(arrange)
export(arrange_canonical)
export(as_epi_archive)
export(as_epi_df)
export(as_tsibble)
export(autoplot)
export(cases_deaths_subset)
export(clone)
export(complete)
export(covid_case_death_rates_extended)
export(covid_incidence_county_subset)
export(covid_incidence_outliers)
export(deprecated_quo_is_present)
export(detect_outlr)
export(detect_outlr_rm)
Expand Down
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat

## Breaking changes


## Improvements


## Bug fixes


## Cleanup

- Moved example datasets from being reexported in the package to being fetched
from `epidatasets`. The `epidatasets` package is now auto-loaded as a
dependency of `epiprocess`. The datasets can still be accessed, after loading
the package, with `data()` or the name of the dataset alone, or with
`epidatasets::` (#577).

# epiprocess 0.10

## Breaking changes

- Moved example datasets from being hosted in the package to being reexported
from the `epidatasets` package. The datasets can no longer be loaded with
`data()` but can be accessed with `epiprocess::` or, after loading the
Expand Down
37 changes: 0 additions & 37 deletions R/reexports.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,40 +75,3 @@ tidyr::full_seq
#' @importFrom ggplot2 autoplot
#' @export
ggplot2::autoplot


# epidatasets -------------------------------------------------------------------

#' @rdname epidatasets_reexports
#'
#' @title Selected example data sets from `epidatasets`
#'
#' @description Data sets re-exported from `epidatasets`; please see
#' documentation for each of these objects in `epidatasets`.
#'
#' A brief description of the format of each of the objects above are described
#' in matching order below.
#'
#' @keywords internal
#' @export
delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset)

#' @rdname epidatasets_reexports
#' @keywords internal
#' @export
delayedAssign("covid_incidence_county_subset", epidatasets::covid_incidence_county_subset)

#' @rdname epidatasets_reexports
#' @keywords internal
#' @export
delayedAssign("covid_incidence_outliers", epidatasets::covid_incidence_outliers)

#' @rdname epidatasets_reexports
#' @keywords internal
#' @export
delayedAssign("archive_cases_dv_subset", epidatasets::archive_cases_dv_subset)

#' @rdname epidatasets_reexports
#' @keywords internal
#' @export
delayedAssign("covid_case_death_rates_extended", epidatasets::covid_case_death_rates_extended)
40 changes: 0 additions & 40 deletions man/epidatasets_reexports.Rd

This file was deleted.

3 changes: 2 additions & 1 deletion vignettes/correlation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ library(epiprocess)
library(dplyr)
```

The data is included in this package (via the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:
The data is included in the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/),
which is loaded along with `epiprocess`, and can be accessed with:
```{r}
x <- covid_case_death_rates_extended %>%
arrange(geo_value, time_value)
Expand Down
4 changes: 2 additions & 2 deletions vignettes/epi_archive.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ signal is subject to very heavy and regular revision; you can read more about it
on its [API documentation
page](https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/doctor-visits.html).

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

```{r, message = FALSE, warning = FALSE}
library(epiprocess)
Expand Down
8 changes: 4 additions & 4 deletions vignettes/epi_df.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ library(epiprocess)
library(dplyr)
```

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

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

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

```{r, warning = FALSE, message = FALSE}
library(epiprocess)
Expand Down
1 change: 0 additions & 1 deletion vignettes/epiprocess.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ object, which we prepared by downloading the data using
`epidatr::pub_covidcast()`.

```{r, results=FALSE, warning=FALSE, message=FALSE}
library(epidatasets)
library(epidatr)
library(epiprocess)
library(dplyr)
Expand Down
3 changes: 2 additions & 1 deletion vignettes/growth_rate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ library(dplyr)
library(tidyr)
```

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

```{r}
x <- cases_deaths_subset %>%
Expand Down

0 comments on commit 0613150

Please sign in to comment.