Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Represent Gravelius scores as decimal number #557

merged 2 commits into from Dec 20, 2018


None yet
2 participants
Copy link

commented Dec 14, 2018


During RRP we discussed the fact that, because of circles' nature as having the optimal perimeter-to-area shape, Gravelius scores are almost certain to be greater than 1, causing them to have a potentially confusing representation, like "Compactness: 184%", which has misleading implications about the district somehow being more compact than some theoretical maximum. The decision was to represent them as a decimal value, so instead it would be shown as "Compactness: 1.84".


  • PR has a name that won't get you publicly shamed for vagueness
  • Files changed in the PR have been yapf-ed for style violations


screen shot 2018-12-14 at 11 58 09 am

Testing Instructions

  • Enable the Gravelius calculator
    • (This was done locally by renaming the Gravelius calculator class to PolsbyPopper, then changing the map to cause the statistics to be recalculated)
  • Gravelius scores for a map should be displayed as a decimal number with 2 significant digits

Closes PT162648523

@rmartz rmartz requested a review from pcaisse Dec 14, 2018

@rmartz rmartz merged commit 05b118d into develop Dec 20, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@rmartz rmartz deleted the feature/gravelius-html-repr branch Dec 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.