pybliometrics-dev / pybliometrics

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

Very different number of results from web interface and pybliometrics #227

Closed raffaem closed 2 years ago

raffaem commented 2 years ago

Question? Why the exact same query gives 900 results in the web interface and 4000 with pybliometrics?

Here is the code I use:

sres = pybliometrics.scopus.ScopusSearch(query, refresh=True)
print(f"Number of results: {len(sres.results)}")
Michael-E-Rose commented 2 years ago

What's query?

raffaem commented 2 years ago

What's query?

I cannot share it. Is it relevant?

Michael-E-Rose commented 2 years ago

Yes, because otherwise I cannot test what's going on

raffaem commented 2 years ago

Here you are:

import pybliometrics

query = f'TITLE-ABS-KEY(("C.E.O." OR "CEO" OR "Chief Executive Officer") AND ("organization* structure" OR "hierarchy" OR "hierarchical structure" OR "organizational chart"))' \
' AND (LIMIT-TO(PUBYEAR, 2020) OR LIMIT-TO(PUBYEAR, 2019) OR LIMIT-TO(PUBYEAR, 2018) OR LIMIT-TO(PUBYEAR, 2017) OR LIMIT-TO(PUBYEAR, 2016) OR LIMIT-TO(PUBYEAR, 2015) OR LIMIT-TO(PUBYEAR, 2014) OR LIMIT-TO(PUBYEAR, 2013) OR LIMIT-TO(PUBYEAR, 2012) OR LIMIT-TO(PUBYEAR, 2011))' \
' AND (LIMIT-TO(SUBJAREA, "BUSI") OR LIMIT-TO(SUBJAREA, "ECON") OR LIMIT-TO(SUBJAREA, "SOCI"))' \
' AND (LIMIT-TO(DOCTYPE, "ar"))' \
' AND (LIMIT-TO(SRCTYPE, "j"))' \
' AND (LIMIT-TO(LANGUAGE, "English"))'
print(query)

sres = pybliometrics.scopus.ScopusSearch(query, refresh=True)
print(f"Number of results: {len(sres.results)}")

Results returned by pybliometrics: 369 Results returned by the web interface: 86

Michael-E-Rose commented 2 years ago

The reason is that LIMIT-TO() doesn't work in the API. I don't know the reason, but we recently found out and put it here: https://pybliometrics.readthedocs.io/en/stable/classes/ScopusSearch.html#pybliometrics.scopus.ScopusSearch.

What's surprising however it's that your query works at all, the LIMIT-TO() is just ignored.

raffaem commented 2 years ago

ok so that was documented. Thanks!