ropensci / citecorp

Client for the Open Citations Corpus
https://docs.ropensci.org/citecorp
Other
11 stars 4 forks source link

PMID / PMCIDs not returned by SPARQL endpoint #11

Closed Selbosh closed 2 weeks ago

Selbosh commented 1 year ago

The examples in the documentation for the oc_pmid2ids and pc_pcid2ids no longer seem to work, not even if you paste the corresponding queries into the Sparql sandbox on the OC web site. Possibly needs re-doing.

Originally posted by @Selbosh in https://github.com/ropensci/citecorp/issues/10#issuecomment-1609538861

Selbosh commented 2 weeks ago

This appears to be fixed in the latest version https://github.com/ropensci/citecorp/commit/71af28ea263cee324ae4ed20e745f0b6b6b476cc, which (a) replaces some examples, which, for one reason or another, don't appear to have all the same identifiers in Open Citations Corpus that they did before; and (b) fixes some magic numbers and non-robust code in oc_2ids_template() that would throw errors in certain circumstances