I used au.affiliation_history to get the affiliation history from a list of Authors ID. It worked great but now I am trying to pair the affiliation history with the Year in which the researcher served in the institution that appear in the affiliation history results.
However, I cannot find the way to do this. Is is possible to do this? If so, can you please give me a hint or idea how can I achieve this?
Unfortunately, the information Scopus shares on an author profile on scopus.com is not the same they share via the Author Retrieval API. I think the only way to get to yearly affiliations is to extract them from the publications that you get from the Scopus Search API.
yearly_affsthen contains a list of all affiliations recorded in publications for that year.Naturally, the list will contain duplicates. If you don't like that, use
set()andupdate()instead.The
.split("-")part foraffsis for multiple affiliations (when the researcher reports multiple affiliations on a paper. You might want to use the first reported instead. Then use[0]at the end andappend()in the next row.Also, there will likely be gaps. I recommend turning the
yearly_affsinto a pandas DataFrame, select for each year the main affiliation, and then fill gaps forward or backward.