Open Ikestrman opened 2 years ago
After further investigation, it appears this is expected based on how I've configured lines #296-313 of the Primary Script, as it takes the 5 largest values in each category (heaviest home "favorites" and heaviest away "favorites") before sorting and combining for the poll options.
As we see in this case, there were quite a few home favorites, and only two away favorites (the Rays and Phillies), so the "5 heaviest away favorites" included 3 games where the away team was actually the underdog (the White Sox, Giants, and Diamondbacks).
I can potentially refactor this to do the combination before finding the largest values (may take some time since it's converted to a list midway through for processing), but for now I have simply implemented a workaround (heroku release v15) increasing the favorites numbers to 7 and 7 for each frame, which will at least give 7 poll options before there's a chance for underdogs being listed (unless there are very few games that day, in which case non-favorites would still need to be listed (which is why a >50% floor would not be a sufficient fix)).
Using Apr. 18 as an example (captured the night before), not all matchup options are being included in the poll as expected. Here were the "top ten" matchups:
The first 7 are correct, but there's another 55/45 matchup that should be shown after that (Astros over Angels), and the last three should certainly be the other way around. Copy of the .csv as of today for later investigation: