Welcome to L13 – Using the ORCID, Sherpa Romeo, and Unpaywall APIs in R to Harvest Institutional Data! Please follow the steps below prior to the first meeting
## Quick info
* GitHub home: <https://github.com/ciakovx/fsci2022.git>
* [OSF home](https://osf.io/4dmfz/)
* [FSCI schedule](https://fsci2022.sched.com/)
* [Course syllabus](https://docs.google.com/document/d/1U3vr8rQy4hZw8RoY6dM0crGjUPVrdPYMq6mu_Nvn73s/edit)
* [Course Slack](https://fsci2022.slack.com/archives/C03MGHGN54J)
* **Email:** If you can't reach us on Slack, email clarke.iakovakis@okstate.edu
* [FSCI 2021 OSF site](https://osf.io/4dmfz/) (includes videos)
## Preparation
See a [video going through these steps](https://www.youtube.com/watch?v=D5RnrRdNnXI) below.
### Slack
Join the [FSCI2022 Slack workspace](https://fsci2022.slack.com/join/shared_invite/zt-1c4d7tzzq-_46xUvrjYWZyCqj_QepQ1A#/shared-invite/email): fsci2022.slack.com. If you need help using Slack, see [this help page](https://slack.com/help/articles/218080037-Getting-started-for-new-members) or email fsci-info@force11.org. Slack will be an important communications hub for the institute.
### ORCID
If you don't already have one, [sign up for an ORCID account](https://orcid.org/signin).
You will also need an API key, which you can obtain by following these steps:
1. Log-in to your ORCID account. In the upper right corner, click your name, then in the drop-down menu, click **Developer Tools**. Note: In order to access Developer Tools, you must verify your email address.
2. Click the **Register for the free ORCID public API** button.
3. Review and agree to the terms of service when prompted.
4. Add your name in the **Name** field, https://www.orcid.org in the **Your Website URL** field, “Getting public API key” in **Description** field, and https://www.orcid.org in the **redirect URI** field. Click the diskette button to save.
5. A gray box will appear including your **Client ID** and **Client Secret**. You will use these to authenticate
* Create a text file to save your API keys for easy access. Paste the Client Secret and the Client ID keys into that file.
### RStudio Cloud
You will also need an account on Rstudio Cloud. You can either [sign up directly with them](https://login.rstudio.cloud/register), or just [log-in with a Google or GitHub account](https://login.rstudio.cloud/login).
After you have logged in, click on **New Project**, then **New project from Git Repository**. Paste the following URL in the box: https://github.com/ciakovx/fsci2022.git and click **OK**.
Optionally, if you are an experienced RStudio Desktop Application user, click on **File > New Project > Version Control > Git** and paste this URL into the box https://github.com/ciakovx/fsci2022.git , decide where you want to save it, and click **Create Project**
### Sherpa Romeo
You will also need an API key for Sherpa-Romeo, [sign up here](https://v2.sherpa.ac.uk/cgi/register) then click on Admin to see your API key.
* We have found the notification email can get caught in university spam filters, so consider using an email address other than .edu, or add help@jisc.ac.uk to your email whitelist
* Log-in to your account and click the Admin tab. Your API key will be displayed.
* Paste this key into your API keys file.
### Find your university's Ringgold ID
The easiest way to do this is to do the following:
* Sign in to your ORCID account and scroll down to Employment. Click the Add button.
* Start typing your institution. When it appears, click it. Click Save changes.
* On your orcid profile, click Show more detail. Your institution’s Ringgold ID may be displayed.
* If you don't see it there, look up your institution on [Wikidata](https://www.wikidata.org/)
* You can also [look it up in the Ringgold database](https://www.ringgold.com/identify-online-guests/) but you must register to use this service.
* Paste this number into your separate text file.
## Preparation help video
@[youtube](https://www.youtube.com/watch?v=D5RnrRdNnXI)
## API Documentation & help
* [Which fields does the ORCID Search API support?](https://info.orcid.org/faq/which-fields-does-the-orcid-search-api-support/)
* [ORCID API](https://info.orcid.org/documentation/features/public-api/)
* [Crossref API docs](https://api.crossref.org/)
* [Sherpa Romeo API documentation](https://v2.sherpa.ac.uk/api/)
* [Sherpa Romeo API Swagger UI](https://app.swaggerhub.com/apis/gobfrey/v2.sherpa-api/2.2)
## R help
### 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
* [Complete list of RStudio cheatsheets](https://github.com/rstudio/cheatsheets/)
### Learning R
1. swirl is a package you can install in R to learn about R and data science interactively. Just type install.packages("swirl") into your R console, load the package by typing library("swirl"), and then type swirl(). Read more at <http://swirlstats.com/>
2. learnr is another package for learning R interactively. Click on the Tutorial tab in the upper right corner of R Studio, in the environment pane
3. [Try R](http://tryr.codeschool.com/) is a browser-based interactive tutorial developed by Code School.
4. [Cookbook for R](http://www.cookbook-r.com/) by Winston Change provides solutions to common tasks and problems in analyzing data
Books:
* [R For Data Science](http://r4ds.had.co.nz/) by Garrett Grolemund & Hadley Wickham [free]
* [An Introduction to Data Cleaning with R](https://cran.r-project.org/doc/contrib/de_Jonge+van_der_Loo-Introduction_to_data_cleaning_with_R.pdf) by Edwin de Jonge & Mark van der Loo [free]
* [YaRrr! The Pirate’s Guide to R](https://bookdown.org/ndphillips/YaRrr/) by Nathaniel D. Phillips [free]
* Springer’s [Use R!](https://link.springer.com/bookseries/6991) series [not free] is mostly specialized, but it has some excellent introductions including Alain F. Zuur et al.’s [A Beginner’s Guide to R](https://link.springer.com/book/10.1007/978-0-387-93837-0) and Phil Spector’s [Data Manipulation in R](https://link.springer.com/book/10.1007/978-0-387-74731-6)
## Use cases
* Who relies on Crossref metadata? https://www.crossref.org/services/metadata-retrieval/user-stories/
* Introduction to roadoi (see “Use Case: Studying the compliance with open access policies”) https://cran.r-project.org/web/packages/roadoi/vignettes/intro.html
* Using R packages to populate IR (Irine Tanudjaja) https://itanudjaja.github.io/project.html
* Introduction to ORCID Researcher Identifiers in R with rorcid (Paul Oldham) https://www.pauloldham.net/introduction-to-orcid-with-rorcid/
* Creating a bibliography with rcrossref (Paul Oldham) https://www.pauloldham.net/creating-a-bibliography-with-rcrossref/
* Accessing the Scientific Literature with CrossRef (Paul Oldham) https://poldham.github.io/abs/crossref.html
Updating your CV with packages (Erin Buchanan) https://www.aggieerin.com/post/updating-your-cv-with-packages/