Closed rkrug closed 1 year ago
Looks like some functions work, but not others.
library(citecorp)
doi1 <- "10.1108/jd-12-2013-0166"
oc_coci_cites(doi1) # works
oc_coci_refs(doi1) # works
oc_coci_meta(doi1) # works
These use the REST endpoint.
But these rely on SPARQL:
oc_doi2ids(doi1) # 0 columns, 0 rows
The same type of query pasted onto the https://opencitations.net/meta/sparql sandbox seems to work:
PREFIX datacite: <http://purl.org/spar/datacite/>
PREFIX literal: <http://www.essepuntato.it/2010/06/literalreification/>
SELECT ?paper ?pmid ?pmcid ?value
WHERE {
{
?paper datacite:hasIdentifier [
datacite:usesIdentifierScheme datacite:doi ;
literal:hasLiteralValue ?value
] .
OPTIONAL {
?paper datacite:hasIdentifier [
datacite:usesIdentifierScheme datacite:pmid ;
literal:hasLiteralValue ?pmid
] .
}
OPTIONAL {
?paper datacite:hasIdentifier [
datacite:usesIdentifierScheme datacite:pmcid ;
literal:hasLiteralValue ?pmcid
] .
}
} .
VALUES ?value { "10.1093/biomet/80.3.527" }
}
returning the following output
{
"head" : {
"vars" : [ "paper", "pmid", "pmcid", "value" ]
},
"results" : {
"bindings" : [ {
"value" : {
"type" : "literal",
"value" : "10.1093/biomet/80.3.527"
},
"paper" : {
"type" : "uri",
"value" : "https://w3id.org/oc/meta/br/06250321084"
}
} ]
}
}
But when the R package does it, the results$bindings
are empty. Will try to debug this: maybe it is calling the wrong endpoint or something.
@rkrug I have just pushed a fix, which seems to work now for oc_doi2ids("10.1097/igc.0000000000000609")
and other examples I tried.
Neither oc_pmid2ids
nor oc_pmcid2ids
produce results for the examples in the Examples section of the documentation, but they give the same output as the sandbox, so that appears to be a separate issue.
Thanks - I actually need the function oc_coci_refs()
which is still not working. I think it is a similar issue.
It seems that
citecorp
is not working anymore?See transcript below.
Rainer