Skip to content

Commit

Permalink
remove epidatr calls in vignettes; dontrun failing example code
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Oct 1, 2024
1 parent 779ec2a commit 5518c67
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
20 changes: 15 additions & 5 deletions R/reexports.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ ggplot2::autoplot
#' cases_deaths_subset
#'
#' # fails
#' data(cases_deaths_subset, package = "epiprocess")
#' \dontrun{
#' data(cases_deaths_subset, package = "epiprocess")
#' }
#' @export
delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset)

Expand All @@ -111,7 +113,9 @@ delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset)
#' covid_incidence_county_subset
#'
#' # fails
#' data(covid_incidence_county_subset, package = "epiprocess")
#' \dontrun{
#' data(covid_incidence_county_subset, package = "epiprocess")
#' }
#' @export
delayedAssign("covid_incidence_county_subset", epidatasets::covid_incidence_county_subset)

Expand All @@ -129,7 +133,9 @@ delayedAssign("covid_incidence_county_subset", epidatasets::covid_incidence_coun
#' covid_incidence_outliers
#'
#' # fails
#' data(covid_incidence_outliers, package = "epiprocess")
#' \dontrun{
#' data(covid_incidence_outliers, package = "epiprocess")
#' }
#' @export
delayedAssign("covid_incidence_outliers", epidatasets::covid_incidence_outliers)

Expand All @@ -147,7 +153,9 @@ delayedAssign("covid_incidence_outliers", epidatasets::covid_incidence_outliers)
#' jhu_confirmed_cumulative_num
#'
#' # fails
#' data(jhu_confirmed_cumulative_num, package = "epiprocess")
#' \dontrun{
#' data(jhu_confirmed_cumulative_num, package = "epiprocess")
#' }
#' @export
delayedAssign("jhu_confirmed_cumulative_num", epidatasets::jhu_confirmed_cumulative_num)

Expand All @@ -165,7 +173,9 @@ delayedAssign("jhu_confirmed_cumulative_num", epidatasets::jhu_confirmed_cumulat
#' archive_cases_dv_subset
#'
#' # fails
#' data(archive_cases_dv_subset, package = "epiprocess")
#' \dontrun{
#' data(archive_cases_dv_subset, package = "epiprocess")
#' }
#'
#' @export
delayedAssign("archive_cases_dv_subset", epidatasets::archive_cases_dv_subset)
5 changes: 3 additions & 2 deletions vignettes/aggregation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ 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:

```{r, warning = FALSE, message = FALSE}
library(epidatr)
library(covidcast)
library(epiprocess)
library(dplyr)
Expand All @@ -25,6 +23,9 @@ x <- covid_incidence_county_subset

The data can also be fetched from the Delphi API with the following query:
```{r, message = FALSE, eval = FALSE, warning = FALSE}
library(epidatr)
library(covidcast)
d <- as.Date("2024-03-20")
# Use covidcast::county_census to get the county and state names
Expand Down
3 changes: 2 additions & 1 deletion vignettes/archive.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ page](https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/doctor-v
The data is included in this package (via the [`epidatasets` package](https://cmu-delphi.github.io/epidatasets/)) and can be loaded with:

```{r, message = FALSE, warning = FALSE}
library(epidatr)
library(epiprocess)
library(data.table)
library(dplyr)
Expand All @@ -41,6 +40,8 @@ dv <- archive_cases_dv_subset$DT

The data can also be fetched from the Delphi API with the following query:
```{r, message = FALSE, warning = FALSE, eval = FALSE}
library(epidatr)
dv <- pub_covidcast(
source = "doctor-visits",
signals = "smoothed_adj_cli",
Expand Down
3 changes: 2 additions & 1 deletion vignettes/correlation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ state-level COVID-19 case and death rates, smoothed using 7-day trailing
averages.

```{r, message = FALSE, warning = FALSE}
library(epidatr)
library(epiprocess)
library(dplyr)
```
Expand All @@ -30,6 +29,8 @@ x <- cases_deaths_subset %>%

The data can also be fetched from the Delphi API with the following query:
```{r, eval = FALSE}
library(epidatr)
d <- as.Date("2024-03-20")
x <- pub_covidcast(
Expand Down
1 change: 0 additions & 1 deletion vignettes/epiprocess.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ to fetch this data from the [COVIDcast
API](https://cmu-delphi.github.io/delphi-epidata/api/covidcast.html).

```{r, message = FALSE}
library(epidatr)
library(epiprocess)
library(dplyr)
library(tidyr)
Expand Down
4 changes: 3 additions & 1 deletion vignettes/growth_rate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ current vignette, applied to state-level daily reported COVID-19 cases from GA
and PA, smoothed using a 7-day trailing average.

```{r, message = FALSE, warning = FALSE}
library(epidatr)
library(epiprocess)
library(dplyr)
library(tidyr)
Expand All @@ -32,7 +31,10 @@ x <- cases_deaths_subset %>%

The data can also be fetched from the Delphi API with the following query:
```{r, message = FALSE, eval = FALSE}
library(epidatr)
d <- as.Date("2024-03-20")
x <- pub_covidcast(
source = "jhu-csse",
signals = "confirmed_7dav_incidence_num",
Expand Down
1 change: 0 additions & 1 deletion vignettes/outliers.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ reported COVID-19 case counts from FL and NJ.
The dataset has 730 rows and 3 columns.

```{r, echo=FALSE, warning=FALSE, message=FALSE}
library(epidatr)
library(epiprocess)
library(dplyr)
library(tidyr)
Expand Down
4 changes: 3 additions & 1 deletion vignettes/slide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ FL, NY, and TX (note: here we're using new, not cumulative cases) using the
and then convert this to `epi_df` format.

```{r, message = FALSE, warning = FALSE}
library(epidatr)
library(epiprocess)
library(dplyr)
```
Expand All @@ -44,7 +43,10 @@ x <- cases_deaths_subset %>%

The data can also be fetched from the Delphi API with the following query:
```{r, message = FALSE, eval = FALSE}
library(epidatr)
d <- as.Date("2024-03-20")
x <- pub_covidcast(
source = "jhu-csse",
signals = "confirmed_incidence_num",
Expand Down

0 comments on commit 5518c67

Please sign in to comment.