Skip to content

Commit 39820db

Browse files
authored
Merge pull request #168 from Openscapes/reorder-vignette
reorder vignette as per @stefaniebutland's suggestion
2 parents 1661889 + afca019 commit 39820db

File tree

1 file changed

+53
-40
lines changed

1 file changed

+53
-40
lines changed

vignettes/create-certificates.Rmd

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,9 @@ library(googlesheets4)
1414
library(dplyr)
1515
```
1616

17-
## Create a single certificate
18-
19-
For a single certificate, you can supply all of the values manually:
20-
21-
```{r}
22-
#| eval: false
23-
24-
create_certificate(
25-
cohort_name = "2023-fred-hutch",
26-
first_name = "First Name",
27-
last_name = "Last Name",
28-
start_date = "2023-09-19",
29-
end_date = "2023-10-19",
30-
cohort_website = "https://openscapes.github.io/2023-fred-hutch/"
31-
)
32-
```
33-
34-
## Create a batch of certificates for a cohort
17+
## Create a batch of certificates for NMFS Openscapes cohorts
3518

36-
First load data from a cohort google sheet:
19+
First load data from the Champions registry google sheet and participants sheet:
3720

3821
```{r}
3922
#| eval: false
@@ -44,24 +27,8 @@ registry <- read_sheet(
4427
participants <- read_sheet("URL to OpenscapesParticipantsMainList")
4528
```
4629

47-
Then call the `create_batch_certificates()` function to create the certificates:
48-
49-
```{r}
50-
#| eval: false
51-
52-
create_batch_certificates(
53-
registry = registry,
54-
participants = participants,
55-
cohort_name = "2023-fred-hutch",
56-
output_dir = "~/Desktop/fred-hutch-certificates"
57-
)
58-
59-
```
60-
61-
## Create a batch of certificates for NMFS Openscapes cohorts
62-
63-
The process is the same as for the standard cohorts, but set the `cohort_type`
64-
parameter to `"nmfs"`, and it will use the appropriate NMFS Openscapes template.
30+
Then run `create_batch_certificates()`, set the `cohort_type` parameter to `"nmfs"`, and set `cohort_name` to the name that matches the cohort in the registry.
31+
The function will create certificates using the appropriate NMFS Openscapes template.
6532

6633
```{r}
6734
#| eval: false
@@ -94,9 +61,55 @@ create_batch_pathways_certificates(
9461
)
9562
```
9663

97-
To create a single Pathways certificate, use the `create_certificate()` function
98-
and specify `cohort_type = "pathways"`. The only other arguments you need to supply
99-
are `first_name`, `last_name`, `start_date`, and `end_date`:
64+
## Create a batch of certificates for a "standard" Champions cohort
65+
66+
First load data from the Champions registry google sheet and participants sheet:
67+
68+
```{r}
69+
#| eval: false
70+
71+
registry <- read_sheet(
72+
"https://docs.google.com/spreadsheets/d/1Ys9KiTXXmZ_laBoCV2QWEm7AcnGSVQaXvm2xpi4XTSc"
73+
) # OpenscapesChampionsCohortRegistry
74+
participants <- read_sheet("URL to OpenscapesParticipantsMainList")
75+
```
76+
77+
Then call the `create_batch_certificates()` function to create the certificates.
78+
Specify the `cohort_name` parameter to match the cohort in the registry.
79+
Leave `cohort_type` as the default `"standard"`.
80+
The function will create certificates using the appropriate template.
81+
82+
```{r}
83+
#| eval: false
84+
85+
create_batch_certificates(
86+
registry = registry,
87+
participants = participants,
88+
cohort_name = "2023-fred-hutch",
89+
output_dir = "~/Desktop/fred-hutch-certificates"
90+
)
91+
92+
```
93+
94+
## Create a single certificate
95+
96+
For a single certificate, you can supply all of the values manually:
97+
98+
```{r}
99+
#| eval: false
100+
101+
create_certificate(
102+
cohort_name = "2023-fred-hutch",
103+
first_name = "First Name",
104+
last_name = "Last Name",
105+
start_date = "2023-09-19",
106+
end_date = "2023-10-19",
107+
cohort_website = "https://openscapes.github.io/2023-fred-hutch/"
108+
)
109+
```
110+
111+
To create a single Pathways certificate, use the `create_certificate()` function and specify `cohort_type = "pathways"`.
112+
The only other arguments you need to supply are `first_name`, `last_name`, `start_date`, and `end_date`:
100113

101114
```{r}
102115
#| eval: false

0 commit comments

Comments
 (0)