fix: get the score instead of the position of an ASN

pull/12/head
Raphaël Vinot 2018-04-10 23:28:52 +02:00
parent 07f29e865e
commit 4b7f0b8d95
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class BGPRanking():
'''Get the rank of a single ASN, weighted by source.'''
d = self.__normalize_date(date)
key = f'{d}|asns|{ipversion.value}'
return self.ranking.zrank(key, asn)
return self.ranking.zscore(key, asn)
def asn_rank_by_source(self, asn: int, source: str, date: Dates= datetime.date.today(), ipversion: IPVersion=IPVersion.v4):
'''Get the rank of a single ASN, not weighted by source.'''