pybliometrics
pybliometrics copied to clipboard
Deduplicate list of fields per author in AuthorSearch()
trafficstars
Apparently it can happen that an author has duplicated publication counts by field.
For instance, the result of AuthorSearch('authlast(selten) and authfirst(reinhard)') (our test case) has:
[{'@abbrev': 'ECON', '@frequency': '51', '$': 'Economics, Econometrics and Finance (all)'},
{'@abbrev': 'ECON', '@frequency': '21', '$': 'Economics, Econometrics and Finance (all)'},
{'@abbrev': 'BUSI', '@frequency': '8', '$': 'Business, Management and Accounting (all)'}]
We should deduplicate this and sum same entries. So that the result of:
s1 = AuthorSearch('authlast(selten) and authfirst(reinhard)', refresh=30)
print(s1.authors[0].areas)
is ECON (72); BUSI (8).