I've slighly modified your code to exclude SCs and focus on RvR. The problem I see there is more than 2 millions kills/deaths (and growing little by little) so you cannot scrap all the data unless you want to get flagged by Cloudflare (it happened to me on the first run) or die out of boredom; apart from the queries it is very similar to what you have done. I've waited for EU prime time today to run a 1000 kill/deaths test and things are quite even (I expected the dominance of one realm over the other tbh)
Since new data is constantly and rapidly being included the test is not as accurate as I expected before launching it. Changing the "first" variable to something lower (like 10) makes it work more consistently but much slower.
If anyone (Staff or OP) want to dig into my code just let me know.
This is the output:
![Image](https://imgur.com/bYOcvHT.png)
Regards and keep it up.