SciSciCollective / pyscisci

Science of Science
MIT License
165 stars 22 forks source link

Typo in the disruption index calculation when windows is provided #22

Closed filipinascimento closed 3 months ago

filipinascimento commented 3 months ago

I believe there is an issue with the current code used to calculate disruption, in particular there is a typo regarding the cited and citing entries in when getting the citation groups if a time window is provided as parameter. The entries are reverted.

citation_groups = pub2ref.loc[cite_sub].groupby('CitingPublicationId', sort = False)['CitedPublicationId']

was supposed to be:

citation_groups = pub2ref.loc[cite_sub].groupby('CitedPublicationId', sort = False)['CitingPublicationId']

in line 66.

This PR fixes that issue.