Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

index.html 32 KB

You have to be logged in to leave a comment. Sign In
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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
  3. <meta charset="utf-8">
  4. <meta name="generator" content="quarto-1.3.450">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
  6. <title>Book Data Tools</title>
  7. <style>
  8. code{white-space: pre-wrap;}
  9. span.smallcaps{font-variant: small-caps;}
  10. div.columns{display: flex; gap: min(4vw, 1.5em);}
  11. div.column{flex: auto; overflow-x: auto;}
  12. div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
  13. ul.task-list{list-style: none;}
  14. ul.task-list li input[type="checkbox"] {
  15. width: 0.8em;
  16. margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
  17. vertical-align: middle;
  18. }
  19. </style>
  20. <script src="site_libs/quarto-nav/quarto-nav.js"></script>
  21. <script src="site_libs/quarto-nav/headroom.min.js"></script>
  22. <script src="site_libs/clipboard/clipboard.min.js"></script>
  23. <script src="site_libs/quarto-search/autocomplete.umd.js"></script>
  24. <script src="site_libs/quarto-search/fuse.min.js"></script>
  25. <script src="site_libs/quarto-search/quarto-search.js"></script>
  26. <meta name="quarto:offset" content="./">
  27. <script src="site_libs/quarto-html/quarto.js"></script>
  28. <script src="site_libs/quarto-html/popper.min.js"></script>
  29. <script src="site_libs/quarto-html/tippy.umd.min.js"></script>
  30. <script src="site_libs/quarto-html/anchor.min.js"></script>
  31. <link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
  32. <link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
  33. <link href="site_libs/quarto-html/quarto-syntax-highlighting-dark.css" rel="prefetch" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
  34. <script src="site_libs/bootstrap/bootstrap.min.js"></script>
  35. <link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
  36. <link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
  37. <link href="site_libs/bootstrap/bootstrap-dark.min.css" rel="prefetch" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
  38. <script id="quarto-search-options" type="application/json">{
  39. "location": "sidebar",
  40. "copy-button": false,
  41. "collapse-after": 3,
  42. "panel-placement": "start",
  43. "type": "textbox",
  44. "limit": 20,
  45. "language": {
  46. "search-no-results-text": "No results",
  47. "search-matching-documents-text": "matching documents",
  48. "search-copy-link-title": "Copy link to search",
  49. "search-hide-matches-text": "Hide additional matches",
  50. "search-more-match-text": "more match in this document",
  51. "search-more-matches-text": "more matches in this document",
  52. "search-clear-button-title": "Clear",
  53. "search-detached-cancel-button-title": "Cancel",
  54. "search-submit-button-title": "Submit",
  55. "search-label": "Search"
  56. }
  57. }</script>
  58. <link rel="stylesheet" href="tweaks.css">
  59. </head>
  60. <body class="nav-sidebar floating">
  61. <div id="quarto-search-results"></div>
  62. <header id="quarto-header" class="headroom fixed-top">
  63. <nav class="quarto-secondary-nav">
  64. <div class="container-fluid d-flex">
  65. <button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
  66. <i class="bi bi-layout-text-sidebar-reverse"></i>
  67. </button>
  68. <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./index.html">Overview</a></li></ol></nav>
  69. <a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
  70. </a>
  71. <button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
  72. <i class="bi bi-search"></i>
  73. </button>
  74. </div>
  75. </nav>
  76. </header>
  77. <!-- content -->
  78. <div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
  79. <!-- sidebar -->
  80. <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal sidebar-navigation floating overflow-auto">
  81. <div class="pt-lg-2 mt-2 text-left sidebar-header">
  82. <div class="sidebar-title mb-0 py-0">
  83. <a href="./">Book Data Tools</a>
  84. <div class="sidebar-tools-main">
  85. <a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Toggle dark mode"><i class="bi"></i></a>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="mt-2 flex-shrink-0 align-items-center">
  90. <div class="sidebar-search">
  91. <div id="quarto-search" class="" title="Search"></div>
  92. </div>
  93. </div>
  94. <div class="sidebar-menu-container">
  95. <ul class="list-unstyled mt-1">
  96. <li class="sidebar-item">
  97. <div class="sidebar-item-container">
  98. <a href="./index.html" class="sidebar-item-text sidebar-link active">
  99. <span class="menu-text">Overview</span></a>
  100. </div>
  101. </li>
  102. <li class="sidebar-item sidebar-item-section">
  103. <div class="sidebar-item-container">
  104. <a href="./using/index.html" class="sidebar-item-text sidebar-link">
  105. <span class="menu-text">Importing</span></a>
  106. <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true" aria-label="Toggle section">
  107. <i class="bi bi-chevron-right ms-2"></i>
  108. </a>
  109. </div>
  110. <ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
  111. <li class="sidebar-item">
  112. <div class="sidebar-item-container">
  113. <a href="./using/setup.html" class="sidebar-item-text sidebar-link">
  114. <span class="menu-text">Environment Setup</span></a>
  115. </div>
  116. </li>
  117. <li class="sidebar-item">
  118. <div class="sidebar-item-container">
  119. <a href="./using/storage.html" class="sidebar-item-text sidebar-link">
  120. <span class="menu-text">Data Storage</span></a>
  121. </div>
  122. </li>
  123. <li class="sidebar-item">
  124. <div class="sidebar-item-container">
  125. <a href="./using/sources.html" class="sidebar-item-text sidebar-link">
  126. <span class="menu-text">Source Data</span></a>
  127. </div>
  128. </li>
  129. <li class="sidebar-item">
  130. <div class="sidebar-item-container">
  131. <a href="./using/running.html" class="sidebar-item-text sidebar-link">
  132. <span class="menu-text">Running the Tools</span></a>
  133. </div>
  134. </li>
  135. </ul>
  136. </li>
  137. <li class="sidebar-item sidebar-item-section">
  138. <div class="sidebar-item-container">
  139. <a href="./data/index.html" class="sidebar-item-text sidebar-link">
  140. <span class="menu-text">Data Organization</span></a>
  141. <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
  142. <i class="bi bi-chevron-right ms-2"></i>
  143. </a>
  144. </div>
  145. <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
  146. <li class="sidebar-item">
  147. <div class="sidebar-item-container">
  148. <a href="./data/ids.html" class="sidebar-item-text sidebar-link">
  149. <span class="menu-text">Common Identifiers</span></a>
  150. </div>
  151. </li>
  152. <li class="sidebar-item">
  153. <div class="sidebar-item-container">
  154. <a href="./data/loc.html" class="sidebar-item-text sidebar-link">
  155. <span class="menu-text">Library of Congress</span></a>
  156. </div>
  157. </li>
  158. <li class="sidebar-item">
  159. <div class="sidebar-item-container">
  160. <a href="./data/openlib.html" class="sidebar-item-text sidebar-link">
  161. <span class="menu-text">OpenLibrary</span></a>
  162. </div>
  163. </li>
  164. <li class="sidebar-item">
  165. <div class="sidebar-item-container">
  166. <a href="./data/viaf.html" class="sidebar-item-text sidebar-link">
  167. <span class="menu-text">VIAF</span></a>
  168. </div>
  169. </li>
  170. <li class="sidebar-item">
  171. <div class="sidebar-item-container">
  172. <a href="./data/bx.html" class="sidebar-item-text sidebar-link">
  173. <span class="menu-text">BookCrossing</span></a>
  174. </div>
  175. </li>
  176. <li class="sidebar-item">
  177. <div class="sidebar-item-container">
  178. <a href="./data/amazon.html" class="sidebar-item-text sidebar-link">
  179. <span class="menu-text">Amazon Ratings</span></a>
  180. </div>
  181. </li>
  182. <li class="sidebar-item">
  183. <div class="sidebar-item-container">
  184. <a href="./data/goodreads.html" class="sidebar-item-text sidebar-link">
  185. <span class="menu-text">GoodReads</span></a>
  186. </div>
  187. </li>
  188. <li class="sidebar-item">
  189. <div class="sidebar-item-container">
  190. <a href="./data/cluster.html" class="sidebar-item-text sidebar-link">
  191. <span class="menu-text">Book Clusters</span></a>
  192. </div>
  193. </li>
  194. <li class="sidebar-item">
  195. <div class="sidebar-item-container">
  196. <a href="./data/gender.html" class="sidebar-item-text sidebar-link">
  197. <span class="menu-text">Book Author Gender</span></a>
  198. </div>
  199. </li>
  200. </ul>
  201. </li>
  202. <li class="sidebar-item sidebar-item-section">
  203. <div class="sidebar-item-container">
  204. <a href="./implementation/index.html" class="sidebar-item-text sidebar-link">
  205. <span class="menu-text">Implementation</span></a>
  206. <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section">
  207. <i class="bi bi-chevron-right ms-2"></i>
  208. </a>
  209. </div>
  210. <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
  211. <li class="sidebar-item">
  212. <div class="sidebar-item-container">
  213. <a href="./implementation/pipeline.html" class="sidebar-item-text sidebar-link">
  214. <span class="menu-text">Pipeline Specification</span></a>
  215. </div>
  216. </li>
  217. <li class="sidebar-item">
  218. <div class="sidebar-item-container">
  219. <a href="./implementation/layout.html" class="sidebar-item-text sidebar-link">
  220. <span class="menu-text">Code Layout</span></a>
  221. </div>
  222. </li>
  223. <li class="sidebar-item">
  224. <div class="sidebar-item-container">
  225. <a href="./implementation/dataset.html" class="sidebar-item-text sidebar-link">
  226. <span class="menu-text">Design for Datasets</span></a>
  227. </div>
  228. </li>
  229. </ul>
  230. </li>
  231. <li class="sidebar-item">
  232. <div class="sidebar-item-container">
  233. <a href="./history.html" class="sidebar-item-text sidebar-link">
  234. <span class="menu-text">History</span></a>
  235. </div>
  236. </li>
  237. <li class="sidebar-item">
  238. <div class="sidebar-item-container">
  239. <a href="./papers.html" class="sidebar-item-text sidebar-link">
  240. <span class="menu-text">Papers Using BookData</span></a>
  241. </div>
  242. </li>
  243. <li class="sidebar-item sidebar-item-section">
  244. <div class="sidebar-item-container">
  245. <a href="./reports/index.html" class="sidebar-item-text sidebar-link">
  246. <span class="menu-text">Reports and Audits</span></a>
  247. <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" aria-expanded="true" aria-label="Toggle section">
  248. <i class="bi bi-chevron-right ms-2"></i>
  249. </a>
  250. </div>
  251. <ul id="quarto-sidebar-section-4" class="collapse list-unstyled sidebar-section depth1 show">
  252. <li class="sidebar-item">
  253. <div class="sidebar-item-container">
  254. <a href="./reports/LinkageStats.html" class="sidebar-item-text sidebar-link">
  255. <span class="menu-text">Book Data Linkage Statistics</span></a>
  256. </div>
  257. </li>
  258. <li class="sidebar-item">
  259. <div class="sidebar-item-container">
  260. <a href="./reports/audit-cluster-stats.html" class="sidebar-item-text sidebar-link">
  261. <span class="menu-text">ISBN Cluster Changes</span></a>
  262. </div>
  263. </li>
  264. <li class="sidebar-item">
  265. <div class="sidebar-item-container">
  266. <a href="./reports/audit-gender-changes.html" class="sidebar-item-text sidebar-link">
  267. <span class="menu-text">Cluster Gender Changes</span></a>
  268. </div>
  269. </li>
  270. </ul>
  271. </li>
  272. <li class="sidebar-item">
  273. <div class="sidebar-item-container">
  274. <a href="./apidocs/bookdata/" class="sidebar-item-text sidebar-link"><i class="bi bi-gear-wide" role="img">
  275. </i>
  276. <span class="menu-text">Rust API docs</span></a>
  277. </div>
  278. </li>
  279. <li class="sidebar-item">
  280. <div class="sidebar-item-container">
  281. <a href="https://github.com/PIReTship/bookdata-tools" class="sidebar-item-text sidebar-link"><i class="bi bi-github" role="img">
  282. </i>
  283. <span class="menu-text">GitHub repository</span></a>
  284. </div>
  285. </li>
  286. </ul>
  287. </div>
  288. </nav>
  289. <div id="quarto-sidebar-glass" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass"></div>
  290. <!-- margin-sidebar -->
  291. <div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
  292. <nav id="TOC" role="doc-toc" class="toc-active">
  293. <h2 id="toc-title">On this page</h2>
  294. <ul>
  295. <li><a href="#overview" id="toc-overview" class="nav-link active" data-scroll-target="#overview">Overview</a>
  296. <ul class="collapse">
  297. <li><a href="#video" id="toc-video" class="nav-link" data-scroll-target="#video">Video</a></li>
  298. <li><a href="#license" id="toc-license" class="nav-link" data-scroll-target="#license">License</a></li>
  299. <li><a href="#acknowledgments" id="toc-acknowledgments" class="nav-link" data-scroll-target="#acknowledgments">Acknowledgments</a></li>
  300. </ul></li>
  301. </ul>
  302. <div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/PIReTship/bookdata-tools/edit/main/docs/index.md" class="toc-action">Edit this page</a></p><p><a href="https://github.com/PIReTship/bookdata-tools/issues/new" class="toc-action">Report an issue</a></p></div></div></nav>
  303. </div>
  304. <!-- main -->
  305. <main class="content" id="quarto-document-content">
  306. <section id="overview" class="level1 unnumbered">
  307. <h1 class="unnumbered">Overview</h1>
  308. <p>The PIReT Book Data Tools are a set of tools for ingesting, integrating, and indexing a variety of sources of book data, created by the <a href="https://piret.info">People and Information Research Team</a> at <a href="https://boisestate.edu">Boise State University</a>. The result of running these tools is a set of Parquet files with raw data in a more usable form, various useful extracted features, and integrated identifiers across the various data sources for cross-linking. These tools are updated from the version used to support our original paper; we have dropped PostgreSQL in favor of a pipeline using DVC to script extraction and integration tools implemented in Rust that is more efficient (integration times have dropped from 8 hours to less than 3) and requires significantly less disk space.<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
  309. <p>If you use these scripts in any published research, cite <a href="https://md.ekstrandom.net/pubs/bag-extended">our paper</a> (<a href="https://md.ekstrandom.net/pubs/bag2-preprint.pdf">PDF</a>):</p>
  310. <blockquote class="blockquote">
  311. <p>Michael D. Ekstrand and Daniel Kluver. 2021. Exploring Author Gender in Book Rating and Recommendation. <cite>User Modeling and User-Adapted Interaction</cite> (February 2021) DOI:<a href="https://doi.org/10.1007/s11257-020-09284-2">10.1007/s11257-020-09284-2</a>.</p>
  312. </blockquote>
  313. <p>We also ask that you contact Michael Ekstrand to let us know about your use of the data, so we can include your paper in our list of relying publications.</p>
  314. <div class="callout callout-style-default callout-warning callout-titled">
  315. <div class="callout-header d-flex align-content-center">
  316. <div class="callout-icon-container">
  317. <i class="callout-icon"></i>
  318. </div>
  319. <div class="callout-title-container flex-fill">
  320. Warning
  321. </div>
  322. </div>
  323. <div class="callout-body-container callout-body">
  324. <p>The “Limitations” section of the paper contains important information about the limitations of the data these scripts compile. <strong>Do not use the gender information in this data or tools without understanding those limitations</strong>. In particular, VIAF’s gender information is incomplete and, in a number of cases, incorrect.</p>
  325. </div>
  326. </div>
  327. <p>In addition, several of the data sets integrated by this project come from other sources with their own publications. <strong>If you use any of the rating or interaction data, cite the appropriate original source paper.</strong> For each data set below, we have provided a link to the page that describes the data and its appropriate citation.</p>
  328. <p>See the <a href="./using/setup.html">Setup page</a> to get started and for system requirements.</p>
  329. <section id="video" class="level2">
  330. <h2 class="anchored" data-anchor-id="video">Video</h2>
  331. <p>I recorded a video walking through the integration as an example for my <a href="https://cs533.ekstrandom.net">Data Science class</a>. This discusses the PostgreSQL version of the integration, but the concepts have remained the same in terms of linking logic.</p>
  332. <div style="position: relative; padding-top: 56.25%;">
  333. <iframe src="https://iframe.mediadelivery.net/embed/114107/60f24ed2-4a71-4fa7-b1f4-82d95ab62c67?autoplay=false" loading="lazy" style="border: none; position: absolute; top: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true">
  334. </iframe>
  335. </div>
  336. </section>
  337. <section id="license" class="level2">
  338. <h2 class="anchored" data-anchor-id="license">License</h2>
  339. <p>These tools are under the MIT license:</p>
  340. <blockquote class="blockquote">
  341. <p>Copyright 2019-2021 Boise State University</p>
  342. <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
  343. <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
  344. <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
  345. </blockquote>
  346. </section>
  347. <section id="acknowledgments" class="level2">
  348. <h2 class="anchored" data-anchor-id="acknowledgments">Acknowledgments</h2>
  349. <p>This material is based upon work supported by the National Science Foundation under Grant No.&nbsp;<a href="https://md.ekstrandom.net/research/career">IIS 17-51278</a>. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. This page has not been approved by Boise State University and does not reflect official university positions.</p>
  350. </section>
  351. </section>
  352. <div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document" role="doc-endnotes"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>
  353. <ol>
  354. <li id="fn1"><p>The original tools are available on the <code>before-fusion</code> tag in the Git repository.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
  355. </ol>
  356. </section></div></main> <!-- /main -->
  357. <script id="quarto-html-after-body" type="application/javascript">
  358. window.document.addEventListener("DOMContentLoaded", function (event) {
  359. const toggleBodyColorMode = (bsSheetEl) => {
  360. const mode = bsSheetEl.getAttribute("data-mode");
  361. const bodyEl = window.document.querySelector("body");
  362. if (mode === "dark") {
  363. bodyEl.classList.add("quarto-dark");
  364. bodyEl.classList.remove("quarto-light");
  365. } else {
  366. bodyEl.classList.add("quarto-light");
  367. bodyEl.classList.remove("quarto-dark");
  368. }
  369. }
  370. const toggleBodyColorPrimary = () => {
  371. const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
  372. if (bsSheetEl) {
  373. toggleBodyColorMode(bsSheetEl);
  374. }
  375. }
  376. toggleBodyColorPrimary();
  377. const disableStylesheet = (stylesheets) => {
  378. for (let i=0; i < stylesheets.length; i++) {
  379. const stylesheet = stylesheets[i];
  380. stylesheet.rel = 'prefetch';
  381. }
  382. }
  383. const enableStylesheet = (stylesheets) => {
  384. for (let i=0; i < stylesheets.length; i++) {
  385. const stylesheet = stylesheets[i];
  386. stylesheet.rel = 'stylesheet';
  387. }
  388. }
  389. const manageTransitions = (selector, allowTransitions) => {
  390. const els = window.document.querySelectorAll(selector);
  391. for (let i=0; i < els.length; i++) {
  392. const el = els[i];
  393. if (allowTransitions) {
  394. el.classList.remove('notransition');
  395. } else {
  396. el.classList.add('notransition');
  397. }
  398. }
  399. }
  400. const toggleColorMode = (alternate) => {
  401. // Switch the stylesheets
  402. const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
  403. manageTransitions('#quarto-margin-sidebar .nav-link', false);
  404. if (alternate) {
  405. enableStylesheet(alternateStylesheets);
  406. for (const sheetNode of alternateStylesheets) {
  407. if (sheetNode.id === "quarto-bootstrap") {
  408. toggleBodyColorMode(sheetNode);
  409. }
  410. }
  411. } else {
  412. disableStylesheet(alternateStylesheets);
  413. toggleBodyColorPrimary();
  414. }
  415. manageTransitions('#quarto-margin-sidebar .nav-link', true);
  416. // Switch the toggles
  417. const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
  418. for (let i=0; i < toggles.length; i++) {
  419. const toggle = toggles[i];
  420. if (toggle) {
  421. if (alternate) {
  422. toggle.classList.add("alternate");
  423. } else {
  424. toggle.classList.remove("alternate");
  425. }
  426. }
  427. }
  428. // Hack to workaround the fact that safari doesn't
  429. // properly recolor the scrollbar when toggling (#1455)
  430. if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
  431. manageTransitions("body", false);
  432. window.scrollTo(0, 1);
  433. setTimeout(() => {
  434. window.scrollTo(0, 0);
  435. manageTransitions("body", true);
  436. }, 40);
  437. }
  438. }
  439. const isFileUrl = () => {
  440. return window.location.protocol === 'file:';
  441. }
  442. const hasAlternateSentinel = () => {
  443. let styleSentinel = getColorSchemeSentinel();
  444. if (styleSentinel !== null) {
  445. return styleSentinel === "alternate";
  446. } else {
  447. return false;
  448. }
  449. }
  450. const setStyleSentinel = (alternate) => {
  451. const value = alternate ? "alternate" : "default";
  452. if (!isFileUrl()) {
  453. window.localStorage.setItem("quarto-color-scheme", value);
  454. } else {
  455. localAlternateSentinel = value;
  456. }
  457. }
  458. const getColorSchemeSentinel = () => {
  459. if (!isFileUrl()) {
  460. const storageValue = window.localStorage.getItem("quarto-color-scheme");
  461. return storageValue != null ? storageValue : localAlternateSentinel;
  462. } else {
  463. return localAlternateSentinel;
  464. }
  465. }
  466. let localAlternateSentinel = 'default';
  467. // Dark / light mode switch
  468. window.quartoToggleColorScheme = () => {
  469. // Read the current dark / light value
  470. let toAlternate = !hasAlternateSentinel();
  471. toggleColorMode(toAlternate);
  472. setStyleSentinel(toAlternate);
  473. };
  474. // Ensure there is a toggle, if there isn't float one in the top right
  475. if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
  476. const a = window.document.createElement('a');
  477. a.classList.add('top-right');
  478. a.classList.add('quarto-color-scheme-toggle');
  479. a.href = "";
  480. a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; };
  481. const i = window.document.createElement("i");
  482. i.classList.add('bi');
  483. a.appendChild(i);
  484. window.document.body.appendChild(a);
  485. }
  486. // Switch to dark mode if need be
  487. if (hasAlternateSentinel()) {
  488. toggleColorMode(true);
  489. } else {
  490. toggleColorMode(false);
  491. }
  492. const icon = "";
  493. const anchorJS = new window.AnchorJS();
  494. anchorJS.options = {
  495. placement: 'right',
  496. icon: icon
  497. };
  498. anchorJS.add('.anchored');
  499. const isCodeAnnotation = (el) => {
  500. for (const clz of el.classList) {
  501. if (clz.startsWith('code-annotation-')) {
  502. return true;
  503. }
  504. }
  505. return false;
  506. }
  507. const clipboard = new window.ClipboardJS('.code-copy-button', {
  508. text: function(trigger) {
  509. const codeEl = trigger.previousElementSibling.cloneNode(true);
  510. for (const childEl of codeEl.children) {
  511. if (isCodeAnnotation(childEl)) {
  512. childEl.remove();
  513. }
  514. }
  515. return codeEl.innerText;
  516. }
  517. });
  518. clipboard.on('success', function(e) {
  519. // button target
  520. const button = e.trigger;
  521. // don't keep focus
  522. button.blur();
  523. // flash "checked"
  524. button.classList.add('code-copy-button-checked');
  525. var currentTitle = button.getAttribute("title");
  526. button.setAttribute("title", "Copied!");
  527. let tooltip;
  528. if (window.bootstrap) {
  529. button.setAttribute("data-bs-toggle", "tooltip");
  530. button.setAttribute("data-bs-placement", "left");
  531. button.setAttribute("data-bs-title", "Copied!");
  532. tooltip = new bootstrap.Tooltip(button,
  533. { trigger: "manual",
  534. customClass: "code-copy-button-tooltip",
  535. offset: [0, -8]});
  536. tooltip.show();
  537. }
  538. setTimeout(function() {
  539. if (tooltip) {
  540. tooltip.hide();
  541. button.removeAttribute("data-bs-title");
  542. button.removeAttribute("data-bs-toggle");
  543. button.removeAttribute("data-bs-placement");
  544. }
  545. button.setAttribute("title", currentTitle);
  546. button.classList.remove('code-copy-button-checked');
  547. }, 1000);
  548. // clear code selection
  549. e.clearSelection();
  550. });
  551. function tippyHover(el, contentFn) {
  552. const config = {
  553. allowHTML: true,
  554. content: contentFn,
  555. maxWidth: 500,
  556. delay: 100,
  557. arrow: false,
  558. appendTo: function(el) {
  559. return el.parentElement;
  560. },
  561. interactive: true,
  562. interactiveBorder: 10,
  563. theme: 'quarto',
  564. placement: 'bottom-start'
  565. };
  566. window.tippy(el, config);
  567. }
  568. const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
  569. for (var i=0; i<noterefs.length; i++) {
  570. const ref = noterefs[i];
  571. tippyHover(ref, function() {
  572. // use id or data attribute instead here
  573. let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
  574. try { href = new URL(href).hash; } catch {}
  575. const id = href.replace(/^#\/?/, "");
  576. const note = window.document.getElementById(id);
  577. return note.innerHTML;
  578. });
  579. }
  580. let selectedAnnoteEl;
  581. const selectorForAnnotation = ( cell, annotation) => {
  582. let cellAttr = 'data-code-cell="' + cell + '"';
  583. let lineAttr = 'data-code-annotation="' + annotation + '"';
  584. const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
  585. return selector;
  586. }
  587. const selectCodeLines = (annoteEl) => {
  588. const doc = window.document;
  589. const targetCell = annoteEl.getAttribute("data-target-cell");
  590. const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
  591. const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
  592. const lines = annoteSpan.getAttribute("data-code-lines").split(",");
  593. const lineIds = lines.map((line) => {
  594. return targetCell + "-" + line;
  595. })
  596. let top = null;
  597. let height = null;
  598. let parent = null;
  599. if (lineIds.length > 0) {
  600. //compute the position of the single el (top and bottom and make a div)
  601. const el = window.document.getElementById(lineIds[0]);
  602. top = el.offsetTop;
  603. height = el.offsetHeight;
  604. parent = el.parentElement.parentElement;
  605. if (lineIds.length > 1) {
  606. const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
  607. const bottom = lastEl.offsetTop + lastEl.offsetHeight;
  608. height = bottom - top;
  609. }
  610. if (top !== null && height !== null && parent !== null) {
  611. // cook up a div (if necessary) and position it
  612. let div = window.document.getElementById("code-annotation-line-highlight");
  613. if (div === null) {
  614. div = window.document.createElement("div");
  615. div.setAttribute("id", "code-annotation-line-highlight");
  616. div.style.position = 'absolute';
  617. parent.appendChild(div);
  618. }
  619. div.style.top = top - 2 + "px";
  620. div.style.height = height + 4 + "px";
  621. let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
  622. if (gutterDiv === null) {
  623. gutterDiv = window.document.createElement("div");
  624. gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
  625. gutterDiv.style.position = 'absolute';
  626. const codeCell = window.document.getElementById(targetCell);
  627. const gutter = codeCell.querySelector('.code-annotation-gutter');
  628. gutter.appendChild(gutterDiv);
  629. }
  630. gutterDiv.style.top = top - 2 + "px";
  631. gutterDiv.style.height = height + 4 + "px";
  632. }
  633. selectedAnnoteEl = annoteEl;
  634. }
  635. };
  636. const unselectCodeLines = () => {
  637. const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
  638. elementsIds.forEach((elId) => {
  639. const div = window.document.getElementById(elId);
  640. if (div) {
  641. div.remove();
  642. }
  643. });
  644. selectedAnnoteEl = undefined;
  645. };
  646. // Attach click handler to the DT
  647. const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
  648. for (const annoteDlNode of annoteDls) {
  649. annoteDlNode.addEventListener('click', (event) => {
  650. const clickedEl = event.target;
  651. if (clickedEl !== selectedAnnoteEl) {
  652. unselectCodeLines();
  653. const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
  654. if (activeEl) {
  655. activeEl.classList.remove('code-annotation-active');
  656. }
  657. selectCodeLines(clickedEl);
  658. clickedEl.classList.add('code-annotation-active');
  659. } else {
  660. // Unselect the line
  661. unselectCodeLines();
  662. clickedEl.classList.remove('code-annotation-active');
  663. }
  664. });
  665. }
  666. const findCites = (el) => {
  667. const parentEl = el.parentElement;
  668. if (parentEl) {
  669. const cites = parentEl.dataset.cites;
  670. if (cites) {
  671. return {
  672. el,
  673. cites: cites.split(' ')
  674. };
  675. } else {
  676. return findCites(el.parentElement)
  677. }
  678. } else {
  679. return undefined;
  680. }
  681. };
  682. var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
  683. for (var i=0; i<bibliorefs.length; i++) {
  684. const ref = bibliorefs[i];
  685. const citeInfo = findCites(ref);
  686. if (citeInfo) {
  687. tippyHover(citeInfo.el, function() {
  688. var popup = window.document.createElement('div');
  689. citeInfo.cites.forEach(function(cite) {
  690. var citeDiv = window.document.createElement('div');
  691. citeDiv.classList.add('hanging-indent');
  692. citeDiv.classList.add('csl-entry');
  693. var biblioDiv = window.document.getElementById('ref-' + cite);
  694. if (biblioDiv) {
  695. citeDiv.innerHTML = biblioDiv.innerHTML;
  696. }
  697. popup.appendChild(citeDiv);
  698. });
  699. return popup.innerHTML;
  700. });
  701. }
  702. }
  703. });
  704. </script>
  705. </div> <!-- /content -->
  706. <script data-goatcounter="https://piret-bookdata.goatcounter.com/count" async="" src="//gc.zgo.at/count.js"></script>
  707. </body></html>
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...