From 0a62bbfe9b670f9ad2876d9f17fb35f6e6d8ff67 Mon Sep 17 00:00:00 2001 From: nmdefries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:15:37 -0500 Subject: [PATCH 1/4] stop reexporting epidatasets data --- DESCRIPTION | 2 +- NAMESPACE | 6 -- NEWS.md | 11 +-- R/epiprocess-package.R | 1 - R/reexports.R | 105 ------------------------- _pkgdown.yml | 8 -- man/archive_cases_dv_subset.Rd | 84 -------------------- man/cases_deaths_subset.Rd | 79 ------------------- man/covid_case_death_rates_extended.Rd | 74 ----------------- man/covid_incidence_county_subset.Rd | 75 ------------------ man/covid_incidence_outliers.Rd | 68 ---------------- vignettes/correlation.Rmd | 3 +- vignettes/epi_archive.Rmd | 4 +- vignettes/epi_df.Rmd | 8 +- vignettes/epiprocess.Rmd | 1 - vignettes/growth_rate.Rmd | 3 +- 16 files changed, 17 insertions(+), 515 deletions(-) delete mode 100644 man/archive_cases_dv_subset.Rd delete mode 100644 man/cases_deaths_subset.Rd delete mode 100644 man/covid_case_death_rates_extended.Rd delete mode 100644 man/covid_incidence_county_subset.Rd delete mode 100644 man/covid_incidence_outliers.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 8917f800..85bbb85b 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,13 +36,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, diff --git a/NAMESPACE b/NAMESPACE index 1fd65d37..1f01c170 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -50,19 +50,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) @@ -101,7 +96,6 @@ export(ungroup) export(unnest) export(validate_epi_archive) export(version_column_names) -import(epidatasets) importFrom(checkmate,anyInfinite) importFrom(checkmate,anyMissing) importFrom(checkmate,assert) diff --git a/NEWS.md b/NEWS.md index 8ab77ee4..979c84e8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,14 +6,15 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat ## 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 - package, just the name of the dataset (#520). Those with names starting with +- Moved example datasets from being hosted 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 fetched, after loading + the package, with `data()` or the name of the dataset alone, or can be + accessed with `epidatasets::`. Datasets with names starting `jhu` have been renamed to a more uniform scheme and now have names starting with `covid`. The data set previously named `jhu_confirmed_cumulative_num` has been removed from the package, but a renamed version is has been removed from - the package, but a renamed version is still available in `epidatasets`. + the package, but a renamed version is still available in `epidatasets` (#520, #568). ## Bug fixes diff --git a/R/epiprocess-package.R b/R/epiprocess-package.R index e28cec0f..72a92e3f 100644 --- a/R/epiprocess-package.R +++ b/R/epiprocess-package.R @@ -2,7 +2,6 @@ "_PACKAGE" ## usethis namespace: start -#' @import epidatasets #' @importFrom checkmate anyInfinite anyMissing assert assert_character #' @importFrom checkmate assert_class assert_data_frame assert_int assert_list #' @importFrom checkmate assert_logical assert_numeric assert_scalar checkInt diff --git a/R/reexports.R b/R/reexports.R index e091ce12..00ac83c2 100644 --- a/R/reexports.R +++ b/R/reexports.R @@ -75,108 +75,3 @@ tidyr::full_seq #' @importFrom ggplot2 autoplot #' @export ggplot2::autoplot - - -# epidatasets ------------------------------------------------------------------- - -#' @inherit epidatasets::cases_deaths_subset description source references title -#' @inheritSection epidatasets::cases_deaths_subset Data dictionary -#' @examples -#' # Since this is a re-exported dataset, it cannot be loaded using -#' # the `data()` function. `data()` looks for a file of the same name -#' # in the `data/` directory, which doesn't exist in this package. -#' # works -#' epiprocess::cases_deaths_subset -#' -#' # works -#' library(epiprocess) -#' cases_deaths_subset -#' -#' # fails -#' \dontrun{ -#' data(cases_deaths_subset, package = "epiprocess") -#' } -#' @export -delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset) - -#' @inherit epidatasets::covid_incidence_county_subset description source references title -#' @inheritSection epidatasets::covid_incidence_county_subset Data dictionary -#' @examples -#' # Since this is a re-exported dataset, it cannot be loaded using -#' # the `data()` function. `data()` looks for a file of the same name -#' # in the `data/` directory, which doesn't exist in this package. -#' # works -#' epiprocess::covid_incidence_county_subset -#' -#' # works -#' library(epiprocess) -#' covid_incidence_county_subset -#' -#' # fails -#' \dontrun{ -#' data(covid_incidence_county_subset, package = "epiprocess") -#' } -#' @export -delayedAssign("covid_incidence_county_subset", epidatasets::covid_incidence_county_subset) - -#' @inherit epidatasets::covid_incidence_outliers description source references title -#' @inheritSection epidatasets::covid_incidence_outliers Data dictionary -#' @examples -#' # Since this is a re-exported dataset, it cannot be loaded using -#' # the `data()` function. `data()` looks for a file of the same name -#' # in the `data/` directory, which doesn't exist in this package. -#' # works -#' epiprocess::covid_incidence_outliers -#' -#' # works -#' library(epiprocess) -#' covid_incidence_outliers -#' -#' # fails -#' \dontrun{ -#' data(covid_incidence_outliers, package = "epiprocess") -#' } -#' @export -delayedAssign("covid_incidence_outliers", epidatasets::covid_incidence_outliers) - -#' @inherit epidatasets::archive_cases_dv_subset description source references title -#' @inheritSection epidatasets::archive_cases_dv_subset Data dictionary -#' @examples -#' # Since this is a re-exported dataset, it cannot be loaded using -#' # the `data()` function. `data()` looks for a file of the same name -#' # in the `data/` directory, which doesn't exist in this package. -#' # works -#' epiprocess::archive_cases_dv_subset -#' -#' # works -#' library(epiprocess) -#' archive_cases_dv_subset -#' -#' # fails -#' \dontrun{ -#' data(archive_cases_dv_subset, package = "epiprocess") -#' } -#' -#' @export -delayedAssign("archive_cases_dv_subset", epidatasets::archive_cases_dv_subset) - -#' @inherit epidatasets::covid_case_death_rates_extended description source references title -#' @inheritSection epidatasets::covid_case_death_rates_extended Data dictionary -#' @examples -#' # Since this is a re-exported dataset, it cannot be loaded using -#' # the `data()` function. `data()` looks for a file of the same name -#' # in the `data/` directory, which doesn't exist in this package. -#' # works -#' epiprocess::covid_case_death_rates_extended -#' -#' # works -#' library(epiprocess) -#' covid_case_death_rates_extended -#' -#' # fails -#' \dontrun{ -#' data(covid_case_death_rates_extended, package = "epiprocess") -#' } -#' -#' @export -delayedAssign("covid_case_death_rates_extended", epidatasets::covid_case_death_rates_extended) diff --git a/_pkgdown.yml b/_pkgdown.yml index a7d700e1..72dc9eb9 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -85,14 +85,6 @@ reference: - epix_fill_through_version - epix_truncate_versions_after - - title: Example data - - contents: - - cases_deaths_subset - - archive_cases_dv_subset - - covid_incidence_county_subset - - covid_incidence_outliers - - covid_case_death_rates_extended - - title: internal - contents: - starts_with("internal") diff --git a/man/archive_cases_dv_subset.Rd b/man/archive_cases_dv_subset.Rd deleted file mode 100644 index 207bb025..00000000 --- a/man/archive_cases_dv_subset.Rd +++ /dev/null @@ -1,84 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{archive_cases_dv_subset} -\alias{archive_cases_dv_subset} -\title{Subset of daily COVID-19 doctor visits and cases from 6 states in archive format} -\format{ -An object of class \code{epi_archive} of length 6. -} -\source{ -This object contains a modified part of the \href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University} as \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{republished in the COVIDcast Epidata API}. This data set is licensed under the terms of the -\href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International license} -by Johns Hopkins University on behalf of its Center for Systems Science in Engineering. -Copyright Johns Hopkins University 2020. - -Modifications: -\itemize{ -\item \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From the COVIDcast Epidata API}: \code{case_rate_7d_av} signal was computed by Delphi from the original JHU-CSSE data by calculating moving averages of the preceding 7 days, so the signal for June 7 is the average of the underlying data for June 1 through 7, inclusive. -\item Furthermore, the data has been limited to a very small number of rows, the -signal names slightly altered, and formatted into an \code{epi_archive}. -} - -This object contains a modified part of the -\href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/doctor-visits.html}{Delphi \code{doctor-visits} indicator}. -This data source is computed by the Delphi -Group from information about outpatient visits, provided to Delphi by -health system partners, and published in the COVIDcast Epidata API. This -data set is licensed under the terms of the -\href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International license} -by the Delphi group. - -Modifications: -\itemize{ -\item \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/doctor-visits.html}{From the COVIDcast Doctor Visits signal}: The signal \code{smoothed_adj_cli} is taken directly from the API without changes. -\item Furthermore, the data has been limited to a very small number of rows, the -signal names slightly altered, and formatted into an \code{epi_archive}. -} -} -\usage{ -archive_cases_dv_subset -} -\description{ -This data source is based on information about outpatient visits, provided -to us by health system partners, and also contains confirmed COVID-19 -cases based on reports made available by the Center for Systems Science -and Engineering at Johns Hopkins University. This example data ranges from -June 1, 2020 to December 1, 2021, issued on dates from June 1, 2020 to December 1, -2021. It is limited to California, Florida, Texas, and New York. - -It is used in the {epiprocess} \code{compactify}, \code{epi_archive}, and -advanced-use (\code{advanced}) vignettes. -} -\section{Data dictionary}{ - - -The data in the \code{epi_archive$DT} attribute has columns: -\describe{ -\item{geo_value}{the geographic value associated with each row of measurements.} -\item{time_value}{the time value associated with each row of measurements.} -\item{version}{the time value specifying the version for each row of measurements. } -\item{percent_cli}{percentage of doctor’s visits with CLI (COVID-like illness) computed from medical insurance claims} -\item{case_rate_7d_av}{7-day average signal of number of new confirmed cases due to COVID-19 per 100,000 population, daily} -} - -} - -\examples{ -# Since this is a re-exported dataset, it cannot be loaded using -# the `data()` function. `data()` looks for a file of the same name -# in the `data/` directory, which doesn't exist in this package. -# works -epiprocess::archive_cases_dv_subset - -# works -library(epiprocess) -archive_cases_dv_subset - -# fails -\dontrun{ -data(archive_cases_dv_subset, package = "epiprocess") -} - -} -\keyword{datasets} diff --git a/man/cases_deaths_subset.Rd b/man/cases_deaths_subset.Rd deleted file mode 100644 index 45e8dd4c..00000000 --- a/man/cases_deaths_subset.Rd +++ /dev/null @@ -1,79 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{cases_deaths_subset} -\alias{cases_deaths_subset} -\title{Subset of JHU daily state COVID-19 cases and deaths from 6 states} -\format{ -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 4026 rows and 6 columns. -} -\source{ -This object contains a modified part of the -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University} -as \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{republished in the COVIDcast Epidata API}. -This data set is licensed under the terms of the -\href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International license} -by the Johns Hopkins University on behalf of its Center for Systems Science -in Engineering. Copyright Johns Hopkins University 2020. - -Modifications: -\itemize{ -\item \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From the COVIDcast Epidata API}: -The case signal is taken directly from the JHU CSSE -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 GitHub repository}. -The rate signals were computed by Delphi using Census population data. -The 7-day average signals were computed by Delphi by calculating moving -averages of the preceding 7 days, so the signal for June 7 is the -average of the underlying data for June 1 through 7, inclusive. -\item Furthermore, the data has been limited to a very small number of rows, the -signal names slightly altered, and formatted into an \code{epi_df}. -} -} -\usage{ -cases_deaths_subset -} -\description{ -This data source of confirmed COVID-19 cases and deaths is based on reports -made available by the Center for Systems Science and Engineering at Johns -Hopkins University. This example data is a snapshot as of March 20, 2024, and -ranges from March 1, 2020 to December 31, 2021. It is limited to California, -Florida, Texas, New York, Georgia, and Pennsylvania. - -It is used in the {epiprocess} growth rate and \code{epi_slide} vignettes. -} -\section{Data dictionary}{ - - -The data has columns: -\describe{ -\item{geo_value}{the geographic value associated with each row -of measurements.} -\item{time_value}{the time value associated with each row of measurements.} -\item{case_rate_7d_av}{7-day average signal of number of new -confirmed COVID-19 cases per 100,000 population, daily} -\item{death_rate_7d_av}{7-day average signal of number of new confirmed -deaths due to COVID-19 per 100,000 population, daily} -\item{cases}{Number of new confirmed COVID-19 cases, daily} -\item{cases_7d_av}{7-day average signal of number of new confirmed -COVID-19 cases, daily} -} - -} - -\examples{ -# Since this is a re-exported dataset, it cannot be loaded using -# the `data()` function. `data()` looks for a file of the same name -# in the `data/` directory, which doesn't exist in this package. -# works -epiprocess::cases_deaths_subset - -# works -library(epiprocess) -cases_deaths_subset - -# fails -\dontrun{ -data(cases_deaths_subset, package = "epiprocess") -} -} -\keyword{datasets} diff --git a/man/covid_case_death_rates_extended.Rd b/man/covid_case_death_rates_extended.Rd deleted file mode 100644 index 72482edd..00000000 --- a/man/covid_case_death_rates_extended.Rd +++ /dev/null @@ -1,74 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{covid_case_death_rates_extended} -\alias{covid_case_death_rates_extended} -\title{JHU daily COVID-19 cases and deaths rates from all states} -\format{ -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 37576 rows and 4 columns. -} -\source{ -This object contains a modified part of the -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University} -as \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{republished in the COVIDcast Epidata API}. -This data set is licensed under the terms of the -\href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International license} -by the Johns Hopkins University on behalf of its Center for Systems Science -in Engineering. Copyright Johns Hopkins University 2020. - -Modifications: -\itemize{ -\item \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From the COVIDcast Epidata API}: -These signals are taken directly from the JHU CSSE -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 GitHub repository} -without changes. The 7-day average signals are computed by Delphi by -calculating moving averages of the preceding 7 days, so the signal for -June 7 is the average of the underlying data for June 1 through 7, -inclusive. -} -} -\usage{ -covid_case_death_rates_extended -} -\description{ -This data source of confirmed COVID-19 cases and deaths is based on reports -made available by the Center for Systems Science and Engineering at Johns -Hopkins University, as downloaded from the CMU Delphi COVIDcast Epidata -API. This example data is a snapshot as of May 31, 2022, and -ranges from March 1, 2020 to December 31, 2021. It -includes all states. -} -\section{Data dictionary}{ - - -The data has columns: -\describe{ -\item{geo_value}{the geographic value associated with each row -of measurements.} -\item{time_value}{the time value associated with each row of measurements.} -\item{case_rate}{7-day average signal of number of new -confirmed COVID-19 cases per 100,000 population, daily} -\item{death_rate}{7-day average signal of number of new confirmed -deaths due to COVID-19 per 100,000 population, daily} -} - -} - -\examples{ -# Since this is a re-exported dataset, it cannot be loaded using -# the `data()` function. `data()` looks for a file of the same name -# in the `data/` directory, which doesn't exist in this package. -# works -epiprocess::covid_case_death_rates_extended - -# works -library(epiprocess) -covid_case_death_rates_extended - -# fails -\dontrun{ -data(covid_case_death_rates_extended, package = "epiprocess") -} - -} -\keyword{datasets} diff --git a/man/covid_incidence_county_subset.Rd b/man/covid_incidence_county_subset.Rd deleted file mode 100644 index edc881d9..00000000 --- a/man/covid_incidence_county_subset.Rd +++ /dev/null @@ -1,75 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{covid_incidence_county_subset} -\alias{covid_incidence_county_subset} -\title{Subset of JHU daily COVID-19 cases from counties in Massachusetts and Vermont} -\format{ -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 16212 rows and 5 columns. -} -\source{ -This object contains a modified part of the -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University} as -\href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{republished in the COVIDcast Epidata API}. -This data set is licensed under the terms of the -\href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International license} -by the Johns Hopkins University on behalf of its Center for Systems -Science in Engineering. Copyright Johns Hopkins University 2020. - -Modifications: -\itemize{ -\item \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From the COVIDcast Epidata API}: -These signals are taken directly from the JHU CSSE -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 GitHub repository} -without changes. The 7-day average signals are computed by Delphi by -as moving averages of the preceding 7 days, so the signal for -June 7 is the average of the underlying data for June 1 through 7, -inclusive. -\item Furthermore, the data has been limited to a very small number of rows, -formatted into an \code{epi_df}, and the signal names slightly altered. -} -} -\usage{ -covid_incidence_county_subset -} -\description{ -This data source of confirmed COVID-19 cases and deaths -is based on reports made available by the Center for -Systems Science and Engineering at Johns Hopkins University. -This example data is a snapshot as of March 20, 2024, and -ranges from March 1, 2020 to December 31, 2021. -It is limited to counties from Massachusetts and Vermont. - -It is used in the {epiprocess} aggregation vignette. -} -\section{Data dictionary}{ - - -The data has columns: -\describe{ -\item{geo_value}{the geographic value associated with each row of measurements.} -\item{time_value}{the time value associated with each row of measurements.} -\item{cases}{Number of new confirmed COVID-19 cases, daily} -\item{county_name}{the name of the county} -\item{state_name}{the full name of the state} -} - -} - -\examples{ -# Since this is a re-exported dataset, it cannot be loaded using -# the `data()` function. `data()` looks for a file of the same name -# in the `data/` directory, which doesn't exist in this package. -# works -epiprocess::covid_incidence_county_subset - -# works -library(epiprocess) -covid_incidence_county_subset - -# fails -\dontrun{ -data(covid_incidence_county_subset, package = "epiprocess") -} -} -\keyword{datasets} diff --git a/man/covid_incidence_outliers.Rd b/man/covid_incidence_outliers.Rd deleted file mode 100644 index 52b49fd3..00000000 --- a/man/covid_incidence_outliers.Rd +++ /dev/null @@ -1,68 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{covid_incidence_outliers} -\alias{covid_incidence_outliers} -\title{Subset of JHU daily COVID-19 cases from New Jersey and Florida} -\format{ -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 730 rows and 3 columns. -} -\source{ -This object contains a modified part of the -\href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University} -as \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{republished in the COVIDcast Epidata API}. -This data set is licensed under the terms of the -\href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International license} -by the Johns Hopkins University on behalf of its Center for Systems -Science in Engineering. Copyright Johns Hopkins University 2020. - -Modifications: -\itemize{ -\item \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From the COVIDcast Epidata API}: -These signals are taken directly from the JHU CSSE \href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 GitHub repository} without changes. -\item Furthermore, the data has been limited to a very small number of rows, -formatted into an \code{epi_df}, and the signal names slightly altered. -} -} -\usage{ -covid_incidence_outliers -} -\description{ -This data source of confirmed COVID-19 cases is based on reports made -available by the Center for Systems Science and Engineering at Johns -Hopkins University. This example data is downloaded from the CMU Delphi -COVIDcast Epidata API. It is a snapshot as of October 28, 2021, and captures the -cases from June 1, 2020 to May 31, 2021. It is limited to New Jersey and -Florida. - -This data set is used in the {epiprocess} vignette on outliers. -} -\section{Data dictionary}{ - - -The data has columns: -\describe{ -\item{geo_value}{the geographic value associated with each row of measurements.} -\item{time_value}{the time value associated with each row of measurements.} -\item{cases}{Number of new confirmed COVID-19 cases, daily} -} - -} - -\examples{ -# Since this is a re-exported dataset, it cannot be loaded using -# the `data()` function. `data()` looks for a file of the same name -# in the `data/` directory, which doesn't exist in this package. -# works -epiprocess::covid_incidence_outliers - -# works -library(epiprocess) -covid_incidence_outliers - -# fails -\dontrun{ -data(covid_incidence_outliers, package = "epiprocess") -} -} -\keyword{datasets} diff --git a/vignettes/correlation.Rmd b/vignettes/correlation.Rmd index 8d5054bc..bfcbeb14 100644 --- a/vignettes/correlation.Rmd +++ b/vignettes/correlation.Rmd @@ -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) diff --git a/vignettes/epi_archive.Rmd b/vignettes/epi_archive.Rmd index 6d8749cc..34f5a74b 100644 --- a/vignettes/epi_archive.Rmd +++ b/vignettes/epi_archive.Rmd @@ -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) diff --git a/vignettes/epi_df.Rmd b/vignettes/epi_df.Rmd index de10b9af..15f76338 100644 --- a/vignettes/epi_df.Rmd +++ b/vignettes/epi_df.Rmd @@ -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 %>% @@ -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) diff --git a/vignettes/epiprocess.Rmd b/vignettes/epiprocess.Rmd index b9648e00..7435f704 100644 --- a/vignettes/epiprocess.Rmd +++ b/vignettes/epiprocess.Rmd @@ -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) diff --git a/vignettes/growth_rate.Rmd b/vignettes/growth_rate.Rmd index 8f332de3..ec073876 100644 --- a/vignettes/growth_rate.Rmd +++ b/vignettes/growth_rate.Rmd @@ -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 %>% From 09b650f3a9a296085a5e699349ab29ffa3f183dd Mon Sep 17 00:00:00 2001 From: nmdefries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:30:32 -0500 Subject: [PATCH 2/4] import epidatasets in package file --- NAMESPACE | 1 + R/epiprocess-package.R | 1 + 2 files changed, 2 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 1f01c170..6944996c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -96,6 +96,7 @@ export(ungroup) export(unnest) export(validate_epi_archive) export(version_column_names) +import(epidatasets) importFrom(checkmate,anyInfinite) importFrom(checkmate,anyMissing) importFrom(checkmate,assert) diff --git a/R/epiprocess-package.R b/R/epiprocess-package.R index 72a92e3f..e28cec0f 100644 --- a/R/epiprocess-package.R +++ b/R/epiprocess-package.R @@ -2,6 +2,7 @@ "_PACKAGE" ## usethis namespace: start +#' @import epidatasets #' @importFrom checkmate anyInfinite anyMissing assert assert_character #' @importFrom checkmate assert_class assert_data_frame assert_int assert_list #' @importFrom checkmate assert_logical assert_numeric assert_scalar checkInt From 65745f4b3a2de559c239bc0e2f61cb2446d38b91 Mon Sep 17 00:00:00 2001 From: nmdefries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:44:45 -0500 Subject: [PATCH 3/4] version --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 85bbb85b..1d0f6c59 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: epiprocess Type: Package Title: Tools for basic signal processing in epidemiology -Version: 0.9.6 +Version: 0.9.7 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", , "lcbrooks@andrew.cmu.edu", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index 979c84e8..8da1b3a6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,7 +14,7 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat `jhu` have been renamed to a more uniform scheme and now have names starting with `covid`. The data set previously named `jhu_confirmed_cumulative_num` has been removed from the package, but a renamed version is has been removed from - the package, but a renamed version is still available in `epidatasets` (#520, #568). + the package, but a renamed version is still available in `epidatasets` (#520, #577). ## Bug fixes From f69cede76b98b86e3231abebabf1cd7a755f9d53 Mon Sep 17 00:00:00 2001 From: nmdefries Date: Fri, 13 Dec 2024 17:51:12 +0000 Subject: [PATCH 4/4] docs: document (GHA) --- man/epidatasets_reexports.Rd | 40 ------------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 man/epidatasets_reexports.Rd diff --git a/man/epidatasets_reexports.Rd b/man/epidatasets_reexports.Rd deleted file mode 100644 index 3dc809e4..00000000 --- a/man/epidatasets_reexports.Rd +++ /dev/null @@ -1,40 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{cases_deaths_subset} -\alias{cases_deaths_subset} -\alias{covid_incidence_county_subset} -\alias{covid_incidence_outliers} -\alias{archive_cases_dv_subset} -\alias{covid_case_death_rates_extended} -\title{Selected example data sets from \code{epidatasets}} -\format{ -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 4026 rows and 6 columns. - -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 16212 rows and 5 columns. - -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 730 rows and 3 columns. - -An object of class \code{epi_archive} of length 6. - -An object of class \code{epi_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 37576 rows and 4 columns. -} -\usage{ -cases_deaths_subset - -covid_incidence_county_subset - -covid_incidence_outliers - -archive_cases_dv_subset - -covid_case_death_rates_extended -} -\description{ -Data sets re-exported from \code{epidatasets}; please see -documentation for each of these objects in \code{epidatasets}. - -A brief description of the format of each of the objects above are described -in matching order below. -} -\keyword{internal}