I've been experimenting with different ranking algorithms to write a front end for when I stumbled across this - Awesome! I'm only having one issue...
I had a issue when uploading two Challonge files in one database. If I uploaded week 1 pools (11 games per player), the record count on the leaderboard and the player Match History is correct. However, when I add week 2 (13 games per player) pools the leaderboard shows more total played matches than the amount of matches actually played. If I upload week 2 then week 1, it calculates correctly in both leaderboard and player Match History, but that skews the ranks. The week 2 bracket has four new players that were not in week 1 and there were two week 1 players that are not in week 2.
Example: 24 games total for both weeks, but leaderboard counts 35. New players added in week 2 showed 24 games when it should only be 13 games. The two player's match count who were not in week 2 pools show correctly at 11 games.
I tested this in both Tio and Challonge with the exact same results. Is it something I'm doing wrong?