Giter Club home page Giter Club logo

Comments (3)

Selbosh avatar Selbosh commented on June 16, 2024

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.

from citecorp.

Selbosh avatar Selbosh commented on June 16, 2024

@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.

from citecorp.

rkrug avatar rkrug commented on June 16, 2024

Thanks - I actually need the function oc_coci_refs() which is still not working. I think it is a similar issue.

from citecorp.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.