the algorithm is different to the one commented during Rome meeting [0] and what Torflow does and it seems to fail (probably related to #94)
I would change it or implement a the one commented.
[0] https://trac.torproject.org/projects/tor/wiki/org/meetings/2018Rome/Notes/BandwidthAuthorityRequirements, https://github.com/juga0/bw_scanner_notes/edit/master/docs/source/requirements.rst#L44