-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfsci_syllabus.Rmd
More file actions
336 lines (237 loc) · 18.7 KB
/
fsci_syllabus.Rmd
File metadata and controls
336 lines (237 loc) · 18.7 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
---
title: "FSCI 2021: W25 Syllabus - Working with Scholarly Literature in R: Pulling, Wrangling, Cleaning, and Analyzing Structured Bibliographic Metadata."
author: "Clarke Iakovakis, Kay Bjornen, Megan Macken"
output:
html_document:
df_print: paged
toc: true
toc_float:
collapsed: false
smooth_scroll: false
toc_depth: 2
---
# Intro
Hello everyone. we are looking forward to our session at [FSCI 2021](https://www.force11.org/fsci/2021) on ["W25 - Working with Scholarly Literature in R: Pulling, Wrangling, Cleaning, and Analyzing Structured Bibliographic Metadata."](https://www.force11.org/fsci/2021/course-list-abstracts#W25)
This entire course is distributed under a [Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/).
The OSF home is at <https://osf.io/vpgbt/>. Here you can find each day's components laid out clearly, as well as links to the live Zoom sessions. While FSCI is in session, this link is only available to people enrolled in the class. The FSCI course Slack can be found at <https://fsci2021.slack.com/>--participants will already be added to the `w25_working_with_scholarly_literature_in_r` channel.
Click the button below to launch the Binder for the entire repository:
[](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master)
<https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master>
To view the course structure and exercises, see below [Course Schedule](#course-schedule):
# Course Information
**Title:** Working with Scholarly Literature in R: Pulling, Wrangling, Cleaning, and Analyzing Structured Bibliographic Metadata
**Instructors:**
* Clarke Iakovakis, Scholarly Services Librarian, Oklahoma State University, <https://experts.okstate.edu/clarke.iakovakis>
* Kay Bjornen, Research Data Initiatives Librarian, Oklahoma State University, <https://experts.okstate.edu/kay.bjornen>
* Megan Macken, Digital Scholarship Librarian, Oklahoma State University, <https://experts.okstate.edu/megan.macken>
**Course Website:** <https://ciakovx.github.io/fsci_syllabus.html>
**Acknowledgments:** Acknowledgements for this course go to the organizations and developers who have created the APIs we have used and made them open--namely Crossref, Orcid, and Unpaywall; those who have created the software, packages and tools we are using--namely the R Core Team, the RStudio Team, Hadley Wickham, Karthik Ram, Najko Jahn, Scott Chamberlain, rOpenSci, Yihui Xie, Garrett Grolemund, Linus Torvalds, Scott Chacon, Ben Straub, Git, GitHub, The Binder Project, Project Jupyter, and see also the [package citations](#package-citations); and finally those who have created enormously helpful resources for learning and teaching R--namely Roger Peng, Jeff Leek, Coursera, the Carpentries, Lisa Federer, Paul Oldham, Brad Boehmke, Edwin de Jonge and Mark van der Loo. I have benefitted from many, many more have dedicated their time, labor, and effort that I have overlooked. It is only due to the generosity and dedication of these people and organizations I am able to put this class together.
# Description:
Developers have created a number of packages for accessing the scholarly literature in R over the last several years, among them `rcrossref`, `rorcid`, and `roadoi.` These packages make use of the APIs in their systems to allow users to execute specific queries and pull the structured data into R, where it can be reshaped, merged with other data, and analyzed. This session will be based on the workshop I provided at last year's FSCI. The course will assume no experience with R; however, a thorough explanation of the R programming language will not be provided.
The course will a mixture of pre-recorded videos and synchronous meeting for discussion and Q&A sessions.
Students will access IPNYB (Jupyter Notebooks) files containing the scripts for the workshop, created with [binder](https://mybinder.org/). The files will include executable code alongside descriptions of what the code is doing. Students can therefore run code that has already been written, but will also write and execute their own R scripts within the Jupyter Notebooks environment. Students will access these notebooks while watching the videos explaining the code.
We will begin with a general orientation of the Jupyter Notebooks environment. We will then discuss R and provide a basic overview of how it works. This introduction will include reading data into R, installing packages, and some functions for cleaning and restructuring data. We will then discuss Crossref, ORCID, and Unpaywall, and the packages developed by the [rOpenSci](https://ropensci.org/) organization to access the API services of these organizations, and walk through `rcrossref`, `roadoi`, and `rorcid`.
* `rcrossref` interfaces with the CrossRef API, allowing users to pull article metadata based on ISSN, filter queries by publication date and license information, running queries by title and author, getting funder data, getting citation counts, and exporting to BibTeX, RIS, and CSV. This can be immensely powerful for collecting citation data, conducting literature reviews, creating bibliographies, and more.
* `roadoi` interfaces with Unpaywall, allowing users to input a set of DOIs and return publication information along with potential locations of open access versions.
* `rorcid` interfaces with the ORCID API, allowing users to pull publication data based on a specific ORCID iD, or to input names and other identifying information to find a specific individual’s identifier.
As we work through the tutorials, students will continue to learn R functions for working with data, including `dplyr`, `purrr`, and `tidyr`.
By the conclusion of the session, students will be able to work with and analyze data in R. On a deeper level, they will have more powerful tools for gathering subsets of the scholarly literature in clean and structured formats based on specific parameters. Because they will be walking away with executable scripts, they will be able to modify those and collect data based on parameters they are interested in.
# Level:
All levels
# Intended audience:
This course is intended for scholarly communications librarians, repository managers, research funders, publishers, bibliometricians, and managers of Research Information Management Systems (RIMS).
# Requirements:
Students will need a computer with internet access. It will not be necessary to download R or R Studio, as all code will be executed in Jupyter Notebooks in the browser, hosted by binder. Students are required to register for an ORCID iD at <https://orcid.org/>.
# Course Learning Objectives
A participant in this course will, at the end of the course, be able to:
* Use R to complete a range of data tasks, including understanding R syntax and data types, installing and loading packages, reading data from files and APIs, and executing functions for tidying and analyzing data.
* Use the `rorcid` package in R to extract data from ORCID profiles, including authenticating with the ORCID API, finding ORCID iDs by name/affiliation, getting author biographical information, and getting works associated with individuals.
* Use the `rcrossref` and `roadoi` packages in R to extract data from the Crossref and Unpaywall database, including authenticating with the Crossref API, forming queries, getting publication information, getting data on articles, converting articles to BibTeX/RIS, getting citation data, and checking for open access versions.
# Course Topics
This course will cover these topics:
* Introduction to Binder and Jupyter Notebooks
* Introduction to `rcrossref` and `roadoi`
* Introduction to `rorcid`
# Course Schedule
See the course OSF for Zoom links: <https://osf.io/vpgbt>
Sched home: <https://sched.co/iON7>
**ALL TIMES PACIFIC**
[Convert time](https://www.thetimezoneconverter.com/)
## DAY ONE: Wednesday, July 28
### Live Zoom Sessions
* 9:00-10:00 AM: Session 1
* 5:00-6:00 PM: REPEAT Session 1
### Exercises
Try to complete this by beginning of class, but it's fine if you push it until after we meet. I'll be discussing some of this during that session.
**1. Using Binder & Jupyter Notebooks: 30 minutes (*required*)**
* This lesson is required. It will cover the basics of what Binder is, what Jupyter Notebooks are, and how to use them.
* Launch the Using Jupyter Notebooks Jupyter Notebook at [](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=using_jupyter_notebooks.ipynb)
* Watch the [Using Jupyter Notebooks video tutorial](https://www.youtube.com/watch?v=3EKe_4zU4B0) (25 min.)
{width="90%"}
**2. Introduction to R: 30 minutes (*optional*)**
* This lesson is optional. It will cover my background, what R is, considerations in adopting R, and some useful help resources.
* No Jupyter Notebook or video tutorial for this lesson
* Skim the [Introduction to R](IntroductionToR.html) webpage.
**3. R Basics: 30 minutes (*required*)**
* This lesson is required. It will cover writing expressions, calling functions, creating and subsetting vectors, and working with data frames.
* Launch the R Basics Jupyter Notebook at [](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=RBasics.ipynb)
* Skim the [R Basics](RBasics.html) webpage. Most of this content is covered in the R Basics Jupyter Notebook.
* Watch the [R Basics video tutorial](https://www.youtube.com/watch?v=f1wkanaYhVA) (30 min.)
{width="90%"}
**4. Data Exploration: 1 hour (*required*)**
* This lesson is required. It will cover getting data into R, exploring and transforming data, particularly using `dplyr`. Some of these functions will be used in the `rcrossref` and `rorcid` tutorials, but they will be explained as we are running through them.
* Launch the Data Exploration Jupyter Notebook at [](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=DataExploration.ipynb)
Skim the Data Exploration webpage at <https://ciakovx.github.io/DataExploration.html>.
* Watch the [Data Exploration video tutorial](https://youtu.be/O8q7fg1dFUU) (1 hour).
@[youtube](https://youtu.be/O8q7fg1dFUU)
{width="90%"}
---
## DAY TWO: Monday, August 2
**ALL TIMES PACIFIC**
[Convert time](https://www.thetimezoneconverter.com/)
### Live Zoom Sessions
* 9:00-10:00 AM: Session 2
* 5:00-6:00 PM: REPEAT Session 2
### Exercises
**5. Exploring Data in Lists: 1 hour (*optional but recommended*)**
* This lesson is optional, but highly recommended if you are planning on applying these lessons further. It is a tutorial on using `purrr` to explore and extract data from lists. Our API calls pull data into our session in nested lists, so this tutorial is helpful for managing that.
* Launch the Exploring Data in Lists Jupyter Notebook at [](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=jennybc_lists_lesson.ipynb)
* Skim the [Exploring Data in Lists](fsci2020/jennybc_lists_lesson.html) webpage.
* Watch the [Exploring Data in Lists video tutorial](https://youtu.be/F57EorEYRMM) (40 mins.)
{width="90%"}
**6. Using `rcrossref` & `roadoi`: 1.5 hours (*required*)**
* This lesson is required. It will cover intro to Crossref, the Crossref API, and rcrossref, getting publication and article data by journal, keyword, and author. Constructing and filtering queries. Writing to CSV, BibTeX, and RIS. Using roadoi to query the Unpaywall API for open access availability. Getting URLs and downloading full text.
* Launch the `rcrossref` & `roadoi` Jupyter Notebook at [](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=rcrossref.ipynb)
* Skim the * [rcrossref](rcrossref.html) webpage. Much of this content is identical to that on the Jupyter Notebook.
* Watch the [`rcrossref` and `roadoi` video tutorial](https://youtu.be/dy-raTcj0no) (1.25 hrs).
{width="90%"}
---
## DAY THREE: Wednesday, Aug. 4
### Live Zoom Sessions
* 9:00-10:00 AM: Session 3
* 5:00-6:00 PM: REPEAT Session 3
**ALL TIMES PACIFIC**
[Convert time](https://www.thetimezoneconverter.com/)
### Exercises
**7. Using `rorcid`: 1 hour (*required*)**
* This lesson is required. It will cover authenticating your ORCID key, finding ORCID iDs with names, affiliation, emails, keywords, works; getting and cleaning biographical information, and getting and cleaning employment information.
* Access the `rorcid` Jupyter Notebook at [](https://mybinder.org/v2/gh/ciakovx/ciakovx.github.io/master?filepath=rorcid.ipynb)
* Watch the [`rorcid` video tutorial](https://youtu.be/elxtFVGoUMI)
* Skim the [rorcid](rorcid.html) webpage. Much of this content is identical to that on the Jupyter Notebook.
{width="90%"}
# Course Materials and Supplies Required
Students will need a computer with internet access, time, patience, and tenacity. No software downloads are required.
# Other Resources
The more time you spend reviewing the lessons on the course webpage and practicing R, the better.
Here are some useful cheat sheets:
* [Base R Cheat Sheet](https://paulvanderlaken.files.wordpress.com/2017/08/base-r-cheetsheat.pdf) by Mhairi McNeill
* [Data Transformation with dplyr Cheat Sheet](https://github.com/rstudio/cheatsheets/blob/master/data-transformation.pdf) by RStudio
* [Data Wrangling with dplyr and tidyr Cheat Sheet](https://paulvanderlaken.files.wordpress.com/2017/08/ddplyr-cheatsheet-data-wrangling-plyr.pdf) by RStudio
* [Jupyter Notebooks Cheat Sheet](https://www.edureka.co/blog/wp-content/uploads/2018/10/Jupyter_Notebook_CheatSheet_Edureka.pdf)
* [Complete list of RStudio cheatsheets](https://github.com/rstudio/cheatsheets/)
# Package citations
`anytime`
Dirk Eddelbuettel (2020). anytime: Anything to 'POSIXct' or 'Date'
Converter. R package version 0.3.8.
<https://CRAN.R-project.org/package=anytime>
`Binder`
Jupyter et al., "Binder 2.0 - Reproducible, Interactive, Sharable
Environments for Science at Scale." Proceedings of the 17th Python
in Science Conference. 2018. <https://doi.org/10.25080/Majora-4af1f417-011>
`dplyr`
Hadley Wickham, Romain François, Lionel Henry and Kirill Müller
(2020). dplyr: A Grammar of Data Manipulation. R package version
1.0.0. <https://CRAN.R-project.org/package=dplyr>
`httpuv`
Joe Cheng and Winston Chang (2020). httpuv: HTTP and WebSocket Server
Library. R package version 1.5.4.
<https://CRAN.R-project.org/package=httpuv>
`httr`
Hadley Wickham (2020). httr: Tools for Working with URLs and HTTP. R
package version 1.4.2. <https://CRAN.R-project.org/package=httr>
`janitor`
Sam Firke (2020). janitor: Simple Tools for Examining and Cleaning
Dirty Data. R package version 2.0.1.
<https://CRAN.R-project.org/package=janitor>
`jsonlite`
Jeroen Ooms (2014). The jsonlite Package: A Practical and Consistent
Mapping Between JSON Data and R Objects. arXiv:1403.2805 [stat.CO] URL
<https://arxiv.org/abs/1403.2805>.
`Jupyter Notebooks`
Kluyver, Thomas, Benjamin Ragan-Kelley, Fernando Pérez, Brian E. Granger,
Matthias Bussonnier, Jonathan Frederic, Kyle Kelley et al.
"Jupyter Notebooks-a publishing format for reproducible computational workflows."
In ELPUB, pp. 87-90. 2016.
<https://eprints.soton.ac.uk/403913/1/STAL9781614996491-0087.pdf>
`kableExtra`
Hao Zhu (2019). kableExtra: Construct Complex Table with 'kable' and
Pipe Syntax. R package version 1.1.0.
<https://CRAN.R-project.org/package=kableExtra>
`knitr`
Yihui Xie (2020). knitr: A General-Purpose Package for Dynamic Report
Generation in R. R package version 1.29.
`listviewer`
Jos de Jong, Mac Gainer and Kent Russell (2019). listviewer:
'htmlwidget' for Interactive Views of R Lists. R package version
3.0.0. <https://CRAN.R-project.org/package=listviewer>
`lubridate`
Garrett Grolemund, Hadley Wickham (2011). Dates and Times Made Easy
with lubridate. Journal of Statistical Software, 40(3), 1-25. URL
<http://www.jstatsoft.org/v40/i03/>.
`magrittr`
Stefan Milton Bache and Hadley Wickham (2014). magrittr: A
Forward-Pipe Operator for R. R package version 1.5.
<https://CRAN.R-project.org/package=magrittr>
`png`
Simon Urbanek (2013). png: Read and write PNG images. R package
version 0.1-7. <https://CRAN.R-project.org/package=png>
`purrr`
Lionel Henry and Hadley Wickham (2020). purrr: Functional Programming
Tools. R package version 0.3.4.
<https://CRAN.R-project.org/package=purrr>
`R`
R Core Team (2019). R: A language and environment for statistical
computing. R Foundation for Statistical Computing, Vienna, Austria.
URL <https://www.R-project.org/>.
`rcrossref`
Scott Chamberlain, Hao Zhu, Najko Jahn, Carl Boettiger and Karthik Ram
(2020). rcrossref: Client for Various 'CrossRef' 'APIs'. R package
version 1.0.0. <https://CRAN.R-project.org/package=rcrossref>
`repurrrsive`
Jennifer Bryan (2019). repurrrsive: Examples of Recursive Lists and
Nested or Split Data Frames. R package version 1.0.0.
<https://CRAN.R-project.org/package=repurrrsive>
`readr`
Hadley Wickham, Jim Hester and Romain Francois (2018). readr: Read
Rectangular Text Data. R package version 1.3.1.
<https://CRAN.R-project.org/package=readr>
`roadoi`
Najko Jahn (2019). roadoi: Find Free Versions of Scholarly
Publications via Unpaywall. R package version 0.6.
<https://CRAN.R-project.org/package=roadoi>
`rmarkdown`
JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi
and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and
Winston Chang and Richard Iannone (2020). rmarkdown: Dynamic Documents
for R. R package version 2.3. URL <https://rmarkdown.rstudio.com>.
`rorcid`
Scott Chamberlain (2020). rorcid: Interface to the 'Orcid.org' API.
<https://github.com/ropensci/rorcid> (devel),
<https://docs.ropensci.org/rorcid> (docs).
`RStudio`
RStudio Team (2020). RStudio: Integrated Development for R. RStudio,
PBC, Boston, MA URL <http://www.rstudio.com/>.
`stringr`
Hadley Wickham (2019). stringr: Simple, Consistent Wrappers for Common
String Operations. R package version 1.4.0.
<https://CRAN.R-project.org/package=stringr>
`tibble`
Kirill Müller and Hadley Wickham (2020). tibble: Simple Data Frames. R
package version 3.0.3. <https://CRAN.R-project.org/package=tibble>
`tidyr`
Hadley Wickham and Lionel Henry (2020). tidyr: Tidy Messy Data. R
package version 1.1.0. <https://CRAN.R-project.org/package=tidyr>
`usethis`
Hadley Wickham and Jennifer Bryan (2020). usethis: Automate Package
and Project Setup. R package version 1.6.1.
<https://CRAN.R-project.org/package=usethis>