@dra2020/district-analytics 15.2.3 → 15.4.1

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.
@@ -1299,6 +1299,9 @@ These counties are split unexpectedly (meaning that they're smaller than a distr
1299
1299
  • Wilson
1300
1300
 
1301
1301
  */
1302
+ // 10-23-21 - This analysis *assumes* that a map is complete (or nearly so).
1303
+ // - We do the analysis regardless, but
1304
+ // - Protect against weird results in the client
1302
1305
  function doFindCountiesSplitUnexpectedly(s, bLog = false) {
1303
1306
  let test = s.getTest(5 /* UnexpectedCountySplits */);
1304
1307
  // THE THREE VALUES TO DETERMINE FOR A PLAN
@@ -1609,7 +1612,7 @@ const dra_analytics_1 = __webpack_require__(/*! @dra2020/dra-analytics */ "@dra2
1609
1612
  exports.estSeatProbability = dra_analytics_1.Partisan.estSeatProbability;
1610
1613
  exports.ratePartisanBias = dra_analytics_1.Rate.ratePartisanBias;
1611
1614
  exports.isAntimajoritarian = dra_analytics_1.Rate.isAntimajoritarian;
1612
- exports.avgSVError = dra_analytics_1.Rate.avgSVError;
1615
+ exports.avgSVError = dra_analytics_1.Partisan.avgSVError;
1613
1616
  exports.effectiveSplits = dra_analytics_1.Splitting.effectiveSplits;
1614
1617
  exports.uncertaintyOfMembership = dra_analytics_1.Splitting.uncertaintyOfMembership;
1615
1618
 
@@ -2291,6 +2294,13 @@ function thunkScorecard(newScorecard, bLog = false) {
2291
2294
  const scratchpad = newScorecard.scratchpad;
2292
2295
  // Partisan scorecard
2293
2296
  const pS = U.deepCopy(newScorecard.partisan);
2297
+ // EXPERIMENTAL
2298
+ const lPropAlt = newScorecard.partisan.experimental.lProp;
2299
+ if (lPropAlt)
2300
+ pS.details['lProp'] = lPropAlt;
2301
+ const lUE = newScorecard.partisan.experimental.lUE;
2302
+ if (lUE)
2303
+ pS.details['lUE'] = lUE;
2294
2304
  // Minority scorecard
2295
2305
  const mS = U.deepCopy(newScorecard.minority);
2296
2306
  // Compactness scorecard