pybliometrics-dev / pybliometrics

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

New Scopus Author IDs, ScopusSearch() return results with the new ID #162

Closed raffaem closed 4 years ago

raffaem commented 4 years ago

I think the following author changed his SCOPUS ID for some reason.

But ScopusSearch returns the search results even if you pass the old ID. The problem is that the publications report the new ID.

Moreover, AuthorRetrieval works with both the old and the new ID.

I would expect some more consistent behavior (like ScopusSearch and AuthorRetrieval to stop working under the old ID).

Is there some way to retrieve the new ID from the old one?

from pybliometrics.scopus import ScopusSearch
from pybliometrics.scopus import AuthorRetrieval
from pprint import pprint
auid = 56962874000
res = ScopusSearch(f"AU-ID({auid})")
pub0 = dict(res.results[0]._asdict())
#pprint(pub0)
pub0_authids = pub0["author_ids"]
index = pub0_authids.find(str(auid))
print(index) #returns -1

au = AuthorRetrieval(auid)
print(au.given_name)
print(au.surname)
print(pub0["author_names"]) #Schwenke is the third author

new_id = pub0["author_ids"][2]
au = AuthorRetrieval(auid)
print(au.given_name)
print(au.surname)
raffaem commented 4 years ago

I found out AuthorRetrieval .identifier and .historical_identifier objects!

Michael-E-Rose commented 4 years ago

Yes, and I also wanted to point at https://pybliometrics.readthedocs.io/en/stable/tips.html#database-updates.

The reason that the old IDs still work is that Scopus forwards from the merged profiles. Using the .identifier property of a fresh AuthorRetrieval() object you can find out whether the current ID is the same as the one you used. pybliometrics will throw some kind of warning if that's not the case.

For the Scopus Search API no such validation test is possible.