@dra2020/district-analytics 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -89707,6 +89707,8 @@ function scorePartisan(Vf, VfArray, options) {
89707
89707
  const estSf = estSeatShare(estS, N);
89708
89708
  const deviation = estDeviation(estSf, bestSf);
89709
89709
  const proportionalityScore = scoreDeviation(deviation, Vf, estSf);
89710
+ const unearnedS = estUnearnedSeats(bestS, estS);
89711
+ const impactScore = scoreImpact(unearnedS, Vf, estSf, N);
89710
89712
  // Calculate additional alternate metrics for reference
89711
89713
  const dSVpoints = inferSVpoints(Vf, VfArray, shift);
89712
89714
  const rSVpoints = invertSVPoints(dSVpoints);
@@ -89745,6 +89747,10 @@ function scorePartisan(Vf, VfArray, options) {
89745
89747
  deviation: deviation,
89746
89748
  score: proportionalityScore
89747
89749
  };
89750
+ const impactScoring = {
89751
+ unearnedS: unearnedS,
89752
+ score: impactScore
89753
+ };
89748
89754
  let competitiveScoring = {
89749
89755
  cSimple: Cn,
89750
89756
  cD: cD,
@@ -89778,6 +89784,7 @@ function scorePartisan(Vf, VfArray, options) {
89778
89784
  const averageRVf = (RWins.length > 0) ? U.avgArray(RWins) : undefined;
89779
89785
  const s = {
89780
89786
  bias: biasScoring,
89787
+ impact: impactScoring,
89781
89788
  responsiveness: competitiveScoring,
89782
89789
  dSVpoints: dSVpoints,
89783
89790
  rSVpoints: rSVpoints,