@dra2020/district-analytics 5.3.2 → 5.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.
@@ -1119,15 +1119,15 @@ const Poly = __importStar(__webpack_require__(/*! @dra2020/poly */ "@dra2020/pol
1119
1119
  function extractDistrictProperties(s, bLog = false) {
1120
1120
  // NOTE - I am assuming that district IDs are integers 1–N
1121
1121
  for (let i = 1; i <= s.state.nDistricts; i++) {
1122
- let poly = s.districts.getDistrictShapeByID(i);
1122
+ const poly = s.districts.getDistrictShapeByID(i);
1123
1123
  // Guard against no shape for empty districts AND null shapes
1124
- let bNull = !Poly.polyNormalize(poly);
1125
- if (poly && (!bNull)) {
1124
+ const bNull = Poly.polyNull(poly);
1125
+ if (!bNull) {
1126
1126
  // TODO - OPTIMIZE: Bundle these calls?
1127
- let area = Poly.polyAreaFlat(poly);
1128
- let perimeter = Poly.polyPerimeterFlat(poly);
1129
- let diameter = Poly.polyDiameterFlat(poly);
1130
- let props = [0, 0, 0]; // TODO - TERRY?!?
1127
+ const area = Poly.polyAreaFlat(poly);
1128
+ const perimeter = Poly.polyPerimeterFlat(poly);
1129
+ const diameter = Poly.polyDiameterFlat(poly);
1130
+ const props = [0, 0, 0]; // TODO - TERRY?!?
1131
1131
  props[0 /* Area */] = area;
1132
1132
  props[1 /* Diameter */] = diameter;
1133
1133
  props[2 /* Perimeter */] = perimeter;
@@ -1472,15 +1472,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
1472
1472
  result["default"] = mod;
1473
1473
  return result;
1474
1474
  };
1475
- var __importDefault = (this && this.__importDefault) || function (mod) {
1476
- return (mod && mod.__esModule) ? mod : { "default": mod };
1477
- };
1478
1475
  Object.defineProperty(exports, "__esModule", { value: true });
1479
1476
  const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
1480
1477
  const S = __importStar(__webpack_require__(/*! ./settings */ "./src/settings.ts"));
1481
1478
  const D = __importStar(__webpack_require__(/*! ./_data */ "./src/_data.ts"));
1482
1479
  const analyze_1 = __webpack_require__(/*! ./analyze */ "./src/analyze.ts");
1483
- const state_reqs_json_1 = __importDefault(__webpack_require__(/*! ../static/state-reqs.json */ "./static/state-reqs.json"));
1484
1480
  function prepareRequirementsChecklist(s, bLog = false) {
1485
1481
  if (!(s.bPostProcessingDone)) {
1486
1482
  doAnalyzePostProcessing(s);
@@ -1512,10 +1508,9 @@ function prepareRequirementsChecklist(s, bLog = false) {
1512
1508
  const embeddedDistrictsDetail = U.deepCopy(freeOfHolesTest['details']['embeddedDistricts']) || [];
1513
1509
  const populationDeviationDetail = U.deepCopy(equalPopulationTest['details']['deviation']);
1514
1510
  const deviationThresholdDetail = U.trim(s.populationDeviationThreshold());
1515
- const xx = s.state.xx;
1516
- // TODO - JSON: Is there a better / easier way to work with the variable?
1517
- const stateReqsDict = state_reqs_json_1.default;
1518
- const reqLinkToStateReqs = stateReqsDict[xx];
1511
+ // const xx: string = s.state.xx;
1512
+ // const stateReqsDict: T.Dict = allStateReqs;
1513
+ // const reqLinkToStateReqs: string = stateReqsDict[xx];
1519
1514
  // Populate the category
1520
1515
  paRequirements = {
1521
1516
  score: reqScore,
@@ -1537,7 +1532,7 @@ function prepareRequirementsChecklist(s, bLog = false) {
1537
1532
  census: U.deepCopy(s.config['descriptions']['CENSUS']),
1538
1533
  },
1539
1534
  resources: {
1540
- stateReqs: reqLinkToStateReqs
1535
+ // stateReqs: reqLinkToStateReqs
1541
1536
  }
1542
1537
  };
1543
1538
  }
@@ -2439,17 +2434,6 @@ module.exports = JSON.parse("{\"AL\":{\"Black\":[7],\"Hispanic\":[],\"Pacific\":
2439
2434
 
2440
2435
  /***/ }),
2441
2436
 
2442
- /***/ "./static/state-reqs.json":
2443
- /*!********************************!*\
2444
- !*** ./static/state-reqs.json ***!
2445
- \********************************/
2446
- /*! exports provided: AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, default */
2447
- /***/ (function(module) {
2448
-
2449
- module.exports = JSON.parse("{\"AL\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_01.pdf\",\"AK\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_02.pdf\",\"AZ\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_03.pdf\",\"AR\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_04.pdf\",\"CA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_05.pdf\",\"CO\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_06.pdf\",\"CT\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_07.pdf\",\"DE\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_08.pdf\",\"FL\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_09.pdf\",\"GA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_10.pdf\",\"HI\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_11.pdf\",\"ID\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_12.pdf\",\"IL\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_13.pdf\",\"IN\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_14.pdf\",\"IA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_15.pdf\",\"KS\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_16.pdf\",\"KY\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_17.pdf\",\"LA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_18.pdf\",\"ME\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_19.pdf\",\"MD\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_20.pdf\",\"MA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_21.pdf\",\"MI\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_22.pdf\",\"MN\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_23.pdf\",\"MS\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_24.pdf\",\"MO\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_25.pdf\",\"MT\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_26.pdf\",\"NE\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_27.pdf\",\"NV\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_28.pdf\",\"NH\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_29.pdf\",\"NJ\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_30.pdf\",\"NM\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_31.pdf\",\"NY\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_32.pdf\",\"NC\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_33.pdf\",\"ND\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_34.pdf\",\"OH\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_35.pdf\",\"OK\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_36.pdf\",\"OR\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_37.pdf\",\"PA\":\"https://www.brennancenter.org/sites/default/files/publications/2018_05_50States_FINALsinglepages_38.pdf\",\"RI\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_39.pdf\",\"SC\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_40.pdf\",\"SD\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_41.pdf\",\"TN\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_42.pdf\",\"TX\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_43.pdf\",\"UT\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_44.pdf\",\"VT\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_45.pdf\",\"VA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_46.pdf\",\"WA\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_47.pdf\",\"WV\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_48.pdf\",\"WI\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_49.pdf\",\"WY\":\"https://www.brennancenter.org/sites/default/files/publications/2019_06_50States_FINALsinglepages_50.pdf\"}");
2450
-
2451
- /***/ }),
2452
-
2453
2437
  /***/ "./static/vra5-preclearance.json":
2454
2438
  /*!***************************************!*\
2455
2439
  !*** ./static/vra5-preclearance.json ***!