Fetches and parses metadata.json for a corpus from the scienceverse/papers
GitHub repository. This file documents provenance that is not stored in the
corpus .rds itself: how the corpus was built, what years/license it
covers, and so on. See each corpus's README.md on the
papers repository for a fuller
narrative description, including known gaps and data-quality caveats.
Arguments
- name
name of the corpus (see
papers_available())- repo
GitHub repository in "owner/repo" format; a private repository needs a GitHub token with access to it (see
github_pat())
Value
a named list of the corpus's Dublin Core metadata fields (colons
in the original dc:field names are replaced with underscores, e.g.
dc:title becomes dc_title)
Examples
# \donttest{
if (online("api.github.com")) {
# GitHub can refuse when its request limit is reached; then this says why
meta <- tryCatch(papers_metadata("jdm"),
error = function(e) message(conditionMessage(e)))
if (!is.null(meta)) meta$dc_coverage
}
#> [1] "2006-01-01/2022-12-31"
# }
