-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrcrossref.html
More file actions
1849 lines (1735 loc) · 337 KB
/
rcrossref.html
File metadata and controls
1849 lines (1735 loc) · 337 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="author" content="Clarke Iakovakis" />
<title>rcrossref</title>
<script src="site_libs/header-attrs-2.9/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/spacelab.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<link href="site_libs/pagedtable-1.1/css/pagedtable.css" rel="stylesheet" />
<script src="site_libs/pagedtable-1.1/js/pagedtable.js"></script>
<script src="site_libs/kePrint-0.0.1/kePrint.js"></script>
<link href="site_libs/lightable-0.0.1/lightable.css" rel="stylesheet" />
<script src="site_libs/htmlwidgets-1.5.3/htmlwidgets.js"></script>
<link href="site_libs/jsoneditor-5.25.6/jsoneditor.min.css" rel="stylesheet" />
<script src="site_libs/jsoneditor-5.25.6/jsoneditor.min.js"></script>
<script src="site_libs/jsonedit-binding-3.0.0/jsonedit.js"></script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">code{white-space: pre;}</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<link rel="stylesheet" href="styles.css" type="text/css" />
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
@media print {
.toc-content {
/* see https://github.com/w3c/csswg-drafts/issues/4434 */
float: right;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
.tocify-subheader {
display: inline;
}
.tocify-subheader .tocify-item {
font-size: 0.95em;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Clarke Iakovakis</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
FSCI 2021 W25 Session
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="fsci_syllabus.html">Course syllabus</a>
</li>
<li>
<a href="using_jupyter_notebooks.html">Jupyter Notebooks and Binder</a>
</li>
<li>
<a href="IntroductionToR.html">Introduction to R</a>
</li>
<li>
<a href="RBasics.html">R Basics</a>
</li>
<li>
<a href="DataExploration.html">Data Exploration</a>
</li>
<li>
<a href="jennybc_lists_lesson.html">Exploring Data in Lists</a>
</li>
<li>
<a href="rcrossref.html">rcrossref</a>
</li>
<li>
<a href="rorcid.html">rorcid</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<div id="header">
<h1 class="title toc-ignore">rcrossref</h1>
<h4 class="author">Clarke Iakovakis</h4>
</div>
<div id="licensing" class="section level1">
<h1>Licensing</h1>
<p>This walkthrough is distributed under a <a href="Creative%20Commons%20Attribution%204.0%20International%20(CC%20BY%204.0)%20License">https://creativecommons.org/licenses/by/4.0/</a>.</p>
</div>
<div id="binder-link-to-this-notebook" class="section level1">
<h1>Binder link to this notebook:</h1>
<p><a href="https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=rcrossref.ipynb"><img src="https://mybinder.org/badge_logo.svg" alt="Binder" /></a></p>
<p><a href="https://mybinder.org/badge_logo.svg)%5D(https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=rcrossref.ipynb" class="uri">https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=rcrossref.ipynb</a></p>
<div id="setting-up-rcrossref" class="section level2">
<h2>Setting up <code>rcrossref</code></h2>
<p>First install and load <code>rcrossref</code> in R. Also install <code>usethis</code> in order to send your email to Crossref, as well as <code>tidyverse</code>, which is a package that contains many packages we’ll use throughout.</p>
<pre class="r"><code>install.packages("rcrossref")
install.packages("usethis")
install.packages("tidyverse")
install.packages("listviewer")
library(rcrossref)
library(usethis)
library(tidyverse)
library(listviewer)</code></pre>
<p>As described in the documentation, the Crossref team encourages requests with appropriate contact information, and will forward you to a dedicated API cluster for improved performance when you share your email with them. Learn more at <a href="https://github.com/CrossRef/rest-api-doc#good-manners--more-reliable-service" class="uri">https://github.com/CrossRef/rest-api-doc#good-manners--more-reliable-service</a>. To do so, first open your R environment using the <code>edit_r_environ()</code> function from the <code>usethis</code> package.</p>
<pre class="r"><code>usethis::edit_r_environ()</code></pre>
<p>A new window will open in R Studio. Type <code>crossref_email=name@example.com</code>, replacing the example with your own email address. Then press enter to create a new line, and leave it blank. Press Ctrl/Cmd + S to save the API key to your R environment and close the window. Your email address will now be shared with Crossref whenever you send them an API request.</p>
</div>
</div>
<div id="crossref-and-rcrossref" class="section level1">
<h1>Crossref and <code>rcrossref</code></h1>
<div id="crossref" class="section level2">
<h2>Crossref</h2>
<p>Crossref is a a not-for-profit membership organization dedicated to interlinking scholarly metadata, including journals, books, conference proceedings, working papers, technical reports, data sets, authors, funders, and more. The <a href="https://github.com/CrossRef/rest-api-doc">Crossref REST API</a> allows anybody to search and reuse members’ metadata in a variety of ways. Read <a href="https://www.crossref.org/services/metadata-delivery/user-stories/">examples of user stories</a>.</p>
</div>
<div id="rcrossref" class="section level2">
<h2><code>rcrossref</code></h2>
<p><code>rcrossref</code> is a package developed by <a href="https://scottchamberlain.info/">Scott Chamberlain</a>, Hao Zhu, Najko Jahn, Carl Boettiger, and Karthik Ram, part of the <a href="https://ropensci.org/">rOpenSci</a> set of packages. rOpenSci is an incredible organization dedicated to open and reproducible research using shared data and reusable software. I strongly recommend you browse their set of packages at <a href="https://ropensci.org/packages/" class="uri">https://ropensci.org/packages/</a>.</p>
<p><code>rcrossref</code> serves as an interface to the Crossref API.</p>
<p><strong>Key links</strong></p>
<ul>
<li><a href="https://cran.r-project.org/web/packages/rcrossref/rcrossref.pdf">rcrossref documentation</a></li>
<li><a href="https://github.com/ropensci/rcrossref">Crossref REST API documentation</a></li>
<li><a href="https://github.com/CrossRef/rest-api-doc/blob/master/api_format.md">Crossref Metadata API JSON Format</a></li>
<li>Crossref and rcrossref tutorials
<ul>
<li><a href="https://ciakovx.github.io/rcrossref.html">my <code>rcrossref</code> tutorial</a></li>
<li>rOpenSci <a href="https://ropensci.org/tutorials/rcrossref_tutorial/">rcrossref tutorial</a></li>
<li>Paul Oldham: <a href="https://poldham.github.io/abs/crossref.html">“Accessing the Scientific Literature with Crossref”</a></li>
<li><a href="https://cran.r-project.org/web/packages/rcrossref/vignettes/crossref_vignette.html">rcrossref vignette</a></li>
</ul></li>
</ul>
</div>
</div>
<div id="getting-publications-from-journals-with-cr_journals" class="section level1">
<h1>Getting publications from journals with <code>cr_journals</code></h1>
<p><code>cr_journals()</code> takes either an ISSN or a general keyword query, and returns metadata for articles published in the journal, including DOI, title, volume, issue, pages, publisher, authors, etc. A full list of publications in Crossref is <a href="https://support.crossref.org/hc/en-us/articles/213197226-Browsable-title-list">available on their website</a>.</p>
<div id="getting-journal-details" class="section level2">
<h2>Getting journal details</h2>
<p>Crossref is entirely dependent on publishers to supply the metadata. Some fields are required, while others are optional. You may therefore first be interested in what metadata publishers have submitted to Crossref for a given journal. By using <code>cr_journals</code> with <code>works = FALSE</code>, you can determine who publishes the journal, the total number of articles for the journal in Crossref, whether abstracts are included, if the full text of articles is deposited, if author ORCIDs are provided, and if the publisher supplies author affiliations, author ORCID iDs, article licensing data, funders for the article, article references, and a few other items.</p>
<p>First we will create a new vector <code>plosone_issn</code> with the ISSN for the journal <em>PLoS ONE</em>.</p>
<pre class="r"><code># assign the PLoS ISSN
plosone_issn <- "1932-6203"</code></pre>
<p>We will then run <code>rcrossref::cr_journals()</code>, setting the ISSN equal to the <code>plosone_issn</code> we just created, and print the results.</p>
<pre class="r"><code># get information about the journal
plosone_details <- rcrossref::cr_journals(issn = plosone_issn, works = FALSE)
plosone_details</code></pre>
<pre><code>## $meta
## NULL
##
## $data
## title publisher issn last_status_check_time
## 1 PLoS ONE Public Library of Science 1932-6203 2021-07-20
## deposits_abstracts_current deposits_orcids_current deposits
## 1 TRUE TRUE TRUE
## deposits_affiliations_backfile deposits_update_policies_backfile
## 1 FALSE TRUE
## deposits_similarity_checking_backfile deposits_award_numbers_current
## 1 TRUE TRUE
## deposits_resource_links_current deposits_articles
## 1 FALSE TRUE
## deposits_affiliations_current deposits_funders_current
## 1 FALSE TRUE
## deposits_references_backfile deposits_abstracts_backfile
## 1 TRUE TRUE
## deposits_licenses_backfile deposits_award_numbers_backfile
## 1 TRUE TRUE
## deposits_open_references_backfile deposits_open_references_current
## 1 TRUE TRUE
## deposits_references_current deposits_resource_links_backfile
## 1 TRUE FALSE
## deposits_orcids_backfile deposits_funders_backfile
## 1 TRUE TRUE
## deposits_update_policies_current deposits_similarity_checking_current
## 1 TRUE TRUE
## deposits_licenses_current affiliations_current similarity_checking_current
## 1 TRUE 0 1
## funders_backfile licenses_backfile funders_current affiliations_backfile
## 1 0.1731985 0.9924777 0.5762672 0
## resource_links_backfile orcids_backfile update_policies_current
## 1 0 0.1729574 1
## open_references_backfile orcids_current similarity_checking_backfile
## 1 1 0.9389957 0.9135426
## references_backfile award_numbers_backfile update_policies_backfile
## 1 0.9135426 0.1471421 0.9999527
## licenses_current award_numbers_current abstracts_backfile
## 1 1 0.4964669 3.782452e-05
## resource_links_current abstracts_current open_references_current
## 1 0 0.284577 1
## references_current total_dois current_dois backfile_dois
## 1 1 253959 42456 211503
##
## $facets
## NULL</code></pre>
<p>This actually comes back as a list of three items: <code>meta</code>, <code>data</code>, and <code>facets</code>. The good stuff is in <code>data</code>.</p>
<p>We use the <code>pluck()</code> function from the <code>purrr</code> package to pull that data only. We will be using <code>pluck</code> throughout this tutorial; it’s an easy way of indexing deeply and flexibly into lists to extract information.</p>
<p>We don’t have time in this tutorial to discuss list items and purr. For an excellent in-depth tutorial, see Jenny Bryan’s <a href="https://jennybc.github.io/purrr-tutorial/ls01_map-name-position-shortcuts.html">Introduction to map(): extract elements</a>, also provided on this website.</p>
<pre class="r"><code># get information about the journal and pluck the data
plosone_details <- rcrossref::cr_journals(issn = plosone_issn, works = FALSE) %>%
purrr::pluck("data")</code></pre>
<p>The <code>purrr::pluck()</code> function is connected to <code>plosone_details</code> with something called a <a href="https://www.datacamp.com/community/tutorials/pipe-r-tutorial">Pipe Operator</a> <code>%&gt;%</code>, which we will be using throughout the tutorial. A pipe takes the output of one statement and immediately makes it the input of the next statement. It helps so that you don’t have to write every intermediate, processing data to your R environment. You can think of it as “then” in natural language. So the above script first makes the API call with <code>cr_journals()</code>, then it applies <code>pluck()</code> to extract only the list element called <code>"data"</code>, and returns it to the <code>plosone_details</code> value.</p>
<p>We now have a <strong>data frame</strong> including the details Croassref has on file about PLoS ONE. Scroll to the right to see all the columns.</p>
<pre class="r"><code>plosone_details</code></pre>
<div data-pagedtable="false">
<script data-pagedtable-source type="application/json">
{"columns":[{"label":["title"],"name":[1],"type":["chr"],"align":["left"]},{"label":["publisher"],"name":[2],"type":["chr"],"align":["left"]},{"label":["issn"],"name":[3],"type":["chr"],"align":["left"]},{"label":["last_status_check_time"],"name":[4],"type":["date"],"align":["right"]},{"label":["deposits_abstracts_current"],"name":[5],"type":["lgl"],"align":["right"]},{"label":["deposits_orcids_current"],"name":[6],"type":["lgl"],"align":["right"]},{"label":["deposits"],"name":[7],"type":["lgl"],"align":["right"]},{"label":["deposits_affiliations_backfile"],"name":[8],"type":["lgl"],"align":["right"]},{"label":["deposits_update_policies_backfile"],"name":[9],"type":["lgl"],"align":["right"]},{"label":["deposits_similarity_checking_backfile"],"name":[10],"type":["lgl"],"align":["right"]},{"label":["deposits_award_numbers_current"],"name":[11],"type":["lgl"],"align":["right"]},{"label":["deposits_resource_links_current"],"name":[12],"type":["lgl"],"align":["right"]},{"label":["deposits_articles"],"name":[13],"type":["lgl"],"align":["right"]},{"label":["deposits_affiliations_current"],"name":[14],"type":["lgl"],"align":["right"]},{"label":["deposits_funders_current"],"name":[15],"type":["lgl"],"align":["right"]},{"label":["deposits_references_backfile"],"name":[16],"type":["lgl"],"align":["right"]},{"label":["deposits_abstracts_backfile"],"name":[17],"type":["lgl"],"align":["right"]},{"label":["deposits_licenses_backfile"],"name":[18],"type":["lgl"],"align":["right"]},{"label":["deposits_award_numbers_backfile"],"name":[19],"type":["lgl"],"align":["right"]},{"label":["deposits_open_references_backfile"],"name":[20],"type":["lgl"],"align":["right"]},{"label":["deposits_open_references_current"],"name":[21],"type":["lgl"],"align":["right"]},{"label":["deposits_references_current"],"name":[22],"type":["lgl"],"align":["right"]},{"label":["deposits_resource_links_backfile"],"name":[23],"type":["lgl"],"align":["right"]},{"label":["deposits_orcids_backfile"],"name":[24],"type":["lgl"],"align":["right"]},{"label":["deposits_funders_backfile"],"name":[25],"type":["lgl"],"align":["right"]},{"label":["deposits_update_policies_current"],"name":[26],"type":["lgl"],"align":["right"]},{"label":["deposits_similarity_checking_current"],"name":[27],"type":["lgl"],"align":["right"]},{"label":["deposits_licenses_current"],"name":[28],"type":["lgl"],"align":["right"]},{"label":["affiliations_current"],"name":[29],"type":["dbl"],"align":["right"]},{"label":["similarity_checking_current"],"name":[30],"type":["dbl"],"align":["right"]},{"label":["funders_backfile"],"name":[31],"type":["dbl"],"align":["right"]},{"label":["licenses_backfile"],"name":[32],"type":["dbl"],"align":["right"]},{"label":["funders_current"],"name":[33],"type":["dbl"],"align":["right"]},{"label":["affiliations_backfile"],"name":[34],"type":["dbl"],"align":["right"]},{"label":["resource_links_backfile"],"name":[35],"type":["dbl"],"align":["right"]},{"label":["orcids_backfile"],"name":[36],"type":["dbl"],"align":["right"]},{"label":["update_policies_current"],"name":[37],"type":["dbl"],"align":["right"]},{"label":["open_references_backfile"],"name":[38],"type":["dbl"],"align":["right"]},{"label":["orcids_current"],"name":[39],"type":["dbl"],"align":["right"]},{"label":["similarity_checking_backfile"],"name":[40],"type":["dbl"],"align":["right"]},{"label":["references_backfile"],"name":[41],"type":["dbl"],"align":["right"]},{"label":["award_numbers_backfile"],"name":[42],"type":["dbl"],"align":["right"]},{"label":["update_policies_backfile"],"name":[43],"type":["dbl"],"align":["right"]},{"label":["licenses_current"],"name":[44],"type":["dbl"],"align":["right"]},{"label":["award_numbers_current"],"name":[45],"type":["dbl"],"align":["right"]},{"label":["abstracts_backfile"],"name":[46],"type":["dbl"],"align":["right"]},{"label":["resource_links_current"],"name":[47],"type":["dbl"],"align":["right"]},{"label":["abstracts_current"],"name":[48],"type":["dbl"],"align":["right"]},{"label":["open_references_current"],"name":[49],"type":["dbl"],"align":["right"]},{"label":["references_current"],"name":[50],"type":["dbl"],"align":["right"]},{"label":["total_dois"],"name":[51],"type":["int"],"align":["right"]},{"label":["current_dois"],"name":[52],"type":["int"],"align":["right"]},{"label":["backfile_dois"],"name":[53],"type":["int"],"align":["right"]}],"data":[{"1":"PLoS ONE","2":"Public Library of Science","3":"1932-6203","4":"2021-07-20","5":"TRUE","6":"TRUE","7":"TRUE","8":"FALSE","9":"TRUE","10":"TRUE","11":"TRUE","12":"FALSE","13":"TRUE","14":"FALSE","15":"TRUE","16":"TRUE","17":"TRUE","18":"TRUE","19":"TRUE","20":"TRUE","21":"TRUE","22":"TRUE","23":"FALSE","24":"TRUE","25":"TRUE","26":"TRUE","27":"TRUE","28":"TRUE","29":"0","30":"1","31":"0.1731985","32":"0.9924777","33":"0.5762672","34":"0","35":"0","36":"0.1729574","37":"1","38":"1","39":"0.9389957","40":"0.9135426","41":"0.9135426","42":"0.1471421","43":"0.9999527","44":"1","45":"0.4964669","46":"3.782452e-05","47":"0","48":"0.284577","49":"1","50":"1","51":"253959","52":"42456","53":"211503"}],"options":{"columns":{"min":{},"max":[10]},"rows":{"min":[10],"max":[10]},"pages":{}}}
</script>
</div>
<p>There are a number of ways to explore this data frame:</p>
<pre class="r"><code># display information about the data frame
str(plosone_details)</code></pre>
<pre><code>## 'data.frame': 1 obs. of 53 variables:
## $ title : chr "PLoS ONE"
## $ publisher : chr "Public Library of Science"
## $ issn : chr "1932-6203"
## $ last_status_check_time : Date, format: "2021-07-20"
## $ deposits_abstracts_current : logi TRUE
## $ deposits_orcids_current : logi TRUE
## $ deposits : logi TRUE
## $ deposits_affiliations_backfile : logi FALSE
## $ deposits_update_policies_backfile : logi TRUE
## $ deposits_similarity_checking_backfile: logi TRUE
## $ deposits_award_numbers_current : logi TRUE
## $ deposits_resource_links_current : logi FALSE
## $ deposits_articles : logi TRUE
## $ deposits_affiliations_current : logi FALSE
## $ deposits_funders_current : logi TRUE
## $ deposits_references_backfile : logi TRUE
## $ deposits_abstracts_backfile : logi TRUE
## $ deposits_licenses_backfile : logi TRUE
## $ deposits_award_numbers_backfile : logi TRUE
## $ deposits_open_references_backfile : logi TRUE
## $ deposits_open_references_current : logi TRUE
## $ deposits_references_current : logi TRUE
## $ deposits_resource_links_backfile : logi FALSE
## $ deposits_orcids_backfile : logi TRUE
## $ deposits_funders_backfile : logi TRUE
## $ deposits_update_policies_current : logi TRUE
## $ deposits_similarity_checking_current : logi TRUE
## $ deposits_licenses_current : logi TRUE
## $ affiliations_current : num 0
## $ similarity_checking_current : num 1
## $ funders_backfile : num 0.173
## $ licenses_backfile : num 0.992
## $ funders_current : num 0.576
## $ affiliations_backfile : num 0
## $ resource_links_backfile : num 0
## $ orcids_backfile : num 0.173
## $ update_policies_current : num 1
## $ open_references_backfile : num 1
## $ orcids_current : num 0.939
## $ similarity_checking_backfile : num 0.914
## $ references_backfile : num 0.914
## $ award_numbers_backfile : num 0.147
## $ update_policies_backfile : num 1
## $ licenses_current : num 1
## $ award_numbers_current : num 0.496
## $ abstracts_backfile : num 3.78e-05
## $ resource_links_current : num 0
## $ abstracts_current : num 0.285
## $ open_references_current : num 1
## $ references_current : num 1
## $ total_dois : int 253959
## $ current_dois : int 42456
## $ backfile_dois : int 211503</code></pre>
<p>Type <code>?str</code> into the console to read the description of the <code>str</code> function. You can call <code>str()</code> on an R object to compactly display information about it, including the data type, the number of elements, and a printout of the first few elements.</p>
<pre class="r"><code># dimensions: 1 row, 53 columns
dim(plosone_details)</code></pre>
<pre><code>## [1] 1 53</code></pre>
<pre class="r"><code># number of rows
nrow(plosone_details)</code></pre>
<pre><code>## [1] 1</code></pre>
<pre class="r"><code># number of columns
ncol(plosone_details)</code></pre>
<pre><code>## [1] 53</code></pre>
<pre class="r"><code># column names
names(plosone_details)</code></pre>
<pre><code>## [1] "title"
## [2] "publisher"
## [3] "issn"
## [4] "last_status_check_time"
## [5] "deposits_abstracts_current"
## [6] "deposits_orcids_current"
## [7] "deposits"
## [8] "deposits_affiliations_backfile"
## [9] "deposits_update_policies_backfile"
## [10] "deposits_similarity_checking_backfile"
## [11] "deposits_award_numbers_current"
## [12] "deposits_resource_links_current"
## [13] "deposits_articles"
## [14] "deposits_affiliations_current"
## [15] "deposits_funders_current"
## [16] "deposits_references_backfile"
## [17] "deposits_abstracts_backfile"
## [18] "deposits_licenses_backfile"
## [19] "deposits_award_numbers_backfile"
## [20] "deposits_open_references_backfile"
## [21] "deposits_open_references_current"
## [22] "deposits_references_current"
## [23] "deposits_resource_links_backfile"
## [24] "deposits_orcids_backfile"
## [25] "deposits_funders_backfile"
## [26] "deposits_update_policies_current"
## [27] "deposits_similarity_checking_current"
## [28] "deposits_licenses_current"
## [29] "affiliations_current"
## [30] "similarity_checking_current"
## [31] "funders_backfile"
## [32] "licenses_backfile"
## [33] "funders_current"
## [34] "affiliations_backfile"
## [35] "resource_links_backfile"
## [36] "orcids_backfile"
## [37] "update_policies_current"
## [38] "open_references_backfile"
## [39] "orcids_current"
## [40] "similarity_checking_backfile"
## [41] "references_backfile"
## [42] "award_numbers_backfile"
## [43] "update_policies_backfile"
## [44] "licenses_current"
## [45] "award_numbers_current"
## [46] "abstracts_backfile"
## [47] "resource_links_current"
## [48] "abstracts_current"
## [49] "open_references_current"
## [50] "references_current"
## [51] "total_dois"
## [52] "current_dois"
## [53] "backfile_dois"</code></pre>
<p>We see this data frame includes one observation of 53 different variables. This includes the total number of DOIs, whether the abstracts, orcids, article references are current; and other information.</p>
<p>You can use the $ symbol to work with particular variables. For example, the <code>publisher</code> column:</p>
<pre class="r"><code># print the publisher variable
plosone_details$publisher</code></pre>
<pre><code>## [1] "Public Library of Science"</code></pre>
<p>The total number of DOIs on file:</p>
<pre class="r"><code># print the total number of DOIs
plosone_details$total_dois</code></pre>
<pre><code>## [1] 253959</code></pre>
<p>Whether the data publishers provide on funders of articles they publish is current in Crossref (a TRUE/FALSE value–called “logical” in R):</p>
<pre class="r"><code># is funder data current on deposits?
plosone_details$deposits_funders_current</code></pre>
<pre><code>## [1] TRUE</code></pre>
<hr />
<p><strong>TRY IT YOURSELF</strong></p>
<ol style="list-style-type: decimal">
<li>Assign an ISSN for a well-known journal to a new variable in R. Name it whatever you like. You can use the <a href="https://www.scimagojr.com/journalrank.php">Scimago Journal Rank</a> to look up the ISSN. If you need a couple examples, try <a href="https://www.scimagojr.com/journalsearch.php?q=16004&tip=sid&clean=0">RUSA</a> or <a href="https://www.scimagojr.com/journalsearch.php?q=144908&tip=sid&clean=0">Library Hi Tech</a>. Make sure to put the ISSN in quotes to create a character vector.</li>
<li>Look up the journal details using <code>cr_journals</code>. Make sure to pass the argument <code>works = FALSE</code>.</li>
<li>Print the data to your console by typing in the value name.</li>
</ol>
<p><strong>Does it matter if the ISSN has a hyphen or not? Try both methods.</strong></p>
<pre class="r"><code># assign an ISSN to a value. Call the value what you want (e.g. plosone_issn)</code></pre>
<pre class="r"><code># look up journal details using the cr_journals function and assign it to a new
# value (e.g. plosone_details). Remember to include a %>% pipe and call
# purrr::pluck('data')</code></pre>
<pre class="r"><code># print the journal details to the console by typing in the value name</code></pre>
</div>
<div id="getting-journal-publications-by-issn" class="section level2">
<h2>Getting journal publications by ISSN</h2>
<p>To get metadata for the publications themselves rather than data about the journal, we will again use the <code>plosone_issn</code> value in the <code>issn =</code> argument to <code>cr_journals</code>, but we now set <code>works = TRUE</code>.</p>
<pre class="r"><code># get metadata on articles by setting works = TRUE
plosone_publications <- cr_journals(issn = plosone_issn, works = TRUE, limit = 25) %>%
pluck("data")</code></pre>
<p>Let’s walk through this step by step:</p>
<ul>
<li>First, we are creating a new value called <code>plosone_publications</code></li>
<li>We are using the assignment operator <code>&lt;-</code> to assign the results of an operation to this new value</li>
<li>We are running the function <code>cr_journals()</code>. It is not necessary to add <code>rcrossref::</code> to the beginning of the function.</li>
<li>We <strong>pass</strong> three arguments to the function:
<ul>
<li><code>issn = plosone_issn</code> : We defined <code>plosone_issn</code> earlier in the session as ‘1932-6203’. We are reusing that value here to tell the <code>cr_journals()</code> function what journal we want information on</li>
<li><code>works = TRUE</code> : When we earlier specified <code>works = FALSE</code>, we got back information on the publication. When <code>works = TRUE</code>, we will get back article level metadata</li>
<li><code>limit = 25</code> : We will get back 25 articles. The default number of articles returned is 20, but you can increase or decrease that with the <code>limit</code> argument. The max limit is 1000, but you can get more using the <code>cursor</code> argument (see below).</li>
</ul></li>
<li><code>%&gt;%</code> : Pipe operator says to R to take the results of this function and use it as the input for what follows</li>
<li><code>pluck("data")</code> : This will grab only the contents of the list item “data” and return it to <code>plosone_publications</code>.</li>
</ul>
<p>Let’s explore the data frame:</p>
<pre class="r"><code># print dimensions of this data frame
dim(plosone_publications)</code></pre>
<pre><code>## [1] 25 33</code></pre>
<p>When we run <code>dim()</code> (dimensions) on this result, we now see a different number of rows and columns: 25 rows and 28 columns. This is therefore a different dataset than <code>plosone_details</code>. Let’s call <code>names()</code> to see what the column names are:</p>
<pre class="r"><code># print column names
names(plosone_publications)</code></pre>
<pre><code>## [1] "container.title" "created" "deposited"
## [4] "published.online" "doi" "indexed"
## [7] "issn" "issue" "issued"
## [10] "member" "page" "prefix"
## [13] "publisher" "score" "source"
## [16] "reference.count" "references.count" "is.referenced.by.count"
## [19] "title" "type" "update.policy"
## [22] "url" "volume" "language"
## [25] "short.container.title" "author" "link"
## [28] "content_domain" "license" "reference"
## [31] "update_to" "clinical-trial-number" "funder"</code></pre>
<p>We view the entire data frame below. Because there are some nested lists within the data, we will use the <code>select()</code> function from the <code>dplyr</code> package to select only a few columns. This will make it easier for us to view here in the Azure Notebook environment. You can also use the <code>select()</code> function to rearrange the columns.</p>
<pre class="r"><code># print select columns from the data frame
plosone_publications %>%
dplyr::select(title, doi, volume, issue, page, issued, url, publisher, reference.count,
type, issn)</code></pre>
<div data-pagedtable="false">
<script data-pagedtable-source type="application/json">
{"columns":[{"label":["title"],"name":[1],"type":["chr"],"align":["left"]},{"label":["doi"],"name":[2],"type":["chr"],"align":["left"]},{"label":["volume"],"name":[3],"type":["chr"],"align":["left"]},{"label":["issue"],"name":[4],"type":["chr"],"align":["left"]},{"label":["page"],"name":[5],"type":["chr"],"align":["left"]},{"label":["issued"],"name":[6],"type":["chr"],"align":["left"]},{"label":["url"],"name":[7],"type":["chr"],"align":["left"]},{"label":["publisher"],"name":[8],"type":["chr"],"align":["left"]},{"label":["reference.count"],"name":[9],"type":["chr"],"align":["left"]},{"label":["type"],"name":[10],"type":["chr"],"align":["left"]},{"label":["issn"],"name":[11],"type":["chr"],"align":["left"]}],"data":[{"1":"Multiple Sporadic Colorectal Cancers Display a Unique Methylation Phenotype","2":"10.1371/journal.pone.0091033","3":"9","4":"3","5":"e91033","6":"2014-03-18","7":"http://dx.doi.org/10.1371/journal.pone.0091033","8":"Public Library of Science (PLoS)","9":"42","10":"journal-article","11":"1932-6203"},{"1":"Need for Space: The Key Distance Effect Depends on Spatial Stimulus Configurations","2":"10.1371/journal.pone.0091432","3":"9","4":"3","5":"e91432","6":"2014-03-18","7":"http://dx.doi.org/10.1371/journal.pone.0091432","8":"Public Library of Science (PLoS)","9":"24","10":"journal-article","11":"1932-6203"},{"1":"Correction: MicroRNA-130b Suppresses Migration and Invasion of Colorectal Cancer Cells through Downregulation of Integrin β1","2":"10.1371/journal.pone.0091498","3":"9","4":"3","5":"e91498","6":"2014-03-18","7":"http://dx.doi.org/10.1371/journal.pone.0091498","8":"Public Library of Science (PLoS)","9":"0","10":"journal-article","11":"1932-6203"},{"1":"Oral Health Training Programs for Community and Professional Health Care Workers in Nairobi East District Increases Identification of HIV-Infected Patients","2":"10.1371/journal.pone.0090927","3":"9","4":"3","5":"e90927","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0090927","8":"Public Library of Science (PLoS)","9":"22","10":"journal-article","11":"1932-6203"},{"1":"Correction: Association of Polymorphisms and Haplotypes in the Insulin-Like Growth Factor 1 Receptor (IGF1R) Gene with the Risk of Breast Cancer in Korean Women","2":"10.1371/journal.pone.0091218","3":"9","4":"3","5":"e91218","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091218","8":"Public Library of Science (PLoS)","9":"0","10":"journal-article","11":"1932-6203"},{"1":"Epidemiological and Etiological Characteristics of Fever, Thrombocytopenia and Leukopenia Syndrome in Henan Province, China, 2011–2012","2":"10.1371/journal.pone.0091166","3":"9","4":"3","5":"e91166","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091166","8":"Public Library of Science (PLoS)","9":"26","10":"journal-article","11":"1932-6203"},{"1":"Correction: Network Analysis Reveals Ecological Links between N-Fixing Bacteria and Wood-Decaying Fungi","2":"10.1371/journal.pone.0091389","3":"9","4":"3","5":"e91389","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091389","8":"Public Library of Science (PLoS)","9":"0","10":"journal-article","11":"1932-6203"},{"1":"Correction: CXCR7 Is Highly Expressed in Acute Lymphoblastic Leukemia and Potentiates CXCR4 Response to CXCL12","2":"10.1371/journal.pone.0091365","3":"9","4":"3","5":"e91365","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091365","8":"Public Library of Science (PLoS)","9":"0","10":"journal-article","11":"1932-6203"},{"1":"Stochastic Resonance with Colored Noise for Neural Signal Detection","2":"10.1371/journal.pone.0091345","3":"9","4":"3","5":"e91345","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091345","8":"Public Library of Science (PLoS)","9":"63","10":"journal-article","11":"1932-6203"},{"1":"Scaling and Predictability in Stock Markets: A Comparative Study","2":"10.1371/journal.pone.0091707","3":"9","4":"3","5":"e91707","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091707","8":"Public Library of Science (PLoS)","9":"26","10":"journal-article","11":"1932-6203"},{"1":"Correction: Density, Destinations or Both? A Comparison of Measures of Walkability in Relation to Transportation Behaviors, Obesity and Diabetes in Toronto, Canada","2":"10.1371/journal.pone.0091485","3":"9","4":"3","5":"e91485","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091485","8":"Public Library of Science (PLoS)","9":"0","10":"journal-article","11":"1932-6203"},{"1":"Molecular Characterization of Adipose Tissue in the African Elephant (Loxodonta africana)","2":"10.1371/journal.pone.0091717","3":"9","4":"3","5":"e91717","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091717","8":"Public Library of Science (PLoS)","9":"74","10":"journal-article","11":"1932-6203"},{"1":"Immunization with H7-HCP-Tir-Intimin Significantly Reduces Colonization and Shedding of Escherichia coli O157:H7 in Goats","2":"10.1371/journal.pone.0091632","3":"9","4":"3","5":"e91632","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091632","8":"Public Library of Science (PLoS)","9":"34","10":"journal-article","11":"1932-6203"},{"1":"Characterization of the Altered Gene Expression Profile in Early Porcine Embryos Generated from Parthenogenesis and Somatic Cell Chromatin Transfer","2":"10.1371/journal.pone.0091728","3":"9","4":"3","5":"e91728","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091728","8":"Public Library of Science (PLoS)","9":"71","10":"journal-article","11":"1932-6203"},{"1":"Preferential Occupancy of R2 Retroelements on the B Chromosomes of the Grasshopper Eyprepocnemis plorans","2":"10.1371/journal.pone.0091820","3":"9","4":"3","5":"e91820","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091820","8":"Public Library of Science (PLoS)","9":"81","10":"journal-article","11":"1932-6203"},{"1":"Quantitative Analysis of Cone Photoreceptor Distribution and Its Relationship with Axial Length, Age, and Early Age-Related Macular Degeneration","2":"10.1371/journal.pone.0091873","3":"9","4":"3","5":"e91873","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0091873","8":"Public Library of Science (PLoS)","9":"51","10":"journal-article","11":"1932-6203"},{"1":"Can Training Enhance Face Cognition Abilities in Middle-Aged Adults?","2":"10.1371/journal.pone.0090249","3":"9","4":"3","5":"e90249","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0090249","8":"Public Library of Science (PLoS)","9":"84","10":"journal-article","11":"1932-6203"},{"1":"A Spiking Network Model of Decision Making Employing Rewarded STDP","2":"10.1371/journal.pone.0090821","3":"9","4":"3","5":"e90821","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0090821","8":"Public Library of Science (PLoS)","9":"85","10":"journal-article","11":"1932-6203"},{"1":"Association between a C8orf13–BLK Polymorphism and Polymyositis/Dermatomyositis in the Japanese Population: An Additive Effect with STAT4 on Disease Susceptibility","2":"10.1371/journal.pone.0090019","3":"9","4":"3","5":"e90019","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0090019","8":"Public Library of Science (PLoS)","9":"28","10":"journal-article","11":"1932-6203"},{"1":"Signaling Role of Prokineticin 2 on the Estrous Cycle of Female Mice","2":"10.1371/journal.pone.0090860","3":"9","4":"3","5":"e90860","6":"2014-03-14","7":"http://dx.doi.org/10.1371/journal.pone.0090860","8":"Public Library of Science (PLoS)","9":"45","10":"journal-article","11":"1932-6203"},{"1":"Correction: Morphological Characterization and Quantification of the Mycelial Growth of the Brown-Rot Fungus Postia placenta for Modeling Purposes","2":"10.1371/journal.pone.0189548","3":"13","4":"5","5":"e0189548","6":"2018-05-30","7":"http://dx.doi.org/10.1371/journal.pone.0189548","8":"Public Library of Science (PLoS)","9":"1","10":"journal-article","11":"1932-6203"},{"1":"Correction: Effects of resource-dependent cannibalism on population size distribution and individual life history in a case-bearing caddisfly","2":"10.1371/journal.pone.0197014","3":"13","4":"5","5":"e0197014","6":"2018-05-30","7":"http://dx.doi.org/10.1371/journal.pone.0197014","8":"Public Library of Science (PLoS)","9":"1","10":"journal-article","11":"1932-6203"},{"1":"Internists’ dilemmas in their interactions with chronically ill patients; A comparison of their interaction strategies and dilemmas in two different medical contexts","2":"10.1371/journal.pone.0194133","3":"13","4":"5","5":"e0194133","6":"2018-05-30","7":"http://dx.doi.org/10.1371/journal.pone.0194133","8":"Public Library of Science (PLoS)","9":"71","10":"journal-article","11":"1932-6203"},{"1":"Managing the 1920s’ Chilean educational crisis: A historical view combined with machine learning","2":"10.1371/journal.pone.0197429","3":"13","4":"5","5":"e0197429","6":"2018-05-30","7":"http://dx.doi.org/10.1371/journal.pone.0197429","8":"Public Library of Science (PLoS)","9":"42","10":"journal-article","11":"1932-6203"},{"1":"Can excreted thiocyanate be used to detect cyanide exposure in live reef fish?","2":"10.1371/journal.pone.0196841","3":"13","4":"5","5":"e0196841","6":"2018-05-30","7":"http://dx.doi.org/10.1371/journal.pone.0196841","8":"Public Library of Science (PLoS)","9":"24","10":"journal-article","11":"1932-6203"}],"options":{"columns":{"min":{},"max":[10]},"rows":{"min":[10],"max":[10]},"pages":{}}}
</script>
</div>
<p>Here we are just getting back the last 25 articles that have been indexed in Crossref by PLoS ONE. However, this gives you a taste of how rich the metadata is. We have the dates the article was deposited and published online, the title, DOI, the ISSN, the volume, issue, and page numbers, the number of references, the URL, and for some items, the subjects. The omitted columns include information on licensing, authors, and more. We will deal with those columns further down.</p>
</div>
<div id="getting-multiple-publications-by-issn" class="section level2">
<h2>Getting multiple publications by ISSN</h2>
<p>You can also pass multiple ISSNs to <code>cr_journals</code>. Here we create 2 new values, <code>jama_issn</code> and <code>jah_issn</code>. These are ISSNs for the <em>Journal of American History</em> and <em>JAMA: The Journal of the American Medical Association</em>. We then pass them to <code>cr_journals</code> by passing them to the <code>c()</code> function, which will combine them (it’s like CONCATENATE in Excel). We set <code>works</code> to <code>TRUE</code> so we’ll get the publications metadata, and we set the <code>limit</code> to 50, so we’ll get 50 publications per journal.</p>
<pre class="r"><code># assign the JAMA and JAH ISSNs
jama_issn <- "1538-3598"
jah_issn <- "0021-8723"
# get the last 10 publications on deposit from each journal. For multiple
# ISSNs, use c() to combine them
jah_jama_publications <- rcrossref::cr_journals(issn = c(jama_issn, jah_issn), works = T,
limit = 10) %>%
purrr::pluck("data")</code></pre>
<p>Here we used <code>c()</code> to combine <code>jama_issn</code> and <code>jah_issn</code>. <code>c()</code> is used to create a <strong>vector</strong> in R. A vector is a sequence of elements of the same type. In this case, even though the ISSNs are numbers, we created them as <code>character</code> vectors by surrounding them in quotation marks. You can use single or double quotes. Above, when we assigned 5 to <code>y</code>, we created a <code>numeric</code> vector.</p>
<p>Vectors can only contain “homogenous” data–in other words, all data must be of the same type. The type of a vector determines what kind of analysis you can do on it. For example, you can perform mathematical operations on <code>numeric</code> objects, but not on <code>character</code> objects. You can think of vectors as columns in an Excel spreadsheet: for example, in a name column, you want every value to be a character; in a date column, you want every value to be a date; etc.</p>
<p>Going back to our <code>jah_jama_publications</code> object, we have a dataframe composed of 20 observations of 24 variables. This is a rich set of metadata for the articles in the given publications. The fields are detailed in the <a href="https://github.com/CrossRef/rest-api-doc/blob/master/api_format.md#work">Crossref documentation</a>, including the field name, type, description, and whether or not it’s required. Some of these fields are title, DOI, DOI prefix identifer, ISSN, volume, issue, publisher, abstract (if provided), reference count (if provided–i.e., the number of references <em>in</em> the given article), link (if provided), subject (if provided), and other information. The number of citations <em>to</em> the article are not pulled, but these can be gathered separately with <code>cr_citation_count()</code> (see below).</p>
<pre class="r"><code># print column names
names(jah_jama_publications)</code></pre>
<pre><code>## [1] "container.title" "created" "deposited"
## [4] "published.print" "doi" "indexed"
## [7] "issn" "issue" "issued"
## [10] "member" "page" "prefix"
## [13] "publisher" "score" "source"
## [16] "reference.count" "references.count" "is.referenced.by.count"
## [19] "title" "type" "url"
## [22] "volume" "author" "content_domain"
## [25] "language" "short.container.title" "link"
## [28] "subject" "published.online"</code></pre>
<pre class="r"><code># print data frame with select columns
jah_jama_publications %>%
dplyr::select(title, doi, volume, issue, page, issued, url, publisher, reference.count,
type, issn)</code></pre>
<div data-pagedtable="false">
<script data-pagedtable-source type="application/json">
{"columns":[{"label":["title"],"name":[1],"type":["chr"],"align":["left"]},{"label":["doi"],"name":[2],"type":["chr"],"align":["left"]},{"label":["volume"],"name":[3],"type":["chr"],"align":["left"]},{"label":["issue"],"name":[4],"type":["chr"],"align":["left"]},{"label":["page"],"name":[5],"type":["chr"],"align":["left"]},{"label":["issued"],"name":[6],"type":["chr"],"align":["left"]},{"label":["url"],"name":[7],"type":["chr"],"align":["left"]},{"label":["publisher"],"name":[8],"type":["chr"],"align":["left"]},{"label":["reference.count"],"name":[9],"type":["chr"],"align":["left"]},{"label":["type"],"name":[10],"type":["chr"],"align":["left"]},{"label":["issn"],"name":[11],"type":["chr"],"align":["left"]}],"data":[{"1":"Acetaminophen overdose in the third trimester of pregnancy","2":"10.1001/jama.247.22.3114","3":"247","4":"22","5":"3114-3115","6":"1982-06-11","7":"http://dx.doi.org/10.1001/jama.247.22.3114","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"First-trimester drug use and congenital disorders","2":"10.1001/jama.246.4.343","3":"246","4":"4","5":"343-346","6":"1981-07-24","7":"http://dx.doi.org/10.1001/jama.246.4.343","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Normal serum free thyroid hormone concentrations in patients treated with phenytoin or carbamazepine. A paradox resolved","2":"10.1001/jama.275.19.1495","3":"275","4":"19","5":"1495-1498","6":"1996-05-15","7":"http://dx.doi.org/10.1001/jama.275.19.1495","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Eosinophilic Meningitis Following Myelography","2":"10.1001/jama.1980.03300490014009","3":"243","4":"23","5":"2396-2397","6":"1980-06-20","7":"http://dx.doi.org/10.1001/jama.1980.03300490014009","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Do condom catheter collecting systems cause urinary tract infection?","2":"10.1001/jama.242.4.340","3":"242","4":"4","5":"340-341","6":"1979-07-27","7":"http://dx.doi.org/10.1001/jama.242.4.340","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Ribavirin treatment of respiratory syncytial viral infection in infants with underlying cardiopulmonary disease","2":"10.1001/jama.254.21.3047","3":"254","4":"21","5":"3047-3051","6":"1985-12-06","7":"http://dx.doi.org/10.1001/jama.254.21.3047","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Molecular Epidemiology and Tuberculosis Control","2":"10.1001/jama.284.3.305","3":"284","4":"3","5":"305-307","6":"2000-07-19","7":"http://dx.doi.org/10.1001/jama.284.3.305","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Guidelines for essential trace element preparations for parenteral use. A statement by an expert panel. AMA Department of Foods and Nutrition","2":"10.1001/jama.241.19.2051","3":"241","4":"19","5":"2051-2054","6":"1979-05-11","7":"http://dx.doi.org/10.1001/jama.241.19.2051","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Severe Acute Respiratory Syndrome--Singapore, 2003","2":"10.1001/jama.289.24.3231-b","3":"289","4":"24","5":"3231-a-3234","6":"2003-06-25","7":"http://dx.doi.org/10.1001/jama.289.24.3231-b","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Recent Trends in Disability and Functioning Among Older Adults in the United States: A Systematic Review--Correction","2":"10.1001/jama.289.24.3242-a","3":"289","4":"24","5":"3242-a-3242","6":"2003-06-25","7":"http://dx.doi.org/10.1001/jama.289.24.3242-a","8":"American Medical Association (AMA)","9":"0","10":"journal-article","11":"0098-7484,1538-3598"},{"1":"Retraction","2":"10.1093/jahist/jar440","3":"98","4":"1","5":"NP-NP","6":"2011-06-01","7":"http://dx.doi.org/10.1093/jahist/jar440","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Ernie Pyle's War: America's Eyewitness to World War II.","2":"10.2307/2568210","3":"84","4":"4","5":"1568","6":"1998-03","7":"http://dx.doi.org/10.2307/2568210","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Mr. Polk's Army: The American Military Experience in the Mexican War.","2":"10.2307/2568147","3":"84","4":"4","5":"1510","6":"1998-03","7":"http://dx.doi.org/10.2307/2568147","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Huguenot Traditions in the Mountains of Kentucky: Daniel Trabue's Memories","2":"10.2307/2568083","3":"84","4":"4","5":"1313","6":"1998-03","7":"http://dx.doi.org/10.2307/2568083","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Black Jacks: African American Seamen in the Age of Sail.","2":"10.2307/2568136","3":"84","4":"4","5":"1500","6":"1998-03","7":"http://dx.doi.org/10.2307/2568136","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Guardians of Empire: The U.S. Army and the Pacific, 1902-1940.","2":"10.2307/2568161","3":"84","4":"4","5":"1522","6":"1998-03","7":"http://dx.doi.org/10.2307/2568161","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"A Cautious Patriotism: The American Churches & the Second World War.","2":"10.2307/2568206","3":"84","4":"4","5":"1564","6":"1998-03","7":"http://dx.doi.org/10.2307/2568206","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Designing Modern America: The Regional Planning Association of America and Its Members.","2":"10.2307/2568177","3":"84","4":"4","5":"1536","6":"1998-03","7":"http://dx.doi.org/10.2307/2568177","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"Trade and Gunboats: The United States and Brazil in the Age of Empire.","2":"10.2307/2568160","3":"84","4":"4","5":"1521","6":"1998-03","7":"http://dx.doi.org/10.2307/2568160","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"},{"1":"What Do We Need a Union For? The TWUA in the South, 1945-1955.","2":"10.2307/2568203","3":"84","4":"4","5":"1561","6":"1998-03","7":"http://dx.doi.org/10.2307/2568203","8":"Oxford University Press (OUP)","9":"0","10":"journal-article","11":"0021-8723"}],"options":{"columns":{"min":{},"max":[10]},"rows":{"min":[10],"max":[10]},"pages":{}}}
</script>
</div>
</div>
<div id="filtering-the-cr_journals-query-with-the-filter-argument" class="section level2">
<h2>Filtering the <code>cr_journals</code> query with the <code>filter</code> argument</h2>
<p>You can use the <code>filter</code> argument within <code>cr_journals</code> to specify some parameters as the query is executing. This filter is built into the Crossref API query. See the available filters by calling <code>rcrossref::filter_names()</code>, and details by calling <code>rcrossref::filter_details</code>. It’s also in <a href="https://github.com/CrossRef/rest-api-doc#filter-names">the API documentation</a>.</p>
<table class="table table-striped table-hover table-condensed table-responsive" style="margin-left: auto; margin-right: auto;">
<thead>
<tr>
<th style="text-align:left;">
x
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
award_funder
</td>
</tr>
<tr>
<td style="text-align:left;">
award_number
</td>
</tr>
<tr>
<td style="text-align:left;">
content_domain
</td>
</tr>
<tr>
<td style="text-align:left;">
from_accepted_date
</td>
</tr>
<tr>
<td style="text-align:left;">
from_online_pub_date
</td>
</tr>
<tr>
<td style="text-align:left;">
from_posted_date
</td>
</tr>
<tr>
<td style="text-align:left;">
from_print_pub_date
</td>
</tr>
<tr>
<td style="text-align:left;">
has_assertion
</td>
</tr>
<tr>
<td style="text-align:left;">
has_authenticated_orcid
</td>
</tr>
<tr>
<td style="text-align:left;">
has_crossmark_restriction
</td>
</tr>
<tr>
<td style="text-align:left;">
has_relation
</td>
</tr>
<tr>
<td style="text-align:left;">
location
</td>
</tr>
<tr>
<td style="text-align:left;">
relation_object
</td>
</tr>
<tr>
<td style="text-align:left;">
relation_object_type
</td>
</tr>
<tr>
<td style="text-align:left;">
relation_type
</td>
</tr>
<tr>
<td style="text-align:left;">
until_accepted_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_online_pub_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_posted_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_print_pub_date
</td>
</tr>
<tr>
<td style="text-align:left;">
has_funder
</td>
</tr>
<tr>
<td style="text-align:left;">
funder
</td>
</tr>
<tr>
<td style="text-align:left;">
prefix
</td>
</tr>
<tr>
<td style="text-align:left;">
member
</td>
</tr>
<tr>
<td style="text-align:left;">
from_index_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_index_date
</td>
</tr>
<tr>
<td style="text-align:left;">
from_deposit_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_deposit_date
</td>
</tr>
<tr>
<td style="text-align:left;">
from_update_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_update_date
</td>
</tr>
<tr>
<td style="text-align:left;">
from_pub_date
</td>
</tr>
<tr>
<td style="text-align:left;">
until_pub_date
</td>
</tr>
<tr>
<td style="text-align:left;">
has_license
</td>
</tr>
<tr>
<td style="text-align:left;">
license_url
</td>
</tr>
<tr>
<td style="text-align:left;">
license_version
</td>
</tr>
<tr>
<td style="text-align:left;">
license_delay
</td>
</tr>
<tr>
<td style="text-align:left;">
has_full_text
</td>
</tr>
<tr>
<td style="text-align:left;">
full_text_version
</td>
</tr>
<tr>
<td style="text-align:left;">
full_text_type
</td>
</tr>
<tr>
<td style="text-align:left;">
full_text_application
</td>
</tr>
<tr>
<td style="text-align:left;">
has_references
</td>
</tr>
<tr>
<td style="text-align:left;">
reference_visibility
</td>
</tr>
<tr>
<td style="text-align:left;">
has_archive
</td>
</tr>
<tr>
<td style="text-align:left;">
archive
</td>
</tr>
<tr>
<td style="text-align:left;">
has_orcid
</td>
</tr>
<tr>
<td style="text-align:left;">
orcid
</td>
</tr>
<tr>
<td style="text-align:left;">
issn
</td>
</tr>
<tr>
<td style="text-align:left;">
isbn
</td>
</tr>
<tr>
<td style="text-align:left;">
type
</td>
</tr>
<tr>
<td style="text-align:left;">
directory