alarm-redist / redist

Simulation methods for legislative redistricting.
https://alarm-redist.github.io/redist/
GNU General Public License v2.0
67 stars 23 forks source link

[bug, question] `redist.metrics` measure "SmoothedSeats" output faulty? #126

Closed rodrigomontalegre closed 2 years ago

rodrigomontalegre commented 2 years ago

I have a number of simulated maps for which I would like to calculate some gerrymandering metrics. To do this I am using the redist.metrics function as explained in the documentation and I've set measure = 'all'. The code in this case looks like this:

cd_2022_metrics <- redist.metrics(
  measure = "all",
  dvote = ny_map$dem,
  rvote = ny_map$rep,
  plans = get_plans_matrix(proposal_plans)
)

While most of the metrics calculated look fine, I've noticed that the Smoothed Seats seems off. The documentation for this package defines this measure as:

SmoothedSeat computes the Smoothed Seat Count Deviation (0-1, smaller is R Bias, bigger is D Bias).

However, the SmoothedSeat values output in redist.metrics in this case are not only between 0-1. I've noticed the same thing using another redist.map object for another state.

rodrigomontalegre commented 2 years ago

I've taken another look at the documentation and paper. I think the 0-1 refers to the fractional part of the smooth seat count and the deviation itself is clearly defined, so I will consider this closed.