fix: get the score instead of the position of an ASN
parent
07f29e865e
commit
4b7f0b8d95
|
@ -60,7 +60,7 @@ class BGPRanking():
|
||||||
'''Get the rank of a single ASN, weighted by source.'''
|
'''Get the rank of a single ASN, weighted by source.'''
|
||||||
d = self.__normalize_date(date)
|
d = self.__normalize_date(date)
|
||||||
key = f'{d}|asns|{ipversion.value}'
|
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):
|
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.'''
|
'''Get the rank of a single ASN, not weighted by source.'''
|
||||||
|
|
Loading…
Reference in New Issue