Make percentile calculations 1-(p-1)/(n-1).
authorAnt Zucaro <azucaro@gmail.com>
Tue, 9 Apr 2013 02:06:57 +0000 (22:06 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Tue, 9 Apr 2013 02:06:57 +0000 (22:06 -0400)
xonstat/views/player.py

index c023ba492c6bdebe3d4a033158467fbf199e28e7..e3b385337cd5ccffea7befdec97d0162374041d7 100644 (file)
@@ -346,7 +346,7 @@ def get_ranks(player_id):
     for row in raw_ranks:
         rank = Rank(rank=row.rank,
             max_rank=row.max_rank,
-            percentile=100 - 100*float(row.rank)/row.max_rank,
+            percentile=100 - 100*float(row.rank-1)/(row.max_rank-1),
             game_type_cd=row.game_type_cd)