Open access copies of scholarly publications are sometimes hard to find. Some are published in open access journals. Others are made freely available as preprints before publication, and others are deposited in institutional repositories, digital archives maintained by universities and research institutions. This document guides you to roadoi, a R client that makes it easy to search for these open access copies by interfacing the oaDOI.org service where DOIs are matched with full-text links in open access journals and archives.

About oaDOI.org

oaDOI.org, developed and maintained by the team of Impactstory, is a non-profit service that finds open access copies of scholarly literature simply by looking up a DOI (Digital Object Identifier). It not only returns open access full-text links, but also helpful metadata about the open access status of a publication such as licensing or provenance information.

oaDOI uses different data sources to find open access full-texts including:

Basic usage

There is one major function to talk with oaDOI.org, oadoi_fetch(), taking DOIs and your email address as required arguments.

library(roadoi)
roadoi::oadoi_fetch(dois = c("10.1186/s12864-016-2566-9",
                             "10.1016/j.cognition.2014.07.007"), 
                    email = "name@example.com")
## # A tibble: 2 × 20
##                                       `_best_open_url` `_closed_base_ids`
##                                                  <chr>             <list>
## 1             http://doi.org/10.1186/s12864-016-2566-9         <list [0]>
## 2 http://hdl.handle.net/11858/00-001M-0000-0024-2A9E-8          <chr [1]>
## # ... with 18 more variables: `_green_base_collections` <list>,
## #   `_open_base_ids` <list>, `_open_urls` <list>, doi <chr>,
## #   doi_resolver <chr>, evidence <chr>, found_green <lgl>,
## #   found_hybrid <lgl>, free_fulltext_url <chr>, is_boai_license <lgl>,
## #   is_free_to_read <lgl>, is_subscription_journal <lgl>, license <chr>,
## #   oa_color <chr>, oa_color_long <chr>,
## #   reported_noncompliant_copies <list>, url <chr>, year <int>

What’s returned?

According to the oaDOI.org API specification, the following variables with the following definitions are returned:

  • _best_open_url: Link to free full-text
  • doi: the requested DOI
  • doi_resolver: Possible values:
    • crossref
    • datacite
  • evidence: A phrase summarizing the step of the open access detection process where the free_fulltext_url was found.
  • found_green :logical indicating whether a self-archived copy in a repository was found
  • found_hybrid: logical indicating whether an open access article was published in a toll-access journal
  • free_fulltext_url: The URL where we found a free-to-read version of the DOI. None when no free-to-read version was found.
  • green_base_collections: internal collection ID from the Bielefeld Academic Search Engine (BASE)
  • is_boai_license: TRUE whenever the license indications Creative Commons - Attribution (CC BY), Creative Commons CC - Universal(CC 0)) or Public Domain were found. These permissive licenses comply with the highly-regarded BOAI definition of Open access
  • is_free_to_read: TRUE whenever the free_fulltext_url is not None.
  • is_subscription_journal: TRUE whenever the journal is not in the Directory of Open Access Journals or DataCite. Please note that there might be a time-lag between the first publication of an open access journal and its registration in the DOAJ.
  • license: Contains the name of the Creative Commons license associated with the free_fulltext_url, whenever one was found. Example: “cc-by”.
  • oa_color: Possible values:
    • green
    • gold
    • blue
  • _open_base_ids: ids of oai metadata records with open access full-text links collected by the Bielefeld Academic Search Engine (BASE)
  • _open_urls: full-text urls
  • reported_noncompliant_copies links to free full-texts found provided by service often considered as non compliant with open access policies and guidelines
  • url: the canonical DOI URL
  • year: year of publication

Any API restrictions?

There are no API restrictions. However, providing your email address when using this client is required by oaDOI.org. Set email address in your .Rprofile file with the option roadoi_email when you are tired to type in your email address every time you want to call oadDOI.

options(roadoi_email = "name@example.com")

Keeping track of crawling

To follow your API call, and to estimate the time until completion, use the .progress parameter inherited from plyr to display a progress bar.

