Look up DOIs in the corpus via the
Unpaywall API and add open-access status
and best OA URL to the works table.
This enricher is idempotent: re-running it updates existing OA data
rather than duplicating it. Requires a mailto address for API access.
Usage
sm_enrich_unpaywall(
corpus,
mailto = Sys.getenv("SCIMAPR_MAILTO"),
verbose = TRUE,
call = rlang::caller_env()
)Value
An sm_corpus object with updated oa_status and oa_url
columns in the works table, plus new provenance rows.
Examples
if (FALSE) { # \dontrun{
corpus <- sm_example_corpus()
corpus <- sm_enrich_unpaywall(corpus)
} # }