diff --git a/NAMESPACE b/NAMESPACE index f820b5dc..c4ca4682 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -55,7 +55,6 @@ export(autoplot) export(cases_deaths_subset) export(clone) export(complete) -export(covid_case_death_rates) export(covid_incidence_county_subset) export(covid_incidence_outliers) export(detect_outlr) diff --git a/R/reexports.R b/R/reexports.R index 0ba0e1b9..a86fdd1d 100644 --- a/R/reexports.R +++ b/R/reexports.R @@ -151,24 +151,6 @@ delayedAssign("covid_incidence_outliers", epidatasets::covid_incidence_outliers) #' @export delayedAssign("jhu_confirmed_cumulative_num", epidatasets::jhu_confirmed_cumulative_num) -#' @inherit epidatasets::covid_case_death_rates description source references title -#' @inheritSection epidatasets::covid_case_death_rates 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 -#' -#' # works -#' library(epiprocess) -#' covid_case_death_rates -#' -#' # fails -#' data(covid_case_death_rates, package = "epiprocess") -#' @export -delayedAssign("covid_case_death_rates", epidatasets::covid_case_death_rates) - #' @inherit epidatasets::archive_cases_dv_subset description source references title #' @inheritSection epidatasets::archive_cases_dv_subset Data dictionary #' @examples diff --git a/man/archive_cases_dv_subset.Rd b/man/archive_cases_dv_subset.Rd index 7eff52df..f07f8149 100644 --- a/man/archive_cases_dv_subset.Rd +++ b/man/archive_cases_dv_subset.Rd @@ -50,18 +50,18 @@ The data in the \code{epi_archive$DT} attribute has columns: } \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 +# 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 +# works +library(epiprocess) +archive_cases_dv_subset - # fails - data(archive_cases_dv_subset, package = "epiprocess") +# fails +data(archive_cases_dv_subset, package = "epiprocess") } \keyword{datasets} diff --git a/man/cases_deaths_subset.Rd b/man/cases_deaths_subset.Rd index 397ef93c..fdd38c61 100644 --- a/man/cases_deaths_subset.Rd +++ b/man/cases_deaths_subset.Rd @@ -61,17 +61,17 @@ 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 +# 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 +# works +library(epiprocess) +cases_deaths_subset - # fails - data(cases_deaths_subset, package = "epiprocess") +# fails +data(cases_deaths_subset, package = "epiprocess") } \keyword{datasets} diff --git a/man/covid_case_death_rates.Rd b/man/covid_case_death_rates.Rd deleted file mode 100644 index f51cc858..00000000 --- a/man/covid_case_death_rates.Rd +++ /dev/null @@ -1,71 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexports.R -\docType{data} -\name{covid_case_death_rates} -\alias{covid_case_death_rates} -\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 -} -\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 March 20, 2024, and -ranges from December 31, 2020 to December 31, 2021. It -includes all states. It is used in the {epiprocess} correlation 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{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 - - # works - library(epiprocess) - covid_case_death_rates - - # fails - data(covid_case_death_rates, package = "epiprocess") -} -\keyword{datasets} diff --git a/man/covid_incidence_county_subset.Rd b/man/covid_incidence_county_subset.Rd index ba2c9bc4..dbd382b8 100644 --- a/man/covid_incidence_county_subset.Rd +++ b/man/covid_incidence_county_subset.Rd @@ -57,17 +57,17 @@ The data has columns: } \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 +# 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 +# works +library(epiprocess) +covid_incidence_county_subset - # fails - data(covid_incidence_county_subset, package = "epiprocess") +# fails +data(covid_incidence_county_subset, package = "epiprocess") } \keyword{datasets} diff --git a/man/covid_incidence_outliers.Rd b/man/covid_incidence_outliers.Rd index 0d2ea889..19110970 100644 --- a/man/covid_incidence_outliers.Rd +++ b/man/covid_incidence_outliers.Rd @@ -50,17 +50,17 @@ The data has columns: } \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 +# 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 +# works +library(epiprocess) +covid_incidence_outliers - # fails - data(covid_incidence_outliers, package = "epiprocess") +# fails +data(covid_incidence_outliers, package = "epiprocess") } \keyword{datasets} diff --git a/man/jhu_confirmed_cumulative_num.Rd b/man/jhu_confirmed_cumulative_num.Rd index fad62fa8..b1636115 100644 --- a/man/jhu_confirmed_cumulative_num.Rd +++ b/man/jhu_confirmed_cumulative_num.Rd @@ -49,17 +49,17 @@ The data has columns: } \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::jhu_confirmed_cumulative_num +# 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::jhu_confirmed_cumulative_num - # works - library(epiprocess) - jhu_confirmed_cumulative_num +# works +library(epiprocess) +jhu_confirmed_cumulative_num - # fails - data(jhu_confirmed_cumulative_num, package = "epiprocess") +# fails +data(jhu_confirmed_cumulative_num, package = "epiprocess") } \keyword{datasets} diff --git a/vignettes/correlation.Rmd b/vignettes/correlation.Rmd index e24a2193..6556f9d7 100644 --- a/vignettes/correlation.Rmd +++ b/vignettes/correlation.Rmd @@ -23,8 +23,8 @@ library(dplyr) The data is included in this package (via the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with: ```{r} -x <- covid_case_death_rates %>% - select(geo_value, time_value, case_rate, death_rate) %>% +x <- cases_deaths_subset %>% + select(geo_value, time_value, case_rate = case_rate_7d_av, death_rate = death_rate_7d_av) %>% arrange(geo_value, time_value) ```