roadoi::oadoi_fetch(dois = c("10.1186/s12864-016-2566-9",
                             "10.1016/j.cognition.2014.07.007"), 
                    email = "name@example.com", 
                    .progress = "text")
## 
  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |================================                                 |  50%
  |                                                                       
  |=================================================================| 100%
## # A tibble: 2 × 20
##                                       `_best_open_url` `_closed_base_ids`
##                                                  <chr>             <list>
## 1             http://doi.org/10.1186/s12864-016-2566-9         <list [0]>
## 2 http://hdl.handle.net/11858/00-001M-0000-0024-2A9E-8          <chr [1]>
## # ... with 18 more variables: `_green_base_collections` <list>,
## #   `_open_base_ids` <list>, `_open_urls` <list>, doi <chr>,
## #   doi_resolver <chr>, evidence <chr>, found_green <lgl>,
## #   found_hybrid <lgl>, free_fulltext_url <chr>, is_boai_license <lgl>,
## #   is_free_to_read <lgl>, is_subscription_journal <lgl>, license <chr>,
## #   oa_color <chr>, oa_color_long <chr>,
## #   reported_noncompliant_copies <list>, url <chr>, year <int>

Use Case: Studying the compliance with open access policies

An increasing number of universities, research organisations and funders have launched open access policies in recent years. Using roadoi together with other R-packages makes it easy to examine how and to what extent researchers comply with these policies in a reproducible and transparent manner. In particular, the rcrossref package, maintained by rOpenSci, provides many helpful functions for this task.

Gathering DOIs representing scholarly publications

DOIs have become essential for referencing scholarly publications, and thus many digital libraries and institutional databases keep track of these persistent identifiers. For the sake of this vignette, instead of starting with a pre-defined set of publications originating from these sources, we simply generate a random sample of 100 DOIs registered with Crossref by using the rcrossref package.

library(dplyr)
library(rcrossref)
# get a random sample of DOIs and metadata describing these works
random_dois <- rcrossref::cr_r(sample = 100) %>%
  rcrossref::cr_works() %>%
  .$data
random_dois
## # A tibble: 100 × 35
##       alternative.id
##                <chr>
## 1  S0584854702001532
## 2                   
## 3                   
## 4                   
## 5                   
## 6   0003269766900224
## 7                   
## 8               9547
## 9                   
## 10                  
## # ... with 90 more rows, and 34 more variables: container.title <chr>,
## #   created <chr>, deposited <chr>, DOI <chr>, funder <list>,
## #   indexed <chr>, ISBN <chr>, ISSN <chr>, issue <chr>, issued <chr>,
## #   license_date <chr>, license_URL <chr>, license_delay.in.days <chr>,
## #   license_content.version <chr>, link <list>, member <chr>, page <chr>,
## #   prefix <chr>, publisher <chr>, reference.count <chr>, score <chr>,
## #   source <chr>, subject <chr>, title <chr>, type <chr>, URL <chr>,
## #   volume <chr>, assertion <list>, author <list>,
## #   `clinical-trial-number` <list>, update.policy <chr>, subtitle <chr>,
## #   archive <chr>, abstract <chr>

Let’s see when these random publications were published

random_dois %>%
  # convert to years
  mutate(issued, issued = lubridate::parse_date_time(issued, c('y', 'ymd', 'ym'))) %>%
  mutate(issued, issued = lubridate::year(issued)) %>%
  group_by(issued) %>%
  summarize(pubs = n()) %>%
  arrange(desc(pubs))
## # A tibble: 46 × 2
##    issued  pubs
##     <dbl> <int>
## 1    2015     9
## 2      NA     8
## 3    2011     7
## 4    2009     6
## 5    1998     4
## 6    2007     4
## 7    1996     3
## 8    2000     3
## 9    2003     3
## 10   2005     3
## # ... with 36 more rows

and of what type they are

random_dois %>%
  group_by(type) %>%
  summarize(pubs = n()) %>%
  arrange(desc(pubs))
