pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
420 stars 129 forks source link

Add ORCiD ID in AuthorSearch #214

Closed astrochun closed 2 years ago

astrochun commented 2 years ago

A default Scopus Author_Search query returns metadata that includes ORCiD if available.

"prism:url": "https://api.elsevier.com/content/author/author_id/13608366900",
"dc:identifier": "AUTHOR_ID:13608366900",
"eid": "9-s2.0-13608366900",
"orcid": "0000-0002-4245-2318",
"preferred-name": {
    "surname": "Ly",
    "given-name": "Chun",
   "initials": "C."
},

However, the AuthorSearch class does not provide this. For example:

>>> test = author_search.AuthorSearch('ORCID(0000-0002-4245-2318)')
>>> test.authors
[Author(eid='9-s2.0-13608366900', surname='Ly', initials='C.', givenname='Chun', affiliation='The University of Arizona', documents=41, affiliation_id='60010065', city='Tucson', country='United States', areas='PHYS (49); EART (37); MULT (1)')]

Documentation suggests this is partly implemented - AuthorRetrieval does return such information. However, when querying for a paper, the Author Namespace does not include it. This ultimately requires a second query for a complete list of authors to get ORCiD.

Michael-E-Rose commented 2 years ago

Yes indeed, AuthorSearch() should return the ORCiD if it's there. Do you want to come up with a PR? Would be highly appreciated! Changes required in:

  1. https://github.com/pybliometrics-dev/pybliometrics/blob/master/pybliometrics/scopus/author_search.py (incl. docstring)
  2. https://github.com/pybliometrics-dev/pybliometrics/blob/master/pybliometrics/scopus/tests/test_AuthorSearch.py
  3. https://github.com/pybliometrics-dev/pybliometrics/blob/master/docs/classes/AuthorSearch.rst
astrochun commented 2 years ago

@Michael-E-Rose sure, though I might not get to it until later this month.

astrochun commented 2 years ago

While the OP is about AuthorSearch, ORCiD is also missing from abstract_retrieval. Namely, a search by a published work PID should also include the ORCID if it's available in the Scopus metadata. Should that be a separate issue + PR?

astrochun commented 2 years ago

Yes indeed, AuthorSearch() should return the ORCiD if it's there. Do you want to come up with a PR? Would be highly appreciated! Changes required in:

  1. https://github.com/pybliometrics-dev/pybliometrics/blob/master/pybliometrics/scopus/tests/test_AuthorSearch.py

Note that the test query is one that does not contain an ORCiD. I suppose that is fine since that will return None.