@dra2020/district-analytics 14.1.1 → 14.1.2

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.
@@ -106,9 +106,15 @@ class AnalyticsSession {
106
106
  return false;
107
107
  (0, preprocess_1.doPreprocessData)(this, bLog);
108
108
  (0, analyze_1.doAnalyzeDistricts)(this, bLog);
109
+ // This does a little stuff that didn't get factored out into dra-score and then dra-analytics
109
110
  (0, analyze_1.doAnalyzePlan)(this, bLog);
111
+ // The main analytics are next
112
+ // Run legacy analytics
110
113
  this._profile = (0, score_1.profilePlan)(this, bLog);
111
114
  this._scorecard = (0, score_1.scorePlan)(this, this._profile, bLog, overridesJSON);
115
+ // TODO: Run new analytics
116
+ // TODO: Compare the new & legacy scorecards
117
+ // TODO: Set a scorecard
112
118
  (0, results_1.doAnalyzePostProcessing)(this, bLog);
113
119
  }
114
120
  catch (e) {
@@ -238,7 +244,8 @@ const dra_analytics_1 = __webpack_require__(/*! @dra2020/dra-analytics */ "@dra2
238
244
  const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
239
245
  const S = __importStar(__webpack_require__(/*! ./settings */ "./src/settings.ts"));
240
246
  const compact_1 = __webpack_require__(/*! ./compact */ "./src/compact.ts");
241
- const political_1 = __webpack_require__(/*! ./political */ "./src/political.ts");
247
+ const dra_analytics_2 = __webpack_require__(/*! @dra2020/dra-analytics */ "@dra2020/dra-analytics");
248
+ // import { fptpWin } from './political'
242
249
  // DEBUG COUNTERS
243
250
  let nMissingDataset = 0;
244
251
  let nMissingProperty = 0;
@@ -472,7 +479,7 @@ class Districts {
472
479
  demPct = demVotes / totVotes;
473
480
  repPct = repVotes / totVotes;
474
481
  othPct = othVotes / totVotes;
475
- DemSeat = (0, political_1.fptpWin)(demPct);
482
+ DemSeat = dra_analytics_2.Partisan.fptpWin(demPct);
476
483
  }
477
484
  // Total minority VAP
478
485
  let minorityPop = totalVAP - whitePop;
@@ -1642,28 +1649,6 @@ exports.doAnalyzeRacialPolarization = doAnalyzeRacialPolarization;
1642
1649
  // 11-18-2020 - Moved RPV to racial-voting package.
1643
1650
 
1644
1651
 
1645
- /***/ }),
1646
-
1647
- /***/ "./src/political.ts":
1648
- /*!**************************!*\
1649
- !*** ./src/political.ts ***!
1650
- \**************************/
1651
- /***/ ((__unused_webpack_module, exports) => {
1652
-
1653
-
1654
- //
1655
- // FAIR/PROPORTIONAL
1656
- //
1657
- Object.defineProperty(exports, "__esModule", ({ value: true }));
1658
- exports.fptpWin = void 0;
1659
- function fptpWin(demPct) {
1660
- // Vote shares should be fractions in the range [0.0 – 1.0]
1661
- //assert((demPct <= 1.0) && (demPct >= 0.0));
1662
- return ((demPct > 0.5) ? 1 : 0);
1663
- }
1664
- exports.fptpWin = fptpWin;
1665
-
1666
-
1667
1652
  /***/ }),
1668
1653
 
1669
1654
  /***/ "./src/preprocess.ts":