@dra2020/district-analytics 8.2.3 → 8.2.4

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
@@ -90407,7 +90407,7 @@ function combineTwoPolys(poly1, poly2) {
90407
90407
  throw 'Unable to load union function from polygon-clipping';
90408
90408
  return _union(poly1, poly2);
90409
90409
  }
90410
- // FEATURE 3: REOCK -- Reock is the primary measure of the dispersion of district
90410
+ // FEATURE 3: REOCK - Reock is the primary measure of the dispersion of district
90411
90411
  // shapes, calculated as “the area of the distric to the area of the minimum spanning
90412
90412
  // circle that can enclose the district.”
90413
90413
  //
@@ -90531,12 +90531,17 @@ exports.featureizePoly = featureizePoly;
90531
90531
  //
90532
90532
  // COMPACTNESS PACKAGE API
90533
90533
  //
90534
- function __export(m) {
90535
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
90536
- }
90537
90534
  Object.defineProperty(exports, "__esModule", { value: true });
90538
- __export(__webpack_require__(/*! ./features */ "./src/features.ts"));
90539
- __export(__webpack_require__(/*! ./kiwysi */ "./src/kiwysi.ts"));
90535
+ var features_1 = __webpack_require__(/*! ./features */ "./src/features.ts");
90536
+ exports.calcXSymmetry = features_1.calcXSymmetry;
90537
+ exports.calcYSymmetry = features_1.calcYSymmetry;
90538
+ exports.calcReock = features_1.calcReock;
90539
+ exports.calcBoundingBox = features_1.calcBoundingBox;
90540
+ exports.calcPolsbyPopper = features_1.calcPolsbyPopper;
90541
+ exports.calcConvexHullFeature = features_1.calcConvexHullFeature;
90542
+ exports.calcSchwartzberg = features_1.calcSchwartzberg;
90543
+ var kiwysi_1 = __webpack_require__(/*! ./kiwysi */ "./src/kiwysi.ts");
90544
+ exports.scoreShapes = kiwysi_1.scoreShapes;
90540
90545
 
90541
90546
 
90542
90547
  /***/ }),
@@ -90566,7 +90571,7 @@ exports.scoreShape = scoreShape;
90566
90571
  function scoreShapes(shapes, options) {
90567
90572
  let scores = [];
90568
90573
  for (let i = 0; i < shapes.features.length; i++) {
90569
- scores.push(scoreShape(shapes.features[i]));
90574
+ scores.push(scoreShape(shapes.features[i], options));
90570
90575
  }
90571
90576
  return scores;
90572
90577
  }
@@ -282727,13 +282732,9 @@ function scorePlan(s, p, bLog = false, overridesJSON) {
282727
282732
  // Add minority notes
282728
282733
  scorecard.minority.details['majorityMinority'] = M.getMajorityMinority(s);
282729
282734
  scorecard.minority.details['vraPreclearance'] = M.getVRASection5(s);
282730
- // TODO - KIWYSI
282731
282735
  // Add KIWYSI compactness score
282732
- if (('kiwysi' in s.config) && (s.config['kiwysi'])) {
282733
- console.log("Scoring KIWYSI compactness ...");
282734
- const kiwysiScore = C.scoreKIWYSICompactness(s, bLog);
282735
- scorecard.compactness.details['kiwysi'] = kiwysiScore;
282736
- }
282736
+ const kiwysiScore = C.scoreKIWYSICompactness(s, bLog);
282737
+ scorecard.compactness.details['kiwysi'] = kiwysiScore;
282737
282738
  return scorecard;
282738
282739
  }
282739
282740
  exports.scorePlan = scorePlan;