Skip to content

Commit c901a68

Browse files
authored
Merge pull request #553 from cmu-delphi/ds/vignettes4
doc: fix archive demo and make epipredict a link
2 parents 6ed820b + 167135a commit c901a68

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

README.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ knitr::opts_chunk$set(
1616
The `{epiprocess}` package works with epidemiological time series data and
1717
provides tools to manage, analyze, and process the data in preparation for
1818
modeling. It is designed to work in tandem with
19-
`{epipredict}`, which provides
19+
[`{epipredict}`](https://cmu-delphi.github.io/epipredict/), which provides
2020
pre-built epiforecasting models and as well as tools to build custom models.
2121
Both packages are designed to lower the barrier to entry and implementation cost
2222
for epidemiological time series analysis and forecasting.

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
The `{epiprocess}` package works with epidemiological time series data
77
and provides tools to manage, analyze, and process the data in
88
preparation for modeling. It is designed to work in tandem with
9-
`{epipredict}`, which provides pre-built epiforecasting models and as
10-
well as tools to build custom models. Both packages are designed to
11-
lower the barrier to entry and implementation cost for epidemiological
12-
time series analysis and forecasting.
9+
[`{epipredict}`](https://cmu-delphi.github.io/epipredict/), which
10+
provides pre-built epiforecasting models and as well as tools to build
11+
custom models. Both packages are designed to lower the barrier to entry
12+
and implementation cost for epidemiological time series analysis and
13+
forecasting.
1314

1415
`{epiprocess}` contains:
1516

vignettes/epiprocess.Rmd

+9-3
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ dv <- pub_covidcast(
167167
geo_values = "ca,fl,ny,tx",
168168
time_values = epirange(20200601, 20211201),
169169
issues = epirange(20200601, 20211201)
170-
)
170+
) %>%
171+
select(geo_value, time_value, issue, percent_cli = value) %>%
172+
as_epi_archive(compactify = TRUE)
173+
dv
171174
```
172175

173176
```{r, echo=FALSE, message=FALSE, warning=FALSE}
@@ -179,10 +182,13 @@ library(purrr)
179182
library(ggplot2)
180183
dv <- archive_cases_dv_subset$DT %>%
181184
select(-case_rate_7d_av) %>%
182-
rename(issue = version, value = percent_cli) %>%
183-
tibble()
185+
tidyr::drop_na() %>%
186+
as_epi_archive(compactify = TRUE)
187+
dv
184188
```
185189

190+
See `vignette("epi_arcive")` for a more in-depth guide to `epi_archive` objects.
191+
186192
## Data attribution
187193

188194
This document contains a dataset that is a modified part of the [COVID-19 Data

0 commit comments

Comments
 (0)