-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotivation.html
318 lines (278 loc) · 14.1 KB
/
motivation.html
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
<!DOCTYPE html>
<html lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Chapter 2 Motivation | bookdown for data scientists</title>
<meta name="description" content="This tutorial demonstrates how to use bookdown, an extension of R Markdown, to quickly create interactive data documentation for large datasets with many components and filetypes. Parts of this tutorial are adapted from the bookdown GitHub repository." />
<meta name="generator" content="bookdown 0.31 and GitBook 2.6.7" />
<meta property="og:title" content="Chapter 2 Motivation | bookdown for data scientists" />
<meta property="og:type" content="book" />
<meta property="og:description" content="This tutorial demonstrates how to use bookdown, an extension of R Markdown, to quickly create interactive data documentation for large datasets with many components and filetypes. Parts of this tutorial are adapted from the bookdown GitHub repository." />
<meta name="github-repo" content="rstudio/bookdown-demo" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Chapter 2 Motivation | bookdown for data scientists" />
<meta name="twitter:description" content="This tutorial demonstrates how to use bookdown, an extension of R Markdown, to quickly create interactive data documentation for large datasets with many components and filetypes. Parts of this tutorial are adapted from the bookdown GitHub repository." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="prerequisites.html"/>
<link rel="next" href="getting-started.html"/>
<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fuse.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
<script src="libs/kePrint-0.0.1/kePrint.js"></script>
<link href="libs/lightable-0.0.1/lightable.css" rel="stylesheet" />
<script src="libs/core-js-2.5.3/shim.min.js"></script>
<script src="libs/react-17.0.0/react.min.js"></script>
<script src="libs/react-17.0.0/react-dom.min.js"></script>
<script src="libs/reactwidget-1.0.0/react-tools.js"></script>
<script src="libs/htmlwidgets-1.6.0/htmlwidgets.js"></script>
<link href="libs/reactable-0.4.4/reactable.css" rel="stylesheet" />
<script src="libs/reactable-binding-0.4.4/reactable.js"></script>
<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
}
pre.numberSource { margin-left: 3em; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { font-weight: bold; } /* Alert */
code span.an { font-style: italic; } /* Annotation */
code span.cf { font-weight: bold; } /* ControlFlow */
code span.co { font-style: italic; } /* Comment */
code span.cv { font-style: italic; } /* CommentVar */
code span.do { font-style: italic; } /* Documentation */
code span.dt { text-decoration: underline; } /* DataType */
code span.er { font-weight: bold; } /* Error */
code span.in { font-style: italic; } /* Information */
code span.kw { font-weight: bold; } /* Keyword */
code span.pp { font-weight: bold; } /* Preprocessor */
code span.wa { font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="../resources/styles/mystyle.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">Bookdown for Data Scientists</a></li>
<li class="divider"></li>
<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> bookdown for data scientists</a>
<ul>
<li class="chapter" data-level="1.1" data-path="prerequisites.html"><a href="prerequisites.html"><i class="fa fa-check"></i><b>1.1</b> Prerequisites</a>
<ul>
<li class="chapter" data-level="1.1.1" data-path="prerequisites.html"><a href="prerequisites.html#software"><i class="fa fa-check"></i><b>1.1.1</b> Software</a></li>
<li class="chapter" data-level="1.1.2" data-path="prerequisites.html"><a href="prerequisites.html#knowledge-and-experience"><i class="fa fa-check"></i><b>1.1.2</b> Knowledge and experience</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="2" data-path="motivation.html"><a href="motivation.html"><i class="fa fa-check"></i><b>2</b> Motivation</a>
<ul>
<li class="chapter" data-level="2.0.1" data-path="motivation.html"><a href="motivation.html#when-not-to-use-bookdown"><i class="fa fa-check"></i><b>2.0.1</b> When not to use bookdown</a></li>
</ul></li>
<li class="chapter" data-level="3" data-path="getting-started.html"><a href="getting-started.html"><i class="fa fa-check"></i><b>3</b> Getting started</a></li>
<li class="chapter" data-level="4" data-path="adding-interaction.html"><a href="adding-interaction.html"><i class="fa fa-check"></i><b>4</b> Adding interaction</a></li>
<li class="chapter" data-level="5" data-path="integrating-regular-data-updates.html"><a href="integrating-regular-data-updates.html"><i class="fa fa-check"></i><b>5</b> Integrating regular data updates</a></li>
<li class="chapter" data-level="6" data-path="publishing-as-a-website.html"><a href="publishing-as-a-website.html"><i class="fa fa-check"></i><b>6</b> Publishing as a website</a>
<ul>
<li class="chapter" data-level="6.1" data-path="hosting-on-github.html"><a href="hosting-on-github.html"><i class="fa fa-check"></i><b>6.1</b> Hosting on GitHub</a></li>
</ul></li>
<li class="chapter" data-level="7" data-path="crowd-sourced-edits.html"><a href="crowd-sourced-edits.html"><i class="fa fa-check"></i><b>7</b> Crowd-sourced edits</a></li>
<li class="chapter" data-level="8" data-path="appendix-bookdown-filetypes.html"><a href="appendix-bookdown-filetypes.html"><i class="fa fa-check"></i><b>8</b> Appendix: bookdown filetypes</a>
<ul>
<li class="chapter" data-level="" data-path="appendix-bookdown-filetypes.html"><a href="appendix-bookdown-filetypes.html#rmd"><i class="fa fa-check"></i><code>.Rmd</code></a></li>
<li class="chapter" data-level="" data-path="appendix-bookdown-filetypes.html"><a href="appendix-bookdown-filetypes.html#yml"><i class="fa fa-check"></i><code>.yml</code></a></li>
<li class="chapter" data-level="" data-path="appendix-bookdown-filetypes.html"><a href="appendix-bookdown-filetypes.html#css"><i class="fa fa-check"></i><code>.css</code></a></li>
</ul></li>
<li class="chapter" data-level="9" data-path="further-reading.html"><a href="further-reading.html"><i class="fa fa-check"></i><b>9</b> Further reading</a>
<ul>
<li class="chapter" data-level="9.1" data-path="troubleshooting.html"><a href="troubleshooting.html"><i class="fa fa-check"></i><b>9.1</b> Troubleshooting</a>
<ul>
<li class="chapter" data-level="9.1.1" data-path="troubleshooting.html"><a href="troubleshooting.html#operating-system-differences"><i class="fa fa-check"></i><b>9.1.1</b> Operating system differences</a></li>
</ul></li>
</ul></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">bookdown for data scientists</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="motivation" class="section level1 hasAnchor" number="2">
<h1><span class="header-section-number">Chapter 2</span> Motivation<a href="motivation.html#motivation" class="anchor-section" aria-label="Anchor link to header"></a></h1>
<p>Why is <code>bookdown</code> useful for us as data scientists and data-adjacent practitioners? Because we can self-publish professional-looking materials that help us to organize things like this:</p>
<p>[image of process data project prior to new documentation]</p>
<p>Into this:</p>
<!-- [image of new bookdown, GIF for emphasis on interactivity] -->
<div class="figure"><span style="display:block;" id="fig:unnamed-chunk-2"></span>
<img src="resources/images/pdc-site.png" alt="Published Process Data Release website" />
<p class="caption">
Figure 2.1: Published Process Data Release website
</p>
</div>
<p>You can imagine <code>bookdown</code> as a format designed to combine the features of data tables, textual explanations, and code.</p>
<p>The following table summarizes some features of R Markdown and <code>bookdown</code> as compared to familiar alternatives.</p>
<table>
<colgroup>
<col width="24%" />
<col width="40%" />
<col width="17%" />
<col width="17%" />
</colgroup>
<thead>
<tr class="header">
<th>Features</th>
<th>Microsoft Word/Google Docs</th>
<th>R Markdown</th>
<th>bookdown</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Multiple editors</td>
<td>Yes</td>
<td>Yes, via GitHub</td>
<td>Yes, via GitHub</td>
</tr>
<tr class="even">
<td>Formats and runs code snippets</td>
<td>No</td>
<td>Yes, R code</td>
<td>Yes, R code</td>
</tr>
<tr class="odd">
<td>Formats math</td>
<td>Yes</td>
<td>Yes, with LaTeX</td>
<td>Yes, with LaTeX</td>
</tr>
<tr class="even">
<td>Consistent appearance and formatting</td>
<td>Haha</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr class="odd">
<td>PDF accessibility</td>
<td>Yes, via tagged PDF export</td>
<td>No, requires customization</td>
<td>No, requires customization</td>
</tr>
<tr class="even">
<td>Web accessibility</td>
<td>Yes, <a href="https://www.colorado.edu/digital-accessibility/google-docs-and-accessibility">with some exceptions</a></td>
<td>Yes, via HTML output</td>
<td>Yes, via HTML output</td>
</tr>
</tbody>
</table>
<p>As stated in the table, I would like to make a note about accessibility: Microsoft Word has a great tool for exporting documents as tagged PDFs, a format that helps users who use screen readers, such as users with visual disabilities. I have found in my personal experience that R Markdown and bookdown require minimal to moderate customization to follow common accessibility practices, such as color contrast and tagging. My company was able to follow 508 requirements.</p>
<div id="when-not-to-use-bookdown" class="section level3 hasAnchor" number="2.0.1">
<h3><span class="header-section-number">2.0.1</span> When not to use bookdown<a href="motivation.html#when-not-to-use-bookdown" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p><code>bookdown</code> is suitable mainly for projects in R. For small datasets with simple documentation, using <code>bookdown</code> may be more complex than the task at hand.</p>
</div>
</div>
</section>
</div>
</div>
</div>
<a href="prerequisites.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="getting-started.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": true,
"facebook": false,
"twitter": false,
"linkedin": false,
"weibo": false,
"instapaper": false,
"vk": false,
"whatsapp": false,
"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": "https://github.com/American-Institutes-for-Research/dsaa-pdc-ncme/issues02-why-bookdown.Rmd",
"text": "Feedback"
},
"history": {
"link": null,
"text": null
},
"view": {
"link": null,
"text": null
},
"download": ["Bookdown-for-Data-Scientists-NCME-2024.pdf"],
"search": {
"engine": "fuse",
"options": null
},
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>