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

loc.html 37 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
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
  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 – loc</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. <script src="../site_libs/quarto-diagram/mermaid.min.js"></script>
  59. <script src="../site_libs/quarto-diagram/mermaid-init.js"></script>
  60. <link href="../site_libs/quarto-diagram/mermaid.css" rel="stylesheet">
  61. <link rel="stylesheet" href="../tweaks.css">
  62. </head>
  63. <body class="nav-sidebar floating">
  64. <div id="quarto-search-results"></div>
  65. <header id="quarto-header" class="headroom fixed-top">
  66. <nav class="quarto-secondary-nav">
  67. <div class="container-fluid d-flex">
  68. <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(); }">
  69. <i class="bi bi-layout-text-sidebar-reverse"></i>
  70. </button>
  71. <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="../data/index.html">Data Organization</a></li><li class="breadcrumb-item"><a href="../data/loc.html">Library of Congress</a></li></ol></nav>
  72. <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(); }">
  73. </a>
  74. <button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
  75. <i class="bi bi-search"></i>
  76. </button>
  77. </div>
  78. </nav>
  79. </header>
  80. <!-- content -->
  81. <div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
  82. <!-- sidebar -->
  83. <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal sidebar-navigation floating overflow-auto">
  84. <div class="pt-lg-2 mt-2 text-left sidebar-header">
  85. <div class="sidebar-title mb-0 py-0">
  86. <a href="../">Book Data Tools</a>
  87. <div class="sidebar-tools-main">
  88. <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>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="mt-2 flex-shrink-0 align-items-center">
  93. <div class="sidebar-search">
  94. <div id="quarto-search" class="" title="Search"></div>
  95. </div>
  96. </div>
  97. <div class="sidebar-menu-container">
  98. <ul class="list-unstyled mt-1">
  99. <li class="sidebar-item">
  100. <div class="sidebar-item-container">
  101. <a href="../index.html" class="sidebar-item-text sidebar-link">
  102. <span class="menu-text">Overview</span></a>
  103. </div>
  104. </li>
  105. <li class="sidebar-item sidebar-item-section">
  106. <div class="sidebar-item-container">
  107. <a href="../using/index.html" class="sidebar-item-text sidebar-link">
  108. <span class="menu-text">Importing</span></a>
  109. <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">
  110. <i class="bi bi-chevron-right ms-2"></i>
  111. </a>
  112. </div>
  113. <ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
  114. <li class="sidebar-item">
  115. <div class="sidebar-item-container">
  116. <a href="../using/setup.html" class="sidebar-item-text sidebar-link">
  117. <span class="menu-text">Environment Setup</span></a>
  118. </div>
  119. </li>
  120. <li class="sidebar-item">
  121. <div class="sidebar-item-container">
  122. <a href="../using/storage.html" class="sidebar-item-text sidebar-link">
  123. <span class="menu-text">Data Storage</span></a>
  124. </div>
  125. </li>
  126. <li class="sidebar-item">
  127. <div class="sidebar-item-container">
  128. <a href="../using/sources.html" class="sidebar-item-text sidebar-link">
  129. <span class="menu-text">Source Data</span></a>
  130. </div>
  131. </li>
  132. <li class="sidebar-item">
  133. <div class="sidebar-item-container">
  134. <a href="../using/running.html" class="sidebar-item-text sidebar-link">
  135. <span class="menu-text">Running the Tools</span></a>
  136. </div>
  137. </li>
  138. </ul>
  139. </li>
  140. <li class="sidebar-item sidebar-item-section">
  141. <div class="sidebar-item-container">
  142. <a href="../data/index.html" class="sidebar-item-text sidebar-link">
  143. <span class="menu-text">Data Organization</span></a>
  144. <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">
  145. <i class="bi bi-chevron-right ms-2"></i>
  146. </a>
  147. </div>
  148. <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
  149. <li class="sidebar-item">
  150. <div class="sidebar-item-container">
  151. <a href="../data/ids.html" class="sidebar-item-text sidebar-link">
  152. <span class="menu-text">Common Identifiers</span></a>
  153. </div>
  154. </li>
  155. <li class="sidebar-item">
  156. <div class="sidebar-item-container">
  157. <a href="../data/loc.html" class="sidebar-item-text sidebar-link active">
  158. <span class="menu-text">Library of Congress</span></a>
  159. </div>
  160. </li>
  161. <li class="sidebar-item">
  162. <div class="sidebar-item-container">
  163. <a href="../data/openlib.html" class="sidebar-item-text sidebar-link">
  164. <span class="menu-text">OpenLibrary</span></a>
  165. </div>
  166. </li>
  167. <li class="sidebar-item">
  168. <div class="sidebar-item-container">
  169. <a href="../data/viaf.html" class="sidebar-item-text sidebar-link">
  170. <span class="menu-text">VIAF</span></a>
  171. </div>
  172. </li>
  173. <li class="sidebar-item">
  174. <div class="sidebar-item-container">
  175. <a href="../data/bx.html" class="sidebar-item-text sidebar-link">
  176. <span class="menu-text">BookCrossing</span></a>
  177. </div>
  178. </li>
  179. <li class="sidebar-item">
  180. <div class="sidebar-item-container">
  181. <a href="../data/amazon.html" class="sidebar-item-text sidebar-link">
  182. <span class="menu-text">Amazon Ratings</span></a>
  183. </div>
  184. </li>
  185. <li class="sidebar-item">
  186. <div class="sidebar-item-container">
  187. <a href="../data/goodreads.html" class="sidebar-item-text sidebar-link">
  188. <span class="menu-text">GoodReads</span></a>
  189. </div>
  190. </li>
  191. <li class="sidebar-item">
  192. <div class="sidebar-item-container">
  193. <a href="../data/cluster.html" class="sidebar-item-text sidebar-link">
  194. <span class="menu-text">Book Clusters</span></a>
  195. </div>
  196. </li>
  197. <li class="sidebar-item">
  198. <div class="sidebar-item-container">
  199. <a href="../data/gender.html" class="sidebar-item-text sidebar-link">
  200. <span class="menu-text">Book Author Gender</span></a>
  201. </div>
  202. </li>
  203. </ul>
  204. </li>
  205. <li class="sidebar-item sidebar-item-section">
  206. <div class="sidebar-item-container">
  207. <a href="../implementation/index.html" class="sidebar-item-text sidebar-link">
  208. <span class="menu-text">Implementation</span></a>
  209. <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">
  210. <i class="bi bi-chevron-right ms-2"></i>
  211. </a>
  212. </div>
  213. <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
  214. <li class="sidebar-item">
  215. <div class="sidebar-item-container">
  216. <a href="../implementation/pipeline.html" class="sidebar-item-text sidebar-link">
  217. <span class="menu-text">Pipeline Specification</span></a>
  218. </div>
  219. </li>
  220. <li class="sidebar-item">
  221. <div class="sidebar-item-container">
  222. <a href="../implementation/layout.html" class="sidebar-item-text sidebar-link">
  223. <span class="menu-text">Code Layout</span></a>
  224. </div>
  225. </li>
  226. <li class="sidebar-item">
  227. <div class="sidebar-item-container">
  228. <a href="../implementation/dataset.html" class="sidebar-item-text sidebar-link">
  229. <span class="menu-text">Design for Datasets</span></a>
  230. </div>
  231. </li>
  232. </ul>
  233. </li>
  234. <li class="sidebar-item">
  235. <div class="sidebar-item-container">
  236. <a href="../history.html" class="sidebar-item-text sidebar-link">
  237. <span class="menu-text">History</span></a>
  238. </div>
  239. </li>
  240. <li class="sidebar-item">
  241. <div class="sidebar-item-container">
  242. <a href="../papers.html" class="sidebar-item-text sidebar-link">
  243. <span class="menu-text">Papers Using BookData</span></a>
  244. </div>
  245. </li>
  246. <li class="sidebar-item sidebar-item-section">
  247. <div class="sidebar-item-container">
  248. <a href="../reports/index.html" class="sidebar-item-text sidebar-link">
  249. <span class="menu-text">Reports and Audits</span></a>
  250. <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">
  251. <i class="bi bi-chevron-right ms-2"></i>
  252. </a>
  253. </div>
  254. <ul id="quarto-sidebar-section-4" class="collapse list-unstyled sidebar-section depth1 show">
  255. <li class="sidebar-item">
  256. <div class="sidebar-item-container">
  257. <a href="../reports/LinkageStats.html" class="sidebar-item-text sidebar-link">
  258. <span class="menu-text">Book Data Linkage Statistics</span></a>
  259. </div>
  260. </li>
  261. <li class="sidebar-item">
  262. <div class="sidebar-item-container">
  263. <a href="../reports/audit-cluster-stats.html" class="sidebar-item-text sidebar-link">
  264. <span class="menu-text">ISBN Cluster Changes</span></a>
  265. </div>
  266. </li>
  267. <li class="sidebar-item">
  268. <div class="sidebar-item-container">
  269. <a href="../reports/audit-gender-changes.html" class="sidebar-item-text sidebar-link">
  270. <span class="menu-text">Cluster Gender Changes</span></a>
  271. </div>
  272. </li>
  273. </ul>
  274. </li>
  275. <li class="sidebar-item">
  276. <div class="sidebar-item-container">
  277. <a href="../apidocs/bookdata/" class="sidebar-item-text sidebar-link"><i class="bi bi-gear-wide" role="img">
  278. </i>
  279. <span class="menu-text">Rust API docs</span></a>
  280. </div>
  281. </li>
  282. <li class="sidebar-item">
  283. <div class="sidebar-item-container">
  284. <a href="https://github.com/PIReTship/bookdata-tools" class="sidebar-item-text sidebar-link"><i class="bi bi-github" role="img">
  285. </i>
  286. <span class="menu-text">GitHub repository</span></a>
  287. </div>
  288. </li>
  289. </ul>
  290. </div>
  291. </nav>
  292. <div id="quarto-sidebar-glass" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass"></div>
  293. <!-- margin-sidebar -->
  294. <div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
  295. <nav id="TOC" role="doc-toc" class="toc-active">
  296. <h2 id="toc-title">On this page</h2>
  297. <ul>
  298. <li><a href="#library-of-congress" id="toc-library-of-congress" class="nav-link active" data-scroll-target="#library-of-congress">Library of Congress</a>
  299. <ul class="collapse">
  300. <li><a href="#import-steps" id="toc-import-steps" class="nav-link" data-scroll-target="#import-steps">Import Steps</a></li>
  301. <li><a href="#sec-marc-format" id="toc-sec-marc-format" class="nav-link" data-scroll-target="#sec-marc-format">Raw MARC data</a></li>
  302. <li><a href="#extracted-book-tables" id="toc-extracted-book-tables" class="nav-link" data-scroll-target="#extracted-book-tables">Extracted Book Tables</a></li>
  303. </ul></li>
  304. </ul>
  305. <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/data/loc.qmd" 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>
  306. </div>
  307. <!-- main -->
  308. <main class="content" id="quarto-document-content">
  309. <section id="library-of-congress" class="level1">
  310. <h1>Library of Congress</h1>
  311. <p>One of our sources of book data is the Library of Congress <a href="https://www.loc.gov/cds/products/MDSConnect-books_all.html">MDSConnect Books</a> bibliography records.</p>
  312. <p>We download and import the XML versions of these files.</p>
  313. <p>Imported data lives under the <code>loc-mds</code> directory.</p>
  314. <div class="cell">
  315. <div class="cell-output-display">
  316. <div>
  317. <div>
  318. <pre class="mermaid mermaid-js">erDiagram
  319. book-ids |o--|{ book-fields : contains
  320. book-ids ||--o{ book-isbns : ""
  321. book-ids ||--o{ book-isbn-ids : ""
  322. book-ids ||--o{ book-authors : ""
  323. </pre>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. <section id="import-steps" class="level2">
  329. <h2 class="anchored" data-anchor-id="import-steps">Import Steps</h2>
  330. <p>The import is controlled by the following DVC steps:</p>
  331. <dl>
  332. <dt><code>scan-books</code></dt>
  333. <dd>
  334. Scan the book MARC data from <code>data/loc-books</code> into Parquet files (described in <a href="loc-mds-raw">book data</a>).
  335. </dd>
  336. <dt><code>book-isbn-ids</code></dt>
  337. <dd>
  338. Resolve ISBNs from LOC books into <a href="isbn-id">ISBN IDs</a>, producing <a href="../data/loc.html#file:loc-mds/book-isbn-ids.parquet"><code>loc-mds/book-isbn-ids.parquet</code></a>.
  339. </dd>
  340. <dt><code>book-authors</code></dt>
  341. <dd>
  342. Extract (and clean up) author names for LOC books.
  343. </dd>
  344. </dl>
  345. </section>
  346. <section id="sec-marc-format" class="level2">
  347. <h2 class="anchored" data-anchor-id="sec-marc-format">Raw MARC data</h2>
  348. <p>When importing MARC data, we create a “fields” file that contains the data exactly as recorded in MARC. We then process this data to produce additional files. One of these MARC field files contains the following columns (defined by <a href="../apidocs/bookdata/marc/flat_fields/struct.FieldRecord.html"><code>FieldRecord</code></a>):</p>
  349. <dl>
  350. <dt><code>rec_id</code></dt>
  351. <dd>
  352. The record identifier (generated at import)
  353. </dd>
  354. <dt><code>fld_no</code></dt>
  355. <dd>
  356. The field number. This corresponds to a single MARC field entry; rows in this table containing data from MARC subfields will share a <code>fld_no</code> with their containing field.
  357. </dd>
  358. <dt><code>tag</code></dt>
  359. <dd>
  360. The MARC tag; either a three-digit number, or -1 for the MARC leader.
  361. </dd>
  362. <dt><code>ind1</code>, <code>ind2</code></dt>
  363. <dd>
  364. MARC indicators. Their meanings are defined in the MARC specification.
  365. </dd>
  366. <dt><code>sf_code</code></dt>
  367. <dd>
  368. MARC subfield code.
  369. </dd>
  370. <dt><code>contents</code></dt>
  371. <dd>
  372. The raw textual content of the MARC field or subfield.
  373. </dd>
  374. </dl>
  375. </section>
  376. <section id="extracted-book-tables" class="level2">
  377. <h2 class="anchored" data-anchor-id="extracted-book-tables">Extracted Book Tables</h2>
  378. <p>We extract a number of tables from the LOC MDS book data. These tables only contain information about actual “books” in the collection, as opposed to other types of materials. We consider a book to be anything that has MARC record type ‘a’ or ‘t’ (language material), and is not also classified as a government record in MARC field 008.</p>
  379. <div id="file:loc-mds/book-fields.parquet" class="parquet file-block" data-file="loc-mds/book-fields.parquet" data-struct="~bookdata::marc::flat_fields::FieldRecord">
  380. <div class="file-header">
  381. <code>loc-mds/book-fields.parquet</code> (struct <a href="../apidocs/bookdata/marc/flat_fields/struct.FieldRecord.html"><code>FieldRecord</code></a>)
  382. </div>
  383. <p>The <code>book-fields</code> table contains the raw data imported from the MARC files, as <a href="marc-format">MARC fields</a>. The LOC book data follows the <a href="https://www.loc.gov/marc/bibliographic/">MARC 21 Bibliographic Data format</a>; the various tags, field codes, and indicators are defined there. This table is not terribly useful on its own, but it is the source from which the other tables are derived.</p>
  384. <details class="file-details"><summary>File details</summary>
  385. <table class="file-schema table">
  386. <caption>Schema for <code>loc-mds/book-fields.parquet</code>.</caption>
  387. <colgroup>
  388. <col style="width: 60%">
  389. <col style="width: 40%">
  390. </colgroup>
  391. <thead>
  392. <tr class="header">
  393. <th style="text-align: left;"><div>
  394. Field
  395. </div></th>
  396. <th style="text-align: right;"><div>
  397. Type
  398. </div></th>
  399. </tr>
  400. </thead>
  401. <tbody>
  402. <tr class="odd">
  403. <td style="text-align: left;"><div>
  404. rec_id
  405. </div></td>
  406. <td style="text-align: right;"><div>
  407. UInt32
  408. </div></td>
  409. </tr>
  410. <tr class="even">
  411. <td style="text-align: left;"><div>
  412. fld_no
  413. </div></td>
  414. <td style="text-align: right;"><div>
  415. UInt32
  416. </div></td>
  417. </tr>
  418. <tr class="odd">
  419. <td style="text-align: left;"><div>
  420. tag
  421. </div></td>
  422. <td style="text-align: right;"><div>
  423. Int16
  424. </div></td>
  425. </tr>
  426. <tr class="even">
  427. <td style="text-align: left;"><div>
  428. ind1
  429. </div></td>
  430. <td style="text-align: right;"><div>
  431. UInt8
  432. </div></td>
  433. </tr>
  434. <tr class="odd">
  435. <td style="text-align: left;"><div>
  436. ind2
  437. </div></td>
  438. <td style="text-align: right;"><div>
  439. UInt8
  440. </div></td>
  441. </tr>
  442. <tr class="even">
  443. <td style="text-align: left;"><div>
  444. sf_code
  445. </div></td>
  446. <td style="text-align: right;"><div>
  447. UInt8
  448. </div></td>
  449. </tr>
  450. <tr class="odd">
  451. <td style="text-align: left;"><div>
  452. contents
  453. </div></td>
  454. <td style="text-align: right;"><div>
  455. Utf8
  456. </div></td>
  457. </tr>
  458. </tbody>
  459. </table>
  460. </details>
  461. </div>
  462. <div id="file:loc-mds/book-ids.parquet" class="parquet file-block" data-file="loc-mds/book-ids.parquet" data-struct="~bookdata::marc::book_fields::BookIds">
  463. <div class="file-header">
  464. <code>loc-mds/book-ids.parquet</code> (struct <a href="../apidocs/bookdata/marc/book_fields/struct.BookIds.html"><code>BookIds</code></a>)
  465. </div>
  466. <p>This table includes code information for each book record.</p>
  467. <ul>
  468. <li>Record ID</li>
  469. <li>MARC Control Number</li>
  470. <li>Library of Congress Control Number (LCCN)</li>
  471. <li>Record status</li>
  472. <li>Record type</li>
  473. <li>Bibliographic level</li>
  474. </ul>
  475. <p>More information about the last three is in the <a href="https://www.loc.gov/marc/bibliographic/bdleader.html">leader specification</a>.</p>
  476. <details class="file-details"><summary>File details</summary>
  477. <table class="file-schema table">
  478. <caption>Schema for <code>loc-mds/book-ids.parquet</code>.</caption>
  479. <colgroup>
  480. <col style="width: 60%">
  481. <col style="width: 40%">
  482. </colgroup>
  483. <thead>
  484. <tr class="header">
  485. <th style="text-align: left;"><div>
  486. Field
  487. </div></th>
  488. <th style="text-align: right;"><div>
  489. Type
  490. </div></th>
  491. </tr>
  492. </thead>
  493. <tbody>
  494. <tr class="odd">
  495. <td style="text-align: left;"><div>
  496. rec_id
  497. </div></td>
  498. <td style="text-align: right;"><div>
  499. UInt32
  500. </div></td>
  501. </tr>
  502. <tr class="even">
  503. <td style="text-align: left;"><div>
  504. marc_cn
  505. </div></td>
  506. <td style="text-align: right;"><div>
  507. Utf8
  508. </div></td>
  509. </tr>
  510. <tr class="odd">
  511. <td style="text-align: left;"><div>
  512. lccn
  513. </div></td>
  514. <td style="text-align: right;"><div>
  515. Utf8
  516. </div></td>
  517. </tr>
  518. <tr class="even">
  519. <td style="text-align: left;"><div>
  520. status
  521. </div></td>
  522. <td style="text-align: right;"><div>
  523. UInt8
  524. </div></td>
  525. </tr>
  526. <tr class="odd">
  527. <td style="text-align: left;"><div>
  528. rec_type
  529. </div></td>
  530. <td style="text-align: right;"><div>
  531. UInt8
  532. </div></td>
  533. </tr>
  534. <tr class="even">
  535. <td style="text-align: left;"><div>
  536. bib_level
  537. </div></td>
  538. <td style="text-align: right;"><div>
  539. UInt8
  540. </div></td>
  541. </tr>
  542. </tbody>
  543. </table>
  544. </details>
  545. </div>
  546. <div id="file:loc-mds/book-isbns.parquet" class="parquet file-block" data-file="loc-mds/book-isbns.parquet" data-struct="~bookdata::marc::book_fields::ISBNrec">
  547. <div class="file-header">
  548. <code>loc-mds/book-isbns.parquet</code> (struct <a href="../apidocs/bookdata/marc/book_fields/struct.ISBNrec.html"><code>ISBNrec</code></a>)
  549. </div>
  550. <p>Textual ISBNs as extracted from LOC records. The actual ISBN strings (tag 020 subfield ‘a’) are quite messy; the parser in <a href="../apidocs/bookdata/cleaning/isbns/"><code>bookdata::cleaning::isbns</code></a> parses out ISBNs, along with additional tags or descriptors, from the ISBN strings using a number of best-effort heuristics. This table contains the results of that process.</p>
  551. <details class="file-details"><summary>File details</summary>
  552. <table class="file-schema table">
  553. <caption>Schema for <code>loc-mds/book-isbns.parquet</code>.</caption>
  554. <colgroup>
  555. <col style="width: 60%">
  556. <col style="width: 40%">
  557. </colgroup>
  558. <thead>
  559. <tr class="header">
  560. <th style="text-align: left;"><div>
  561. Field
  562. </div></th>
  563. <th style="text-align: right;"><div>
  564. Type
  565. </div></th>
  566. </tr>
  567. </thead>
  568. <tbody>
  569. <tr class="odd">
  570. <td style="text-align: left;"><div>
  571. rec_id
  572. </div></td>
  573. <td style="text-align: right;"><div>
  574. UInt32
  575. </div></td>
  576. </tr>
  577. <tr class="even">
  578. <td style="text-align: left;"><div>
  579. isbn
  580. </div></td>
  581. <td style="text-align: right;"><div>
  582. Utf8
  583. </div></td>
  584. </tr>
  585. <tr class="odd">
  586. <td style="text-align: left;"><div>
  587. tag
  588. </div></td>
  589. <td style="text-align: right;"><div>
  590. Utf8
  591. </div></td>
  592. </tr>
  593. </tbody>
  594. </table>
  595. </details>
  596. </div>
  597. <div id="file:loc-mds/book-isbn-ids.parquet" class="parquet file-block" data-file="loc-mds/book-isbn-ids.parquet">
  598. <div class="file-header">
  599. <code>loc-mds/book-isbn-ids.parquet</code>
  600. </div>
  601. <p>Map book records (LOC book <code>rec_id</code> values) to <a href="isbn-id">ISBN IDs</a>. It is produced by converting the ISBNs in <a href="../data/loc.html#file:loc-mds/book-isbns.parquet"><code>loc-mds/book-isbns.parquet</code></a> into ISBN IDs.</p>
  602. <details class="file-details"><summary>File details</summary>
  603. <table class="file-schema table">
  604. <caption>Schema for <code>loc-mds/book-isbn-ids.parquet</code>.</caption>
  605. <colgroup>
  606. <col style="width: 60%">
  607. <col style="width: 40%">
  608. </colgroup>
  609. <thead>
  610. <tr class="header">
  611. <th style="text-align: left;"><div>
  612. Field
  613. </div></th>
  614. <th style="text-align: right;"><div>
  615. Type
  616. </div></th>
  617. </tr>
  618. </thead>
  619. <tbody>
  620. <tr class="odd">
  621. <td style="text-align: left;"><div>
  622. rec_id
  623. </div></td>
  624. <td style="text-align: right;"><div>
  625. UInt32
  626. </div></td>
  627. </tr>
  628. <tr class="even">
  629. <td style="text-align: left;"><div>
  630. isbn_id
  631. </div></td>
  632. <td style="text-align: right;"><div>
  633. Int32
  634. </div></td>
  635. </tr>
  636. </tbody>
  637. </table>
  638. </details>
  639. </div>
  640. <div id="file:loc-mds/book-authors.parquet" class="parquet file-block" data-file="loc-mds/book-authors.parquet">
  641. <div class="file-header">
  642. <code>loc-mds/book-authors.parquet</code>
  643. </div>
  644. <p>Author names for book records. This only extracts the primary author name (MARC field 100 subfield ‘a’).</p>
  645. <details class="file-details"><summary>File details</summary>
  646. <table class="file-schema table">
  647. <caption>Schema for <code>loc-mds/book-authors.parquet</code>.</caption>
  648. <colgroup>
  649. <col style="width: 60%">
  650. <col style="width: 40%">
  651. </colgroup>
  652. <thead>
  653. <tr class="header">
  654. <th style="text-align: left;"><div>
  655. Field
  656. </div></th>
  657. <th style="text-align: right;"><div>
  658. Type
  659. </div></th>
  660. </tr>
  661. </thead>
  662. <tbody>
  663. <tr class="odd">
  664. <td style="text-align: left;"><div>
  665. rec_id
  666. </div></td>
  667. <td style="text-align: right;"><div>
  668. UInt32
  669. </div></td>
  670. </tr>
  671. <tr class="even">
  672. <td style="text-align: left;"><div>
  673. author_name
  674. </div></td>
  675. <td style="text-align: right;"><div>
  676. Utf8
  677. </div></td>
  678. </tr>
  679. </tbody>
  680. </table>
  681. </details>
  682. </div>
  683. </section>
  684. </section>
  685. </main> <!-- /main -->
  686. <script id="quarto-html-after-body" type="application/javascript">
  687. window.document.addEventListener("DOMContentLoaded", function (event) {
  688. const toggleBodyColorMode = (bsSheetEl) => {
  689. const mode = bsSheetEl.getAttribute("data-mode");
  690. const bodyEl = window.document.querySelector("body");
  691. if (mode === "dark") {
  692. bodyEl.classList.add("quarto-dark");
  693. bodyEl.classList.remove("quarto-light");
  694. } else {
  695. bodyEl.classList.add("quarto-light");
  696. bodyEl.classList.remove("quarto-dark");
  697. }
  698. }
  699. const toggleBodyColorPrimary = () => {
  700. const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
  701. if (bsSheetEl) {
  702. toggleBodyColorMode(bsSheetEl);
  703. }
  704. }
  705. toggleBodyColorPrimary();
  706. const disableStylesheet = (stylesheets) => {
  707. for (let i=0; i < stylesheets.length; i++) {
  708. const stylesheet = stylesheets[i];
  709. stylesheet.rel = 'prefetch';
  710. }
  711. }
  712. const enableStylesheet = (stylesheets) => {
  713. for (let i=0; i < stylesheets.length; i++) {
  714. const stylesheet = stylesheets[i];
  715. stylesheet.rel = 'stylesheet';
  716. }
  717. }
  718. const manageTransitions = (selector, allowTransitions) => {
  719. const els = window.document.querySelectorAll(selector);
  720. for (let i=0; i < els.length; i++) {
  721. const el = els[i];
  722. if (allowTransitions) {
  723. el.classList.remove('notransition');
  724. } else {
  725. el.classList.add('notransition');
  726. }
  727. }
  728. }
  729. const toggleColorMode = (alternate) => {
  730. // Switch the stylesheets
  731. const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
  732. manageTransitions('#quarto-margin-sidebar .nav-link', false);
  733. if (alternate) {
  734. enableStylesheet(alternateStylesheets);
  735. for (const sheetNode of alternateStylesheets) {
  736. if (sheetNode.id === "quarto-bootstrap") {
  737. toggleBodyColorMode(sheetNode);
  738. }
  739. }
  740. } else {
  741. disableStylesheet(alternateStylesheets);
  742. toggleBodyColorPrimary();
  743. }
  744. manageTransitions('#quarto-margin-sidebar .nav-link', true);
  745. // Switch the toggles
  746. const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
  747. for (let i=0; i < toggles.length; i++) {
  748. const toggle = toggles[i];
  749. if (toggle) {
  750. if (alternate) {
  751. toggle.classList.add("alternate");
  752. } else {
  753. toggle.classList.remove("alternate");
  754. }
  755. }
  756. }
  757. // Hack to workaround the fact that safari doesn't
  758. // properly recolor the scrollbar when toggling (#1455)
  759. if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
  760. manageTransitions("body", false);
  761. window.scrollTo(0, 1);
  762. setTimeout(() => {
  763. window.scrollTo(0, 0);
  764. manageTransitions("body", true);
  765. }, 40);
  766. }
  767. }
  768. const isFileUrl = () => {
  769. return window.location.protocol === 'file:';
  770. }
  771. const hasAlternateSentinel = () => {
  772. let styleSentinel = getColorSchemeSentinel();
  773. if (styleSentinel !== null) {
  774. return styleSentinel === "alternate";
  775. } else {
  776. return false;
  777. }
  778. }
  779. const setStyleSentinel = (alternate) => {
  780. const value = alternate ? "alternate" : "default";
  781. if (!isFileUrl()) {
  782. window.localStorage.setItem("quarto-color-scheme", value);
  783. } else {
  784. localAlternateSentinel = value;
  785. }
  786. }
  787. const getColorSchemeSentinel = () => {
  788. if (!isFileUrl()) {
  789. const storageValue = window.localStorage.getItem("quarto-color-scheme");
  790. return storageValue != null ? storageValue : localAlternateSentinel;
  791. } else {
  792. return localAlternateSentinel;
  793. }
  794. }
  795. let localAlternateSentinel = 'default';
  796. // Dark / light mode switch
  797. window.quartoToggleColorScheme = () => {
  798. // Read the current dark / light value
  799. let toAlternate = !hasAlternateSentinel();
  800. toggleColorMode(toAlternate);
  801. setStyleSentinel(toAlternate);
  802. };
  803. // Ensure there is a toggle, if there isn't float one in the top right
  804. if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
  805. const a = window.document.createElement('a');
  806. a.classList.add('top-right');
  807. a.classList.add('quarto-color-scheme-toggle');
  808. a.href = "";
  809. a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; };
  810. const i = window.document.createElement("i");
  811. i.classList.add('bi');
  812. a.appendChild(i);
  813. window.document.body.appendChild(a);
  814. }
  815. // Switch to dark mode if need be
  816. if (hasAlternateSentinel()) {
  817. toggleColorMode(true);
  818. } else {
  819. toggleColorMode(false);
  820. }
  821. const icon = "";
  822. const anchorJS = new window.AnchorJS();
  823. anchorJS.options = {
  824. placement: 'right',
  825. icon: icon
  826. };
  827. anchorJS.add('.anchored');
  828. const isCodeAnnotation = (el) => {
  829. for (const clz of el.classList) {
  830. if (clz.startsWith('code-annotation-')) {
  831. return true;
  832. }
  833. }
  834. return false;
  835. }
  836. const clipboard = new window.ClipboardJS('.code-copy-button', {
  837. text: function(trigger) {
  838. const codeEl = trigger.previousElementSibling.cloneNode(true);
  839. for (const childEl of codeEl.children) {
  840. if (isCodeAnnotation(childEl)) {
  841. childEl.remove();
  842. }
  843. }
  844. return codeEl.innerText;
  845. }
  846. });
  847. clipboard.on('success', function(e) {
  848. // button target
  849. const button = e.trigger;
  850. // don't keep focus
  851. button.blur();
  852. // flash "checked"
  853. button.classList.add('code-copy-button-checked');
  854. var currentTitle = button.getAttribute("title");
  855. button.setAttribute("title", "Copied!");
  856. let tooltip;
  857. if (window.bootstrap) {
  858. button.setAttribute("data-bs-toggle", "tooltip");
  859. button.setAttribute("data-bs-placement", "left");
  860. button.setAttribute("data-bs-title", "Copied!");
  861. tooltip = new bootstrap.Tooltip(button,
  862. { trigger: "manual",
  863. customClass: "code-copy-button-tooltip",
  864. offset: [0, -8]});
  865. tooltip.show();
  866. }
  867. setTimeout(function() {
  868. if (tooltip) {
  869. tooltip.hide();
  870. button.removeAttribute("data-bs-title");
  871. button.removeAttribute("data-bs-toggle");
  872. button.removeAttribute("data-bs-placement");
  873. }
  874. button.setAttribute("title", currentTitle);
  875. button.classList.remove('code-copy-button-checked');
  876. }, 1000);
  877. // clear code selection
  878. e.clearSelection();
  879. });
  880. function tippyHover(el, contentFn) {
  881. const config = {
  882. allowHTML: true,
  883. content: contentFn,
  884. maxWidth: 500,
  885. delay: 100,
  886. arrow: false,
  887. appendTo: function(el) {
  888. return el.parentElement;
  889. },
  890. interactive: true,
  891. interactiveBorder: 10,
  892. theme: 'quarto',
  893. placement: 'bottom-start'
  894. };
  895. window.tippy(el, config);
  896. }
  897. const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
  898. for (var i=0; i<noterefs.length; i++) {
  899. const ref = noterefs[i];
  900. tippyHover(ref, function() {
  901. // use id or data attribute instead here
  902. let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
  903. try { href = new URL(href).hash; } catch {}
  904. const id = href.replace(/^#\/?/, "");
  905. const note = window.document.getElementById(id);
  906. return note.innerHTML;
  907. });
  908. }
  909. let selectedAnnoteEl;
  910. const selectorForAnnotation = ( cell, annotation) => {
  911. let cellAttr = 'data-code-cell="' + cell + '"';
  912. let lineAttr = 'data-code-annotation="' + annotation + '"';
  913. const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
  914. return selector;
  915. }
  916. const selectCodeLines = (annoteEl) => {
  917. const doc = window.document;
  918. const targetCell = annoteEl.getAttribute("data-target-cell");
  919. const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
  920. const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
  921. const lines = annoteSpan.getAttribute("data-code-lines").split(",");
  922. const lineIds = lines.map((line) => {
  923. return targetCell + "-" + line;
  924. })
  925. let top = null;
  926. let height = null;
  927. let parent = null;
  928. if (lineIds.length > 0) {
  929. //compute the position of the single el (top and bottom and make a div)
  930. const el = window.document.getElementById(lineIds[0]);
  931. top = el.offsetTop;
  932. height = el.offsetHeight;
  933. parent = el.parentElement.parentElement;
  934. if (lineIds.length > 1) {
  935. const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
  936. const bottom = lastEl.offsetTop + lastEl.offsetHeight;
  937. height = bottom - top;
  938. }
  939. if (top !== null && height !== null && parent !== null) {
  940. // cook up a div (if necessary) and position it
  941. let div = window.document.getElementById("code-annotation-line-highlight");
  942. if (div === null) {
  943. div = window.document.createElement("div");
  944. div.setAttribute("id", "code-annotation-line-highlight");
  945. div.style.position = 'absolute';
  946. parent.appendChild(div);
  947. }
  948. div.style.top = top - 2 + "px";
  949. div.style.height = height + 4 + "px";
  950. let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
  951. if (gutterDiv === null) {
  952. gutterDiv = window.document.createElement("div");
  953. gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
  954. gutterDiv.style.position = 'absolute';
  955. const codeCell = window.document.getElementById(targetCell);
  956. const gutter = codeCell.querySelector('.code-annotation-gutter');
  957. gutter.appendChild(gutterDiv);
  958. }
  959. gutterDiv.style.top = top - 2 + "px";
  960. gutterDiv.style.height = height + 4 + "px";
  961. }
  962. selectedAnnoteEl = annoteEl;
  963. }
  964. };
  965. const unselectCodeLines = () => {
  966. const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
  967. elementsIds.forEach((elId) => {
  968. const div = window.document.getElementById(elId);
  969. if (div) {
  970. div.remove();
  971. }
  972. });
  973. selectedAnnoteEl = undefined;
  974. };
  975. // Attach click handler to the DT
  976. const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
  977. for (const annoteDlNode of annoteDls) {
  978. annoteDlNode.addEventListener('click', (event) => {
  979. const clickedEl = event.target;
  980. if (clickedEl !== selectedAnnoteEl) {
  981. unselectCodeLines();
  982. const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
  983. if (activeEl) {
  984. activeEl.classList.remove('code-annotation-active');
  985. }
  986. selectCodeLines(clickedEl);
  987. clickedEl.classList.add('code-annotation-active');
  988. } else {
  989. // Unselect the line
  990. unselectCodeLines();
  991. clickedEl.classList.remove('code-annotation-active');
  992. }
  993. });
  994. }
  995. const findCites = (el) => {
  996. const parentEl = el.parentElement;
  997. if (parentEl) {
  998. const cites = parentEl.dataset.cites;
  999. if (cites) {
  1000. return {
  1001. el,
  1002. cites: cites.split(' ')
  1003. };
  1004. } else {
  1005. return findCites(el.parentElement)
  1006. }
  1007. } else {
  1008. return undefined;
  1009. }
  1010. };
  1011. var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
  1012. for (var i=0; i<bibliorefs.length; i++) {
  1013. const ref = bibliorefs[i];
  1014. const citeInfo = findCites(ref);
  1015. if (citeInfo) {
  1016. tippyHover(citeInfo.el, function() {
  1017. var popup = window.document.createElement('div');
  1018. citeInfo.cites.forEach(function(cite) {
  1019. var citeDiv = window.document.createElement('div');
  1020. citeDiv.classList.add('hanging-indent');
  1021. citeDiv.classList.add('csl-entry');
  1022. var biblioDiv = window.document.getElementById('ref-' + cite);
  1023. if (biblioDiv) {
  1024. citeDiv.innerHTML = biblioDiv.innerHTML;
  1025. }
  1026. popup.appendChild(citeDiv);
  1027. });
  1028. return popup.innerHTML;
  1029. });
  1030. }
  1031. }
  1032. });
  1033. </script>
  1034. </div> <!-- /content -->
  1035. <script data-goatcounter="https://piret-bookdata.goatcounter.com/count" async="" src="//gc.zgo.at/count.js"></script>
  1036. </body></html>
Tip!

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

Comments

Loading...