Skip to content

Commit cb468db

Browse files
authored
Merge pull request #520 from cmu-delphi/ndefries/epidatasets-migration
Import datasets and documentation from epidatasets
2 parents 63cb820 + c9d1877 commit cb468db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+671
-904
lines changed

DESCRIPTION

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: epiprocess
33
Title: Tools for basic signal processing in epidemiology
4-
Version: 0.9.4
4+
Version: 0.9.5
55
Authors@R: c(
66
person("Jacob", "Bien", role = "ctb"),
77
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
@@ -20,7 +20,13 @@ Authors@R: c(
2020
person("Hadley", "Wickham", role = "ctb",
2121
comment = "Author of included rlang fragments"),
2222
person("Posit", role = "cph",
23-
comment = "Copyright holder of included rlang fragments")
23+
comment = "Copyright holder of included rlang fragments"),
24+
person("Johns Hopkins University Center for Systems Science and Engineering", role = "dtc",
25+
comment = "Owner of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
26+
person("Johns Hopkins University", role = "cph",
27+
comment = "Copyright holder of COVID-19 cases and deaths data from the COVID-19 Data Repository"),
28+
person("Carnegie Mellon University Delphi Group", role = "dtc",
29+
comment = "Owner of claims-based CLI data from the Delphi Epidata API")
2430
)
2531
Description: This package introduces a common data structure for
2632
epidemiological data reported by location and time, provides another
@@ -36,6 +42,7 @@ Imports:
3642
cli,
3743
data.table,
3844
dplyr (>= 1.1.0),
45+
epidatasets,
3946
genlasso,
4047
ggplot2,
4148
glue,
@@ -64,6 +71,7 @@ Suggests:
6471
VignetteBuilder:
6572
knitr
6673
Remotes:
74+
cmu-delphi/epidatasets,
6775
cmu-delphi/epidatr,
6876
glmgen/genlasso,
6977
reconverse/outbreaks
@@ -78,7 +86,6 @@ Collate:
7886
'archive.R'
7987
'autoplot.R'
8088
'correlation.R'
81-
'data.R'
8289
'epi_df.R'
8390
'epi_df_forbidden_methods.R'
8491
'epiprocess.R'

NAMESPACE

+5
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ export(as_epi_archive)
5959
export(as_epi_df)
6060
export(as_tsibble)
6161
export(autoplot)
62+
export(cases_deaths_subset)
6263
export(clone)
6364
export(complete)
65+
export(covid_case_death_rates_extended)
66+
export(covid_incidence_county_subset)
67+
export(covid_incidence_outliers)
6468
export(detect_outlr)
6569
export(detect_outlr_rm)
6670
export(detect_outlr_stl)
@@ -100,6 +104,7 @@ export(ungroup)
100104
export(unnest)
101105
export(validate_epi_archive)
102106
export(version_column_names)
107+
import(epidatasets)
103108
importFrom(checkmate,anyInfinite)
104109
importFrom(checkmate,anyMissing)
105110
importFrom(checkmate,assert)

NEWS.md

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

77
## Breaking changes
88

9+
- Moved example datasets from being hosted in the package to being reexported
10+
from the `epidatasets` package. The datasets can no longer be loaded with
11+
`data()` but can be accessed with `epiprocess::` or, after loading the
12+
package, just the name of the dataset (#520). Those with names starting with
13+
`jhu` have been renamed to a more uniform scheme and now have names starting
14+
with `covid`. The data set previously named `jhu_confirmed_cumulative_num` has
15+
been removed from the package, but a renamed version is has been removed from
16+
the package, but a renamed version is still available in `epidatasets`.
17+
18+
## Bug fixes
19+
920
- Removed `.window_size = 1` default from `epi_slide_{mean,sum,opt}`; this
1021
argument is now mandatory, and should nearly always be greater than 1 except
1122
for testing purposes.

R/autoplot.R

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@
2626
#' @export
2727
#'
2828
#' @examples
29-
#' autoplot(jhu_csse_daily_subset, cases, death_rate_7d_av)
30-
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av, .facet_by = "geo_value")
31-
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av,
29+
#' autoplot(cases_deaths_subset, cases, death_rate_7d_av)
30+
#' autoplot(cases_deaths_subset, case_rate_7d_av, .facet_by = "geo_value")
31+
#' autoplot(cases_deaths_subset, case_rate_7d_av,
3232
#' .color_by = "none",
3333
#' .facet_by = "geo_value"
3434
#' )
35-
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av,
35+
#' autoplot(cases_deaths_subset, case_rate_7d_av,
3636
#' .color_by = "none",
3737
#' .base_color = "red", .facet_by = "geo_value"
3838
#' )
3939
#'
4040
#' # .base_color specification won't have any effect due .color_by default
41-
#' autoplot(jhu_csse_daily_subset, case_rate_7d_av,
41+
#' autoplot(cases_deaths_subset, case_rate_7d_av,
4242
#' .base_color = "red", .facet_by = "geo_value"
4343
#' )
4444
autoplot.epi_df <- function(

R/correlation.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
#'
4545
#' # linear association of case and death rates on any given day
4646
#' epi_cor(
47-
#' x = jhu_csse_daily_subset,
47+
#' x = cases_deaths_subset,
4848
#' var1 = case_rate_7d_av,
4949
#' var2 = death_rate_7d_av,
5050
#' cor_by = "time_value"
5151
#' )
5252
#'
5353
#' # correlation of death rates and lagged case rates
5454
#' epi_cor(
55-
#' x = jhu_csse_daily_subset,
55+
#' x = cases_deaths_subset,
5656
#' var1 = case_rate_7d_av,
5757
#' var2 = death_rate_7d_av,
5858
#' cor_by = time_value,
@@ -61,15 +61,15 @@
6161
#'
6262
#' # correlation grouped by location
6363
#' epi_cor(
64-
#' x = jhu_csse_daily_subset,
64+
#' x = cases_deaths_subset,
6565
#' var1 = case_rate_7d_av,
6666
#' var2 = death_rate_7d_av,
6767
#' cor_by = geo_value
6868
#' )
6969
#'
7070
#' # correlation grouped by location and incorporates lagged cases rates
7171
#' epi_cor(
72-
#' x = jhu_csse_daily_subset,
72+
#' x = cases_deaths_subset,
7373
#' var1 = case_rate_7d_av,
7474
#' var2 = death_rate_7d_av,
7575
#' cor_by = geo_value,

0 commit comments

Comments
 (0)