Skip to content

Commit

Permalink
Merge pull request #520 from cmu-delphi/ndefries/epidatasets-migration
Browse files Browse the repository at this point in the history
Import datasets and documentation from epidatasets
  • Loading branch information
brookslogan authored Oct 15, 2024
2 parents 63cb820 + c9d1877 commit cb468db
Show file tree
Hide file tree
Showing 53 changed files with 671 additions and 904 deletions.
13 changes: 10 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: epiprocess
Title: Tools for basic signal processing in epidemiology
Version: 0.9.4
Version: 0.9.5
Authors@R: c(
person("Jacob", "Bien", role = "ctb"),
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
Expand All @@ -20,7 +20,13 @@ Authors@R: c(
person("Hadley", "Wickham", role = "ctb",
comment = "Author of included rlang fragments"),
person("Posit", role = "cph",
comment = "Copyright holder of included rlang fragments")
comment = "Copyright holder of included rlang fragments"),
person("Johns Hopkins University Center for Systems Science and Engineering", role = "dtc",
comment = "Owner of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
person("Johns Hopkins University", role = "cph",
comment = "Copyright holder of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
person("Carnegie Mellon University Delphi Group", role = "dtc",
comment = "Owner of claims-based CLI data from the Delphi Epidata API")
)
Description: This package introduces a common data structure for
epidemiological data reported by location and time, provides another
Expand All @@ -36,6 +42,7 @@ Imports:
cli,
data.table,
dplyr (>= 1.1.0),
epidatasets,
genlasso,
ggplot2,
glue,
Expand Down Expand Up @@ -64,6 +71,7 @@ Suggests:
VignetteBuilder:
knitr
Remotes:
cmu-delphi/epidatasets,
cmu-delphi/epidatr,
glmgen/genlasso,
reconverse/outbreaks
Expand All @@ -78,7 +86,6 @@ Collate:
'archive.R'
'autoplot.R'
'correlation.R'
'data.R'
'epi_df.R'
'epi_df_forbidden_methods.R'
'epiprocess.R'
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ 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(detect_outlr)
export(detect_outlr_rm)
export(detect_outlr_stl)
Expand Down Expand Up @@ -100,6 +104,7 @@ export(ungroup)
export(unnest)
export(validate_epi_archive)
export(version_column_names)
import(epidatasets)
importFrom(checkmate,anyInfinite)
importFrom(checkmate,anyMissing)
importFrom(checkmate,assert)
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ 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
`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`.

## Bug fixes

- Removed `.window_size = 1` default from `epi_slide_{mean,sum,opt}`; this
argument is now mandatory, and should nearly always be greater than 1 except
for testing purposes.
Expand Down
10 changes: 5 additions & 5 deletions R/autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
#' @export
#'
#' @examples
#' autoplot(jhu_csse_daily_subset, cases, death_rate_7d_av)
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av, .facet_by = "geo_value")
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av,
#' autoplot(cases_deaths_subset, cases, death_rate_7d_av)
#' autoplot(cases_deaths_subset, case_rate_7d_av, .facet_by = "geo_value")
#' autoplot(cases_deaths_subset, case_rate_7d_av,
#' .color_by = "none",
#' .facet_by = "geo_value"
#' )
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av,
#' autoplot(cases_deaths_subset, case_rate_7d_av,
#' .color_by = "none",
#' .base_color = "red", .facet_by = "geo_value"
#' )
#'
#' # .base_color specification won't have any effect due .color_by default
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av,
#' autoplot(cases_deaths_subset, case_rate_7d_av,
#' .base_color = "red", .facet_by = "geo_value"
#' )
autoplot.epi_df <- function(
Expand Down
8 changes: 4 additions & 4 deletions R/correlation.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
#'
#' # linear association of case and death rates on any given day
#' epi_cor(
#' x = jhu_csse_daily_subset,
#' x = cases_deaths_subset,
#' var1 = case_rate_7d_av,
#' var2 = death_rate_7d_av,
#' cor_by = "time_value"
#' )
#'
#' # correlation of death rates and lagged case rates
#' epi_cor(
#' x = jhu_csse_daily_subset,
#' x = cases_deaths_subset,
#' var1 = case_rate_7d_av,
#' var2 = death_rate_7d_av,
#' cor_by = time_value,
Expand All @@ -61,15 +61,15 @@
#'
#' # correlation grouped by location
#' epi_cor(
#' x = jhu_csse_daily_subset,
#' x = cases_deaths_subset,
#' var1 = case_rate_7d_av,
#' var2 = death_rate_7d_av,
#' cor_by = geo_value
#' )
#'
#' # correlation grouped by location and incorporates lagged cases rates
#' epi_cor(
#' x = jhu_csse_daily_subset,
#' x = cases_deaths_subset,
#' var1 = case_rate_7d_av,
#' var2 = death_rate_7d_av,
#' cor_by = geo_value,
Expand Down
Loading

0 comments on commit cb468db

Please sign in to comment.