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

ids.html 31 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
  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 – ids</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="../data/index.html">Data Organization</a></li><li class="breadcrumb-item"><a href="../data/ids.html">Common Identifiers</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">
  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 active">
  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="#common-identifiers" id="toc-common-identifiers" class="nav-link active" data-scroll-target="#common-identifiers">Common Identifiers</a>
  296. <ul class="collapse">
  297. <li><a href="#sec-isbn-ids" id="toc-sec-isbn-ids" class="nav-link" data-scroll-target="#sec-isbn-ids">ISBNs</a></li>
  298. <li><a href="#sec-book-codes" id="toc-sec-book-codes" class="nav-link" data-scroll-target="#sec-book-codes">Book Codes</a></li>
  299. </ul></li>
  300. </ul>
  301. <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/ids.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>
  302. </div>
  303. <!-- main -->
  304. <main class="content" id="quarto-document-content">
  305. <section id="common-identifiers" class="level1">
  306. <h1>Common Identifiers</h1>
  307. <p>There are two key identifiers that are used across data sets.</p>
  308. <section id="sec-isbn-ids" class="level2">
  309. <h2 class="anchored" data-anchor-id="sec-isbn-ids">ISBNs</h2>
  310. <p>We use ISBNs for a lot of data linking. In order to speed up ISBN-based operations, we map textual ISBNs to numeric ’ISBN IDs`.</p>
  311. <div id="file:book-links/all-isbns.parquet" class="parquet file-block" data-file="book-links/all-isbns.parquet">
  312. <div class="file-header">
  313. <code>book-links/all-isbns.parquet</code>
  314. </div>
  315. <p>This file manages ISBN IDs and their mappings, along with statistics about their usage in other records.</p>
  316. <table class="table">
  317. <thead>
  318. <tr class="header">
  319. <th>Column</th>
  320. <th>Purpose</th>
  321. </tr>
  322. </thead>
  323. <tbody>
  324. <tr class="odd">
  325. <td>isbn_id</td>
  326. <td>ISBN identifier</td>
  327. </tr>
  328. <tr class="even">
  329. <td>isbn</td>
  330. <td>Textual ISBNs</td>
  331. </tr>
  332. </tbody>
  333. </table>
  334. <p>Each type of ISBN (ISBN-10, ISBN-13) is considered a distinct ISBN. We also consider other ISBN-like things, particularly ASINs, to be ISBNs.</p>
  335. <p>Additional fields in this table contain the number of records from different sources that reference this ISBN.</p>
  336. <details class="file-details"><summary>File details</summary>
  337. <table class="file-schema table">
  338. <caption>Schema for <code>book-links/all-isbns.parquet</code>.</caption>
  339. <colgroup>
  340. <col style="width: 60%">
  341. <col style="width: 40%">
  342. </colgroup>
  343. <thead>
  344. <tr class="header">
  345. <th style="text-align: left;"><div>
  346. Field
  347. </div></th>
  348. <th style="text-align: right;"><div>
  349. Type
  350. </div></th>
  351. </tr>
  352. </thead>
  353. <tbody>
  354. <tr class="odd">
  355. <td style="text-align: left;"><div>
  356. isbn_id
  357. </div></td>
  358. <td style="text-align: right;"><div>
  359. Int32
  360. </div></td>
  361. </tr>
  362. <tr class="even">
  363. <td style="text-align: left;"><div>
  364. isbn
  365. </div></td>
  366. <td style="text-align: right;"><div>
  367. Utf8
  368. </div></td>
  369. </tr>
  370. <tr class="odd">
  371. <td style="text-align: left;"><div>
  372. LOC
  373. </div></td>
  374. <td style="text-align: right;"><div>
  375. UInt32
  376. </div></td>
  377. </tr>
  378. <tr class="even">
  379. <td style="text-align: left;"><div>
  380. OL
  381. </div></td>
  382. <td style="text-align: right;"><div>
  383. UInt32
  384. </div></td>
  385. </tr>
  386. <tr class="odd">
  387. <td style="text-align: left;"><div>
  388. GR
  389. </div></td>
  390. <td style="text-align: right;"><div>
  391. Int64
  392. </div></td>
  393. </tr>
  394. <tr class="even">
  395. <td style="text-align: left;"><div>
  396. AZ14
  397. </div></td>
  398. <td style="text-align: right;"><div>
  399. UInt32
  400. </div></td>
  401. </tr>
  402. <tr class="odd">
  403. <td style="text-align: left;"><div>
  404. AZ18
  405. </div></td>
  406. <td style="text-align: right;"><div>
  407. UInt32
  408. </div></td>
  409. </tr>
  410. </tbody>
  411. </table>
  412. </details>
  413. </div>
  414. <p>Many other tables that work with ISBNs use ISBN IDs.</p>
  415. </section>
  416. <section id="sec-book-codes" class="level2">
  417. <h2 class="anchored" data-anchor-id="sec-book-codes">Book Codes</h2>
  418. <p>We also use <em>book codes</em>, common identifiers for integrated ‘books’ across data sets. These are derived from identifiers in the various data sets. Each book code source is assigned to a different 100M number band (a ‘numspace’) so we can, if needed, derive the source from a book code.</p>
  419. <table class="table">
  420. <thead>
  421. <tr class="header">
  422. <th>Source</th>
  423. <th>Namespace Object</th>
  424. <th>Numspace</th>
  425. </tr>
  426. </thead>
  427. <tbody>
  428. <tr class="odd">
  429. <td>OL Work</td>
  430. <td><code>NS_WORK</code></td>
  431. <td>100M</td>
  432. </tr>
  433. <tr class="even">
  434. <td>OL Edition</td>
  435. <td><code>NS_EDITION</code></td>
  436. <td>200M</td>
  437. </tr>
  438. <tr class="odd">
  439. <td>LOC Record</td>
  440. <td><code>NS_LOC_REC</code></td>
  441. <td>300M</td>
  442. </tr>
  443. <tr class="even">
  444. <td>GR Work</td>
  445. <td><code>NS_GR_WORK</code></td>
  446. <td>400M</td>
  447. </tr>
  448. <tr class="odd">
  449. <td>GR Book</td>
  450. <td><code>NS_GR_BOOK</code></td>
  451. <td>500M</td>
  452. </tr>
  453. <tr class="even">
  454. <td>LOC Work</td>
  455. <td><code>NS_LOC_WORK</code></td>
  456. <td>600M</td>
  457. </tr>
  458. <tr class="odd">
  459. <td>LOC Instance</td>
  460. <td><code>NS_LOC_INSTANCE</code></td>
  461. <td>700M</td>
  462. </tr>
  463. <tr class="even">
  464. <td>ISBN</td>
  465. <td><code>NS_ISBN</code></td>
  466. <td>900M</td>
  467. </tr>
  468. </tbody>
  469. </table>
  470. <p>The <a href="../apidocs/bookdata/ids/codes/"><code>bookdata::ids::codes</code></a> module contains the Rust API for working with these codes (including each of the namespace objects) and converting identifiers into and out of them.</p>
  471. <p>The LOC Work and Instance sources are not currently used; they are intended for future use when we are able to import BIBFRAME data from the Library of Congress.</p>
  472. </section>
  473. </section>
  474. </main> <!-- /main -->
  475. <script id="quarto-html-after-body" type="application/javascript">
  476. window.document.addEventListener("DOMContentLoaded", function (event) {
  477. const toggleBodyColorMode = (bsSheetEl) => {
  478. const mode = bsSheetEl.getAttribute("data-mode");
  479. const bodyEl = window.document.querySelector("body");
  480. if (mode === "dark") {
  481. bodyEl.classList.add("quarto-dark");
  482. bodyEl.classList.remove("quarto-light");
  483. } else {
  484. bodyEl.classList.add("quarto-light");
  485. bodyEl.classList.remove("quarto-dark");
  486. }
  487. }
  488. const toggleBodyColorPrimary = () => {
  489. const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
  490. if (bsSheetEl) {
  491. toggleBodyColorMode(bsSheetEl);
  492. }
  493. }
  494. toggleBodyColorPrimary();
  495. const disableStylesheet = (stylesheets) => {
  496. for (let i=0; i < stylesheets.length; i++) {
  497. const stylesheet = stylesheets[i];
  498. stylesheet.rel = 'prefetch';
  499. }
  500. }
  501. const enableStylesheet = (stylesheets) => {
  502. for (let i=0; i < stylesheets.length; i++) {
  503. const stylesheet = stylesheets[i];
  504. stylesheet.rel = 'stylesheet';
  505. }
  506. }
  507. const manageTransitions = (selector, allowTransitions) => {
  508. const els = window.document.querySelectorAll(selector);
  509. for (let i=0; i < els.length; i++) {
  510. const el = els[i];
  511. if (allowTransitions) {
  512. el.classList.remove('notransition');
  513. } else {
  514. el.classList.add('notransition');
  515. }
  516. }
  517. }
  518. const toggleColorMode = (alternate) => {
  519. // Switch the stylesheets
  520. const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
  521. manageTransitions('#quarto-margin-sidebar .nav-link', false);
  522. if (alternate) {
  523. enableStylesheet(alternateStylesheets);
  524. for (const sheetNode of alternateStylesheets) {
  525. if (sheetNode.id === "quarto-bootstrap") {
  526. toggleBodyColorMode(sheetNode);
  527. }
  528. }
  529. } else {
  530. disableStylesheet(alternateStylesheets);
  531. toggleBodyColorPrimary();
  532. }
  533. manageTransitions('#quarto-margin-sidebar .nav-link', true);
  534. // Switch the toggles
  535. const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
  536. for (let i=0; i < toggles.length; i++) {
  537. const toggle = toggles[i];
  538. if (toggle) {
  539. if (alternate) {
  540. toggle.classList.add("alternate");
  541. } else {
  542. toggle.classList.remove("alternate");
  543. }
  544. }
  545. }
  546. // Hack to workaround the fact that safari doesn't
  547. // properly recolor the scrollbar when toggling (#1455)
  548. if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
  549. manageTransitions("body", false);
  550. window.scrollTo(0, 1);
  551. setTimeout(() => {
  552. window.scrollTo(0, 0);
  553. manageTransitions("body", true);
  554. }, 40);
  555. }
  556. }
  557. const isFileUrl = () => {
  558. return window.location.protocol === 'file:';
  559. }
  560. const hasAlternateSentinel = () => {
  561. let styleSentinel = getColorSchemeSentinel();
  562. if (styleSentinel !== null) {
  563. return styleSentinel === "alternate";
  564. } else {
  565. return false;
  566. }
  567. }
  568. const setStyleSentinel = (alternate) => {
  569. const value = alternate ? "alternate" : "default";
  570. if (!isFileUrl()) {
  571. window.localStorage.setItem("quarto-color-scheme", value);
  572. } else {
  573. localAlternateSentinel = value;
  574. }
  575. }
  576. const getColorSchemeSentinel = () => {
  577. if (!isFileUrl()) {
  578. const storageValue = window.localStorage.getItem("quarto-color-scheme");
  579. return storageValue != null ? storageValue : localAlternateSentinel;
  580. } else {
  581. return localAlternateSentinel;
  582. }
  583. }
  584. let localAlternateSentinel = 'default';
  585. // Dark / light mode switch
  586. window.quartoToggleColorScheme = () => {
  587. // Read the current dark / light value
  588. let toAlternate = !hasAlternateSentinel();
  589. toggleColorMode(toAlternate);
  590. setStyleSentinel(toAlternate);
  591. };
  592. // Ensure there is a toggle, if there isn't float one in the top right
  593. if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
  594. const a = window.document.createElement('a');
  595. a.classList.add('top-right');
  596. a.classList.add('quarto-color-scheme-toggle');
  597. a.href = "";
  598. a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; };
  599. const i = window.document.createElement("i");
  600. i.classList.add('bi');
  601. a.appendChild(i);
  602. window.document.body.appendChild(a);
  603. }
  604. // Switch to dark mode if need be
  605. if (hasAlternateSentinel()) {
  606. toggleColorMode(true);
  607. } else {
  608. toggleColorMode(false);
  609. }
  610. const icon = "";
  611. const anchorJS = new window.AnchorJS();
  612. anchorJS.options = {
  613. placement: 'right',
  614. icon: icon
  615. };
  616. anchorJS.add('.anchored');
  617. const isCodeAnnotation = (el) => {
  618. for (const clz of el.classList) {
  619. if (clz.startsWith('code-annotation-')) {
  620. return true;
  621. }
  622. }
  623. return false;
  624. }
  625. const clipboard = new window.ClipboardJS('.code-copy-button', {
  626. text: function(trigger) {
  627. const codeEl = trigger.previousElementSibling.cloneNode(true);
  628. for (const childEl of codeEl.children) {
  629. if (isCodeAnnotation(childEl)) {
  630. childEl.remove();
  631. }
  632. }
  633. return codeEl.innerText;
  634. }
  635. });
  636. clipboard.on('success', function(e) {
  637. // button target
  638. const button = e.trigger;
  639. // don't keep focus
  640. button.blur();
  641. // flash "checked"
  642. button.classList.add('code-copy-button-checked');
  643. var currentTitle = button.getAttribute("title");
  644. button.setAttribute("title", "Copied!");
  645. let tooltip;
  646. if (window.bootstrap) {
  647. button.setAttribute("data-bs-toggle", "tooltip");
  648. button.setAttribute("data-bs-placement", "left");
  649. button.setAttribute("data-bs-title", "Copied!");
  650. tooltip = new bootstrap.Tooltip(button,
  651. { trigger: "manual",
  652. customClass: "code-copy-button-tooltip",
  653. offset: [0, -8]});
  654. tooltip.show();
  655. }
  656. setTimeout(function() {
  657. if (tooltip) {
  658. tooltip.hide();
  659. button.removeAttribute("data-bs-title");
  660. button.removeAttribute("data-bs-toggle");
  661. button.removeAttribute("data-bs-placement");
  662. }
  663. button.setAttribute("title", currentTitle);
  664. button.classList.remove('code-copy-button-checked');
  665. }, 1000);
  666. // clear code selection
  667. e.clearSelection();
  668. });
  669. function tippyHover(el, contentFn) {
  670. const config = {
  671. allowHTML: true,
  672. content: contentFn,
  673. maxWidth: 500,
  674. delay: 100,
  675. arrow: false,
  676. appendTo: function(el) {
  677. return el.parentElement;
  678. },
  679. interactive: true,
  680. interactiveBorder: 10,
  681. theme: 'quarto',
  682. placement: 'bottom-start'
  683. };
  684. window.tippy(el, config);
  685. }
  686. const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
  687. for (var i=0; i<noterefs.length; i++) {
  688. const ref = noterefs[i];
  689. tippyHover(ref, function() {
  690. // use id or data attribute instead here
  691. let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
  692. try { href = new URL(href).hash; } catch {}
  693. const id = href.replace(/^#\/?/, "");
  694. const note = window.document.getElementById(id);
  695. return note.innerHTML;
  696. });
  697. }
  698. let selectedAnnoteEl;
  699. const selectorForAnnotation = ( cell, annotation) => {
  700. let cellAttr = 'data-code-cell="' + cell + '"';
  701. let lineAttr = 'data-code-annotation="' + annotation + '"';
  702. const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
  703. return selector;
  704. }
  705. const selectCodeLines = (annoteEl) => {
  706. const doc = window.document;
  707. const targetCell = annoteEl.getAttribute("data-target-cell");
  708. const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
  709. const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
  710. const lines = annoteSpan.getAttribute("data-code-lines").split(",");
  711. const lineIds = lines.map((line) => {
  712. return targetCell + "-" + line;
  713. })
  714. let top = null;
  715. let height = null;
  716. let parent = null;
  717. if (lineIds.length > 0) {
  718. //compute the position of the single el (top and bottom and make a div)
  719. const el = window.document.getElementById(lineIds[0]);
  720. top = el.offsetTop;
  721. height = el.offsetHeight;
  722. parent = el.parentElement.parentElement;
  723. if (lineIds.length > 1) {
  724. const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
  725. const bottom = lastEl.offsetTop + lastEl.offsetHeight;
  726. height = bottom - top;
  727. }
  728. if (top !== null && height !== null && parent !== null) {
  729. // cook up a div (if necessary) and position it
  730. let div = window.document.getElementById("code-annotation-line-highlight");
  731. if (div === null) {
  732. div = window.document.createElement("div");
  733. div.setAttribute("id", "code-annotation-line-highlight");
  734. div.style.position = 'absolute';
  735. parent.appendChild(div);
  736. }
  737. div.style.top = top - 2 + "px";
  738. div.style.height = height + 4 + "px";
  739. let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
  740. if (gutterDiv === null) {
  741. gutterDiv = window.document.createElement("div");
  742. gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
  743. gutterDiv.style.position = 'absolute';
  744. const codeCell = window.document.getElementById(targetCell);
  745. const gutter = codeCell.querySelector('.code-annotation-gutter');
  746. gutter.appendChild(gutterDiv);
  747. }
  748. gutterDiv.style.top = top - 2 + "px";
  749. gutterDiv.style.height = height + 4 + "px";
  750. }
  751. selectedAnnoteEl = annoteEl;
  752. }
  753. };
  754. const unselectCodeLines = () => {
  755. const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
  756. elementsIds.forEach((elId) => {
  757. const div = window.document.getElementById(elId);
  758. if (div) {
  759. div.remove();
  760. }
  761. });
  762. selectedAnnoteEl = undefined;
  763. };
  764. // Attach click handler to the DT
  765. const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
  766. for (const annoteDlNode of annoteDls) {
  767. annoteDlNode.addEventListener('click', (event) => {
  768. const clickedEl = event.target;
  769. if (clickedEl !== selectedAnnoteEl) {
  770. unselectCodeLines();
  771. const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
  772. if (activeEl) {
  773. activeEl.classList.remove('code-annotation-active');
  774. }
  775. selectCodeLines(clickedEl);
  776. clickedEl.classList.add('code-annotation-active');
  777. } else {
  778. // Unselect the line
  779. unselectCodeLines();
  780. clickedEl.classList.remove('code-annotation-active');
  781. }
  782. });
  783. }
  784. const findCites = (el) => {
  785. const parentEl = el.parentElement;
  786. if (parentEl) {
  787. const cites = parentEl.dataset.cites;
  788. if (cites) {
  789. return {
  790. el,
  791. cites: cites.split(' ')
  792. };
  793. } else {
  794. return findCites(el.parentElement)
  795. }
  796. } else {
  797. return undefined;
  798. }
  799. };
  800. var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
  801. for (var i=0; i<bibliorefs.length; i++) {
  802. const ref = bibliorefs[i];
  803. const citeInfo = findCites(ref);
  804. if (citeInfo) {
  805. tippyHover(citeInfo.el, function() {
  806. var popup = window.document.createElement('div');
  807. citeInfo.cites.forEach(function(cite) {
  808. var citeDiv = window.document.createElement('div');
  809. citeDiv.classList.add('hanging-indent');
  810. citeDiv.classList.add('csl-entry');
  811. var biblioDiv = window.document.getElementById('ref-' + cite);
  812. if (biblioDiv) {
  813. citeDiv.innerHTML = biblioDiv.innerHTML;
  814. }
  815. popup.appendChild(citeDiv);
  816. });
  817. return popup.innerHTML;
  818. });
  819. }
  820. }
  821. });
  822. </script>
  823. </div> <!-- /content -->
  824. <script data-goatcounter="https://piret-bookdata.goatcounter.com/count" async="" src="//gc.zgo.at/count.js"></script>
  825. </body></html>
Tip!

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

Comments

Loading...