I used the numbers in old stats files to reverse engineer some equations and figure out what the bug is.
TotalBattles * Raw% * 2 = Raw
Plugging the first few December numbers into that equation, you get
x * .30128 * 2 = 1278656 (Landorus-Therian)
y * .17859 * 2 = 757957 (Tapu Koko)
z * .15206 * 2 = 645361 (Greninja-Ash)
Taking the average of those x y and y values gives 2122052.85859. On a hunch, I divided that by the incorrect Total Battles number 1159 and got... 1830.93430422, the incorrect Avg weight/team number.
Looks like an operation was accidentally reversed somewhere.
(So, if anyone else obsessively needs to get the total battles numbers before the stats script is re-run, you can calculate it yourself like this)