## # A tibble: 8 × 2
##                  type  pubs
##                 <chr> <int>
## 1     journal-article    79
## 2        book-chapter     6
## 3 proceedings-article     6
## 4           component     3
## 5             dataset     2
## 6           monograph     2
## 7                book     1
## 8     reference-entry     1

Calling oaDOI.org

Now let’s call oaDOI.org

oa_df <- roadoi::oadoi_fetch(dois = random_dois$DOI, email = "name@example.com")

and merge the resulting information about open access full-text links with our Crossref metadata-set

my_df <- dplyr::left_join(oa_df, random_dois, by = c("doi" = "DOI"))
my_df
## # A tibble: 100 × 54
##    `_best_open_url` `_closed_base_ids` `_green_base_collections`
##               <chr>             <list>                    <list>
## 1              <NA>         <list [0]>                <list [0]>
## 2              <NA>         <list [0]>                <list [0]>
## 3              <NA>         <list [0]>                <list [0]>
## 4              <NA>         <list [0]>                <list [0]>
## 5              <NA>         <list [0]>                <list [0]>
## 6              <NA>         <list [0]>                <list [0]>
## 7              <NA>         <list [0]>                <list [0]>
## 8              <NA>         <list [0]>                <list [0]>
## 9              <NA>         <list [0]>                <list [0]>
## 10             <NA>         <list [0]>                <list [0]>
## # ... with 90 more rows, and 51 more variables: `_open_base_ids` <list>,
## #   `_open_urls` <list>, doi <chr>, doi_resolver <chr>, evidence <chr>,
## #   found_green <lgl>, found_hybrid <lgl>, free_fulltext_url <chr>,
## #   is_boai_license <lgl>, is_free_to_read <lgl>,
## #   is_subscription_journal <lgl>, license <chr>, oa_color <chr>,
## #   oa_color_long <chr>, reported_noncompliant_copies <list>, url <chr>,
## #   year <int>, alternative.id <chr>, container.title <chr>,
## #   created <chr>, deposited <chr>, funder <list>, indexed <chr>,
## #   ISBN <chr>, ISSN <chr>, issue <chr>, issued <chr>, license_date <chr>,
## #   license_URL <chr>, license_delay.in.days <chr>,
## #   license_content.version <chr>, link <list>, member <chr>, page <chr>,
## #   prefix <chr>, publisher <chr>, reference.count <chr>, score <chr>,
## #   source <chr>, subject <chr>, title <chr>, type <chr>, URL <chr>,
## #   volume <chr>, assertion <list>, author <list>,
## #   `clinical-trial-number` <list>, update.policy <chr>, subtitle <chr>,
## #   archive <chr>, abstract <chr>

Reporting

After gathering the data, reporting with R is very straightforward. You can even generate dynamic reports using R Markdown and related packages, thus making your study reproducible and transparent for others.

To display how many full-text links were found and which sources were used in a nicely formatted markdown-table using the knitr-package:

my_df %>%
  group_by(evidence) %>%
  summarise(Articles = n()) %>%
  mutate(Proportion = Articles / sum(Articles)) %>%
  arrange(desc(Articles)) %>%
  knitr::kable()
evidence Articles Proportion
closed 79 0.79
oa repository (via BASE title and first author match) 6 0.06
hybrid (via crossref license) 4 0.04
oa journal (via journal title in doaj) 4 0.04
oa journal (via publisher name) 3 0.03
oa repository (via pmcid lookup) 3 0.03
oa repository (via BASE title match) 1 0.01

How many of them are provided as green or gold open access?

my_df %>%
  group_by(oa_color) %>%
  summarise(Articles = n()) %>%
  mutate(Proportion = Articles / sum(Articles)) %>%
  arrange(desc(Articles)) %>%
  knitr::kable()
oa_color Articles Proportion
NA 79 0.79
green 10 0.10
gold 7 0.07
blue 4 0.04

Let’s take a closer look and assess how green and gold is distributed over publication types?

my_df %>%
  filter(!evidence == "closed") %>% 
  count(oa_color, type, sort = TRUE) %>% 
  knitr::kable()
oa_color type n
green journal-article 10
blue journal-article 4
gold journal-article 4
gold component 3