-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathposit_presentation.qmd
575 lines (404 loc) · 16 KB
/
posit_presentation.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
---
title: "Quarto: A Multifaceted Publishing Powerhouse for Medical Researchers"
format:
clean-revealjs:
self-contained: true
preview-links: false
slide-number: false
code-line-numbers: true
logo: images/logo.png
css: styles.css
author:
- name: Joshua J. Cook, M.S. DS, M.S. CRM, ACRP-PM, CCRC
orcid: 0000-0003-3508-7065
email: jcook0312@outlook.com
affiliations: Adjunct Professor / Clinical Researcher / Data Scientist
date: last-modified
bibliography: refs.bib
editor:
markdown:
wrap: 72
---
## Biography {.scrollable}
::: normalfont
::: columns
::: {.column width="40%"}
![](images/grad.jpg){fig-align="left" width="430" height="545"}
:::
::: {.column width="60%"}
- **2021** - B.S., Biomedical Science, *University of West Florida*
- **2023** - M.S., Clinical Research Management, *Wake Forest
University*
- **2023** - ACRP Certifications (Project Management / Clinical
Research Coordinator)
- **2024** - M.S., Data Science, *University of West Florida*
- **Work History:** [Adjunct Professo]{.underline}r (Anatomy &
Physiology), Research Quality Analyst, Clinical Research Coordinator
:::
:::
:::
# Medical Research {background-color="#40666e"}
## Medical Research {.smaller}
### Not Just Pharma!
- Academia (Ph.D.)
- Healthcare/Industry (M.D., D.O., RN, MSN-NP, Etc.)
- [**OR, you are responsible for preparing these documents for someone
in these roles.**]{.underline}
- **General Process:**
![](images/process.png){fig-align="center" width="547" height="418"}
## Medical Research {.smaller}
### Publication Needs
1. Statistical Report - usually #1; sometimes preceded by study
planning analyses, such as simulations
2. Interim Reports
3. Interim Presentations (Regulators, Sponsors, Stakeholders,
Conferences, Grants)
4. Final Report
5. Final Presentation
6. Manuscript
7. Website/Blogs
8. [**NEW - Patient/Participant Material**]{.underline}
9. Regulatory Submission
This is [**a LOT of work for medical researchers**]{.underline},
especially if changes are made to the data/analyses at any stage.
## Medical Research
### Traditional Methods {.smaller}
A mess...
![](images/process_2.png){fig-align="center" width="730" height="435"}
# Quarto {background-color="#40666e"}
## Quarto {.smaller}
### An Introduction
**Quarto** (often described as the **next generation of R Markdown**)
emerges as a promising solution capable of:
- bridging the gaps between different programming languages
- allowing teams to collaborate more effectively
- enabling the efficient integration of diverse methodologies
- with [**Quarto Projects**]{.underline}, allows for the creation of
various project types from a single source, with multiple output
formats.
**Quarto Project Types** refer to a type of organization of files (ex:
report, website, manuscript, or presentation) while **Quarto Project
Formats** refer to the output file type of a document (ex: HTML, PDF,
DOCX).
## Quarto {.smaller .scrollable}
### General Setup
As with any project in RStudio^®^, a [**primary folder**]{.underline}
should be setup that will be used as the working directory. This is
where the Quarto project (.*Rproj*) file will be housed, as well as any
required subfolders.
[**Quarto Projects**]{.underline} are directories that provide a central
location for all files, images, and outputs.
**This is a key concept for this presentation.**
Furthermore, Quarto Projects provide:
- **Shared YAML** configuration and **metadata** (ex: tables of
contents and bibliographies).
- Organized rendering of **multiple project formats from a single
file** (ex: PDF and HTML).
- **Package and environment version control** (for regulatory
purposes).
- **Directory-specific settings and preferences** (ex: code formatting
and view panes).
- **Virtual Environments.**
There are *many* Quarto project types available, but for this first
example, we will create a new **Quarto Project** (in the form of a
[report]{.underline}) within RStudio^®^ using the “Create Project”
button in the toolbar. Choose any name and location for your project,
just make sure you can remember and find it!
![](images/create.png){width="418" height="336"}
![](images/type.png){width="420"}
## Quarto {.smaller .scrollable}
### Quarto Project Defaults & Layout
- Your Quarto Project will open to a [template Quarto
Markdown]{.underline} *(.qmd)* file with a [YAML
header]{.underline}, some [markdown text]{.underline}, and an
[example R code chunk.]{.underline}
- If another programming language is preferred, {r} can be changed to
{python}, etc.
- The tool bar gives text-editing options for markdown and allows for
the creation of more chunks as needed.
- This is just the basic layout, and many more components can be added
to a Quarto Markdown to enrich content.
![](images/clipboard-480932952.png){width="690" height="251"}
## Quarto {.smaller .scrollable}
### The Importance of YAML
Every Quarto Markdown *(.qmd*) file begins with a **YAML** (Yet Another
Markup Language) header, which is a versatile human-readable data
serialization language.
YAML is primarily used in [configuration files]{.underline} and data
representation in the form of [**maps**]{.underline} (key-value pairs)
and [**lists**]{.underline} (sequences of values).
YAML is delineated with three dashes (—) and provides the configuration
of a Quarto document with many fields available for specification
depending on the quarto project format (ex: HTML and PDF).
Some examples of YAML fields that we have found especially helpful
include:
- **Title/subtitle** – titles of the document.
- **Date** – date of the document (*can be “today”).*
- **Author** – listing of authors for the document.
- **Abstract** – provides a summary of the document.
- **Theme** – theme of the entire document (*many formats available*).
- **Toc** – table of contents (*many formats available*).
- **Bibliography** – document bibliography (*BibTeX or CSL*).
- **Crossref** – configuration for cross-reference labels and
prefixes.
- **Format** – designates the output format (*HTML by default*).
- **Embed-resources** - incorporates external dependencies into a
standalone HTML file (i*.e., self-contained files*).
For the full list of YAML options, please refer to the Quarto
documentation ([Quarto –
Reference](https://quarto.org/docs/reference/)).
# Medical Research Case Example {background-color="#40666e"}
## Quarto Case Example
### File Structure
``` plaintext
/positconf
├── /Data
│ ├── 2022_data.rds
│ └── 2021_data.rds
├── /Analysis
│ ├── data_processing.qmd
│ └── data_missing.qmd
├── /Images
│ ├── logo.jpg
│ └── logo_2.jpg
├── /Manuscript
│ ├── Manuscript.Rproj
│ └── index.qmd
│ └── quarto.yml
├── /Presentation
│ ├── Presentation.Rproj
│ └── index.qmd
│ └── quarto.yml
├── Report.Rproj
├── index.qmd
├── quarto.yml
```
## Quarto Case Example
### YAML for a Report
``` plaintext
/positconf
├── Report.Rproj
├── index.qmd
├── quarto.yml
```
```{r}
#| eval: FALSE
#| echo: TRUE
#| code-line-numbers: "1-7|8-11"
---
title: |
![](Images/logo.jpg){fig-align="left" width="500"} \
\
Project BRFSS Weekly Update
author: "Joshua J. Cook, M.S. DS, M.S. CRM, \ ACRP-PM, CCRC, Swann A. Adams Ph.D., M.S., FACE"
date: today
format:
html:
html-table-processing: none
embed-resources: true
toc: true
---
```
## Quarto Case Example {.smaller .scrollable}
### The Report
![](images/clipboard-2136297575.png)
![](images/clipboard-1619737040.png)
![](images/clipboard-3064409893.png){width="687"}
**Importantly:** the code nor figure are not being generated in within
the report itself!
## Quarto Case Example
### The Report
Goal in a nutshell: [maintain quality and consistency through
modularity.]{.underline}
**Quarto Shortcodes:** special markdown directives that generate
content.
**Key Shortcodes:**
- **embed** - embeds cells from Quarto markdown (.qmd) file or a
Jupyter (.ipynb) notebook.
- **include** - direct copy/paste of content from another Quarto
markdown or Jupyter notebook.
```{r}
#| eval: false
#| echo: true
#| code-line-numbers: "1|3"
{{< include Analysis/data_processing.qmd >}} # will include EVERYTHING from the file
{{< embed Analysis/data_missing.qmd#fig-missing-1 >}} # will only include a SPECIFIC figure
```
## Quarto Case Example {.smaller .scrollable}
### YAML for a Manuscript
``` plaintext
/positconf
├── /Manuscript
│ ├── Manuscript.Rproj
│ └── index.qmd
│ └── quarto.yml
```
```{r}
#| eval: FALSE
#| echo: TRUE
#| code-line-numbers: "1-13|14-15|16-20"
---
title: Assessment of Temporal Trends in HPV Vaccination, Cervical Cancer Screening, and Diagnosis Among LGBTQ+ Individuals
authors:
- name: Joshua J. Cook, M.S. DS, M.S. CRM, ACRP-PM, CCRC
affiliation: The University of South Carolina
roles: data analysis, manuscript writing
corresponding: true
- name: Swann Arp Adams, Ph.D., FACE, M.S.
affiliation: The University of South Carolina
roles: data analysis, manuscript writing
corresponding: true
bibliography: references.bib
abstract: "The full progress of our project can be followed in the attached Chill and Chat log. In summary, we have extracted 2022-2014 data from the Centers for Disease Control (CDC) Behavioral Risk Factor Surveillance System (BRFSS) datasets. The cutoff for 2014 was determined based on initial exploratory data analysis (EDA), which revealed that Sexual Orientation and Gender Identity (SOGI) data collection began in that year. The initial report (also attached) shows the progress in our EDA for identify our variables of interest, which includes 38 of the 200+ variables in the BRFSS dataset. Only 3 variables have missing values, which we plan to impute before analysis. We are also awaiting 2023 data to be released within the next month, which will complete our 10-year dataset which is often required for temporal studies of this nature. In the meantime, we are continuing to develop our analysis methodology via the technical papers and complete initial analyses which we will expand to 2023 once released. We plan on submitting our abstract to ASPO in September when calls open, and the draft manuscript over the next 6 months."
format:
pdf: default
plos-pdf:
journal:
id: globalpublichealth
keep-tex: true
---
```
## Quarto Case Example {.smaller .scrollable}
### The Manuscript
![](images/clipboard-1827865736.png){width="595" height="639"}
![](images/clipboard-1022182594.png){width="595" height="597"}
Again, using shortcodes:
```{r}
#| eval: false
#| echo: true
{{< embed Analysis/data_missing.qmd#fig-missing-1 >}} # will only include a SPECIFIC figure
```
## Quarto Case Example {.smaller .scrollable}
### YAML for a Presentation
``` plaintext
/positconf
├── /Presentation
│ ├── Presentation.Rproj
│ └── index.qmd
│ └── quarto.yml
```
```{r}
#| eval: FALSE
#| echo: TRUE
#| code-line-numbers: "|3-10"
---
title: "Assessment of Temporal Trends in HPV Vaccination, Cervical Cancer Screening, and Diagnosis Among LGBTQ+ Individuals"
format:
clean-revealjs:
self-contained: true
preview-links: true
slide-number: false
code-line-numbers: true
logo: ../Images/logo_2.jpg
css: styles.css
author:
- name: Joshua J. Cook
orcid: 0000-0003-3508-7065
email: jcook0312@outlook.com
affiliations: Adjunct Professor / Clinical Researcher / Data Scientist
date: last-modified
bibliography: refs.bib
editor:
markdown:
wrap: 72
---
```
## Quarto Case Example {.smaller .scrollable}
### The Presentation
![](images/clipboard-1088875303.png){width="638"}
![](images/clipboard-2851995800.png){width="640"}
```{r}
#| eval: false
#| echo: true
{{< embed Analysis/data_missing.qmd#fig-missing-1 >}} # will only include a SPECIFIC figure
```
Furthermore, if the researcher prefers PowerPoint, the **format can be
changed to output to .pptx.**
Importantly, the updated figures, tables, etc. will still be cleanly
output **for them to use in their presentations.**
## Quarto Case Example
### The Key Points
1. All of these **documents are frequently used by medical
researchers.**
2. If an error is identified, or something about the data, tables, or
figures needs to be changed, **simply altering the files in
/Analysis will prompt all the documents to update when they are next
rendered.**
3. If **another template is needed** (ex: when being rejected from one
journal), it is easy to switch while retaining all original content.
4. Even if the researcher prefers traditional PowerPoint or Word
methods, this system still offers **protection against redundancy
when updates to analysis code are needed.**
5. In other words, [**we are effectively moving beyond
copy/paste.**]{.underline}
# Wrapping Up {background-color="#40666e"}
## Advanced Features {.smaller .scrollable}
### Just a Few
**1. In-line Programming**
```{r}
#| echo: true
x <- 2+2
```
`r x` is currently the value of x.
**2. Dynamically Updating -** using quarto.yml
![](images/clipboard-557801892.png){width="605" height="187"}
**3. Templates** (Two used here - just install using terminal and define
in YAML as above):
- [quarto-journals/plos: Quarto template for Public Library of Science
(github.com)](https://github.com/quarto-journals/plos) (Manuscript)
- <https://github.com/grantmcdermott/quarto-revealjs-clean#readme>
(Presentation)
**4. Collaboration Tools Available -** notes, highlighting, commenting
with Hypothesis
**5. Works with Zotero Libraries -** possibly some compatibility with
EndNote
**6. Enhancing Participant Communication** - very quick release of
presentation material to providers
**7. Speeding up the Delivery of Treatments** - accelerating the
conversion of statistical reports into manuscripts and regulatory
documents (which can follow templates and get updated after content is
altered!)
## Conclusion
### Quarto is a Multifaceted Publishing Powerhouse for Medical Researchers
- Allows us to **efficiently create various polished formats from a
single source** document (in this case, stored in the /Analysis
folder).
- **Templates** available to support a wide array of submission
requirements (reports, manuscripts, presentations) with **tools for
collaboration** (notes, highlighting, commenting).
- **Enhances participant communication** and **(hopefully) speeds up
the delivery of treatments** by reducing time-spent converting
between document types.
## Conclusion
### Limitations
- Setup and organization **may not be appropriate for all projects**
especially if smaller and publication needs are not extensive.
- **Tables seem to have a hard time being embed** from another file
(workaround: programmed into the primary .qmd).
- Thinking about ways to **reuse markdown text** similar to the
embedding process for code/figures (LLMs?).
## Acknowledgements & Contact Information {.smaller}
### \*Actively seeking a full-time position\*
Joshua J. Cook thanks Nathaniel Nicklaus, as well as his mentors, Dr.
Swann Adams, Louise Hadden, Dr. Achraf Cohen, and Kirk Paul Lafler, as
well as Richann Watson and Troy Martin Hughes for their general guidance
and mentorship.
Special thanks to Mine Cetinkaya-Rundel, who gave an hour-long
presentation on this topic at R/Medicine 2024. [R/Medicine: Quarto for
Reproducible Medical Manuscripts
(youtube.com)](https://www.youtube.com/watch?v=NK1onTLcgY4)
::: normalfont
::: columns
::: {.column width="40%"}
**Your comments and questions are valued and encouraged. Contact the
author at:**
Joshua J. Cook, M.S. DS, M.S. CRM, ACRP-PM, CCRC
Adjunct Professor / Clinical Researcher / Data Scientist
Website: <https://joshua-j-cook-portfolios.netlify.app/>
Email: [jcook0312\@outlook.com](mailto:jcook0312@outlook.com)
:::
::: {.column width="60%"}
![](images/contact.png){fig-align="center" width="223" height="207"}
:::
:::
:::