mggg / GerryChain

Use MCMC to analyze districting plans and gerrymanders
https://mggg.github.io/GerryChain/
Other
132 stars 74 forks source link

option to only consider populated splits #387

Closed gabeschoenbach closed 2 years ago

gabeschoenbach commented 2 years ago

This adds an optional population parameter to the compute_county_splits() function. If you pass, say, population = "TOTPOP20", the code should return only the number of counties where there are at least two units with positive TOTPOP20 in different districts.

codecov-commenter commented 2 years ago

Codecov Report

Merging #387 (4f70ca8) into main (8acd44c) will decrease coverage by 0.04%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #387      +/-   ##
==========================================
- Coverage   88.17%   88.12%   -0.05%     
==========================================
  Files          37       37              
  Lines        1666     1668       +2     
==========================================
+ Hits         1469     1470       +1     
- Misses        197      198       +1     
Impacted Files Coverage Δ
gerrychain/updaters/county_splits.py 97.36% <66.66%> (-2.64%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8acd44c...4f70ca8. Read the comment docs.