@dra2020/district-analytics 10.5.2 → 11.0.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.
- package/README.md +2 -1
- package/dist/district-analytics.js +234 -270
- package/dist/district-analytics.js.map +1 -1
- package/dist/src/settings.d.ts +0 -1
- package/dist/src/types.d.ts +3 -1
- package/package.json +1 -1
- package/dist/cli.js +0 -283941
- package/dist/cli.js.map +0 -1
|
@@ -8,41 +8,115 @@
|
|
|
8
8
|
else
|
|
9
9
|
root["district-analytics"] = factory();
|
|
10
10
|
})(global, function() {
|
|
11
|
-
return /******/ (()
|
|
12
|
-
/******/
|
|
13
|
-
/******/ var
|
|
11
|
+
return /******/ (function(modules) { // webpackBootstrap
|
|
12
|
+
/******/ // The module cache
|
|
13
|
+
/******/ var installedModules = {};
|
|
14
|
+
/******/
|
|
15
|
+
/******/ // The require function
|
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
|
17
|
+
/******/
|
|
18
|
+
/******/ // Check if module is in cache
|
|
19
|
+
/******/ if(installedModules[moduleId]) {
|
|
20
|
+
/******/ return installedModules[moduleId].exports;
|
|
21
|
+
/******/ }
|
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
|
23
|
+
/******/ var module = installedModules[moduleId] = {
|
|
24
|
+
/******/ i: moduleId,
|
|
25
|
+
/******/ l: false,
|
|
26
|
+
/******/ exports: {}
|
|
27
|
+
/******/ };
|
|
28
|
+
/******/
|
|
29
|
+
/******/ // Execute the module function
|
|
30
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
+
/******/
|
|
32
|
+
/******/ // Flag the module as loaded
|
|
33
|
+
/******/ module.l = true;
|
|
34
|
+
/******/
|
|
35
|
+
/******/ // Return the exports of the module
|
|
36
|
+
/******/ return module.exports;
|
|
37
|
+
/******/ }
|
|
38
|
+
/******/
|
|
39
|
+
/******/
|
|
40
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
+
/******/ __webpack_require__.m = modules;
|
|
42
|
+
/******/
|
|
43
|
+
/******/ // expose the module cache
|
|
44
|
+
/******/ __webpack_require__.c = installedModules;
|
|
45
|
+
/******/
|
|
46
|
+
/******/ // define getter function for harmony exports
|
|
47
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
+
/******/ }
|
|
51
|
+
/******/ };
|
|
52
|
+
/******/
|
|
53
|
+
/******/ // define __esModule on exports
|
|
54
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
+
/******/ }
|
|
58
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
+
/******/ };
|
|
60
|
+
/******/
|
|
61
|
+
/******/ // create a fake namespace object
|
|
62
|
+
/******/ // mode & 1: value is a module id, require it
|
|
63
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
+
/******/ // mode & 4: return value when already ns object
|
|
65
|
+
/******/ // mode & 8|1: behave like require
|
|
66
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
+
/******/ if(mode & 8) return value;
|
|
69
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
+
/******/ var ns = Object.create(null);
|
|
71
|
+
/******/ __webpack_require__.r(ns);
|
|
72
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
+
/******/ return ns;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
+
/******/ __webpack_require__.n = function(module) {
|
|
79
|
+
/******/ var getter = module && module.__esModule ?
|
|
80
|
+
/******/ function getDefault() { return module['default']; } :
|
|
81
|
+
/******/ function getModuleExports() { return module; };
|
|
82
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
+
/******/ return getter;
|
|
84
|
+
/******/ };
|
|
85
|
+
/******/
|
|
86
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
+
/******/
|
|
89
|
+
/******/ // __webpack_public_path__
|
|
90
|
+
/******/ __webpack_require__.p = "";
|
|
91
|
+
/******/
|
|
92
|
+
/******/
|
|
93
|
+
/******/ // Load entry module and return exports
|
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts");
|
|
95
|
+
/******/ })
|
|
96
|
+
/************************************************************************/
|
|
97
|
+
/******/ ({
|
|
14
98
|
|
|
15
99
|
/***/ "./src/_api.ts":
|
|
16
100
|
/*!*********************!*\
|
|
17
101
|
!*** ./src/_api.ts ***!
|
|
18
102
|
\*********************/
|
|
19
|
-
|
|
103
|
+
/*! no static exports found */
|
|
104
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20
105
|
|
|
106
|
+
"use strict";
|
|
21
107
|
|
|
22
108
|
//
|
|
23
109
|
// THE NODE PACKAGE API
|
|
24
110
|
//
|
|
25
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
28
|
-
}) : (function(o, m, k, k2) {
|
|
29
|
-
if (k2 === undefined) k2 = k;
|
|
30
|
-
o[k2] = m[k];
|
|
31
|
-
}));
|
|
32
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
33
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
34
|
-
}) : function(o, v) {
|
|
35
|
-
o["default"] = v;
|
|
36
|
-
});
|
|
37
111
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
38
112
|
if (mod && mod.__esModule) return mod;
|
|
39
113
|
var result = {};
|
|
40
|
-
if (mod != null) for (var k in mod) if (
|
|
41
|
-
|
|
114
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
115
|
+
result["default"] = mod;
|
|
42
116
|
return result;
|
|
43
117
|
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule",
|
|
45
|
-
|
|
118
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
119
|
+
const Poly = __importStar(__webpack_require__(/*! @dra2020/poly */ "@dra2020/poly"));
|
|
46
120
|
const Score = __importStar(__webpack_require__(/*! @dra2020/dra-score */ "@dra2020/dra-score"));
|
|
47
121
|
const preprocess_1 = __webpack_require__(/*! ./preprocess */ "./src/preprocess.ts");
|
|
48
122
|
const analyze_1 = __webpack_require__(/*! ./analyze */ "./src/analyze.ts");
|
|
@@ -50,19 +124,27 @@ const score_1 = __webpack_require__(/*! ./score */ "./src/score.ts");
|
|
|
50
124
|
const results_1 = __webpack_require__(/*! ./results */ "./src/results.ts");
|
|
51
125
|
const results_2 = __webpack_require__(/*! ./results */ "./src/results.ts");
|
|
52
126
|
const minority_1 = __webpack_require__(/*! ./minority */ "./src/minority.ts");
|
|
53
|
-
const Poly = __importStar(__webpack_require__(/*! @dra2020/poly */ "@dra2020/poly"));
|
|
54
127
|
const D = __importStar(__webpack_require__(/*! ./_data */ "./src/_data.ts"));
|
|
55
128
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
56
129
|
class AnalyticsSession {
|
|
57
130
|
constructor(SessionRequest) {
|
|
131
|
+
this.legislativeDistricts = false; // 2020
|
|
58
132
|
this.config = {};
|
|
59
133
|
this.bOneTimeProcessingDone = false;
|
|
60
134
|
this.bPlanAnalyzed = false;
|
|
61
135
|
this.bPostProcessingDone = false;
|
|
62
136
|
this.tests = {};
|
|
63
137
|
this.title = SessionRequest['title'];
|
|
64
|
-
this.legislativeDistricts = SessionRequest['legislativeDistricts'];
|
|
65
138
|
this.config = this.processConfig(SessionRequest['config']);
|
|
139
|
+
// 2020 - Set the CD / LD toggle:
|
|
140
|
+
// * If 2020, use the PlanType, if given.
|
|
141
|
+
// * If 2020, use the legacy LD toggle, if given.
|
|
142
|
+
// * Otherwise assume CD's.
|
|
143
|
+
// * Use the LD population deviation threshold for districts that are not CD's.
|
|
144
|
+
if ((this.config.cycle == 2020) && (SessionRequest['planType'] !== undefined))
|
|
145
|
+
this.legislativeDistricts = (SessionRequest['planType'] == 'congress');
|
|
146
|
+
else if ((this.config.cycle == 2010) && (SessionRequest['legislativeDistricts'] !== undefined))
|
|
147
|
+
this.legislativeDistricts = SessionRequest['legislativeDistricts'];
|
|
66
148
|
this.state = new D.State(this, SessionRequest['stateXX'], SessionRequest['nDistricts']);
|
|
67
149
|
this.counties = new D.Counties(this, SessionRequest['counties']);
|
|
68
150
|
this.graph = new D.Graph(this, SessionRequest['graph']);
|
|
@@ -72,8 +154,14 @@ class AnalyticsSession {
|
|
|
72
154
|
}
|
|
73
155
|
processConfig(config) {
|
|
74
156
|
// Default the Census & redistricting cycle to 2010
|
|
75
|
-
if (!(U.keyExists('cycle', config)))
|
|
157
|
+
if (!(U.keyExists('cycle', config))) {
|
|
76
158
|
config['cycle'] = 2010;
|
|
159
|
+
// DEBUG
|
|
160
|
+
console.log("Cycle was not set explicitly on the session request.");
|
|
161
|
+
}
|
|
162
|
+
// DEBUG
|
|
163
|
+
console.log("Cycle = ", config['cycle']);
|
|
164
|
+
console.log("Shapes = ", this.config['datasets']["SHAPES" /* SHAPES */], ": ", this.config['descriptions']['SHAPES']);
|
|
77
165
|
return config;
|
|
78
166
|
}
|
|
79
167
|
// Using the the data in the analytics session, calculate all the
|
|
@@ -190,33 +278,22 @@ exports.AnalyticsSession = AnalyticsSession;
|
|
|
190
278
|
/*!**********************!*\
|
|
191
279
|
!*** ./src/_data.ts ***!
|
|
192
280
|
\**********************/
|
|
193
|
-
|
|
281
|
+
/*! no static exports found */
|
|
282
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
194
283
|
|
|
284
|
+
"use strict";
|
|
195
285
|
|
|
196
286
|
//
|
|
197
287
|
// DATA ABSTRACTION LAYER
|
|
198
288
|
//
|
|
199
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
200
|
-
if (k2 === undefined) k2 = k;
|
|
201
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
202
|
-
}) : (function(o, m, k, k2) {
|
|
203
|
-
if (k2 === undefined) k2 = k;
|
|
204
|
-
o[k2] = m[k];
|
|
205
|
-
}));
|
|
206
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
207
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
208
|
-
}) : function(o, v) {
|
|
209
|
-
o["default"] = v;
|
|
210
|
-
});
|
|
211
289
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
212
290
|
if (mod && mod.__esModule) return mod;
|
|
213
291
|
var result = {};
|
|
214
|
-
if (mod != null) for (var k in mod) if (
|
|
215
|
-
|
|
292
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
293
|
+
result["default"] = mod;
|
|
216
294
|
return result;
|
|
217
295
|
};
|
|
218
|
-
Object.defineProperty(exports, "__esModule",
|
|
219
|
-
exports.Graph = exports.invertPlan = exports.Plan = exports.State = exports.Counties = exports.Features = exports.Districts = void 0;
|
|
296
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
220
297
|
const G = __importStar(__webpack_require__(/*! @dra2020/dra-graph */ "@dra2020/dra-graph"));
|
|
221
298
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
222
299
|
const S = __importStar(__webpack_require__(/*! ./settings */ "./src/settings.ts"));
|
|
@@ -705,8 +782,6 @@ class Features {
|
|
|
705
782
|
this._session = s;
|
|
706
783
|
this._data = data;
|
|
707
784
|
this._keys = keys;
|
|
708
|
-
// For debugging PVI
|
|
709
|
-
// console.log("Election dataset =", this._keys[Dataset.ELECTION]);
|
|
710
785
|
}
|
|
711
786
|
nFeatures() { return this._data.features.length; }
|
|
712
787
|
featureByIndex(i) { return this._data.features[i]; }
|
|
@@ -947,14 +1022,15 @@ exports.Graph = Graph;
|
|
|
947
1022
|
/*!************************!*\
|
|
948
1023
|
!*** ./src/analyze.ts ***!
|
|
949
1024
|
\************************/
|
|
950
|
-
|
|
1025
|
+
/*! no static exports found */
|
|
1026
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
951
1027
|
|
|
1028
|
+
"use strict";
|
|
952
1029
|
|
|
953
1030
|
//
|
|
954
1031
|
// ANALYZE A PLAN
|
|
955
1032
|
//
|
|
956
|
-
Object.defineProperty(exports, "__esModule",
|
|
957
|
-
exports.doDeriveSecondaryTests = exports.doAnalyzePlan = exports.doAnalyzeDistricts = void 0;
|
|
1033
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
958
1034
|
const valid_1 = __webpack_require__(/*! ./valid */ "./src/valid.ts");
|
|
959
1035
|
const equal_1 = __webpack_require__(/*! ./equal */ "./src/equal.ts");
|
|
960
1036
|
const cohesive_1 = __webpack_require__(/*! ./cohesive */ "./src/cohesive.ts");
|
|
@@ -1002,33 +1078,22 @@ exports.doDeriveSecondaryTests = doDeriveSecondaryTests;
|
|
|
1002
1078
|
/*!*************************!*\
|
|
1003
1079
|
!*** ./src/cohesive.ts ***!
|
|
1004
1080
|
\*************************/
|
|
1005
|
-
|
|
1081
|
+
/*! no static exports found */
|
|
1082
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1006
1083
|
|
|
1084
|
+
"use strict";
|
|
1007
1085
|
|
|
1008
1086
|
//
|
|
1009
1087
|
// SPLITTING of counties & districts
|
|
1010
1088
|
//
|
|
1011
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1012
|
-
if (k2 === undefined) k2 = k;
|
|
1013
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1014
|
-
}) : (function(o, m, k, k2) {
|
|
1015
|
-
if (k2 === undefined) k2 = k;
|
|
1016
|
-
o[k2] = m[k];
|
|
1017
|
-
}));
|
|
1018
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1019
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1020
|
-
}) : function(o, v) {
|
|
1021
|
-
o["default"] = v;
|
|
1022
|
-
});
|
|
1023
1089
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1024
1090
|
if (mod && mod.__esModule) return mod;
|
|
1025
1091
|
var result = {};
|
|
1026
|
-
if (mod != null) for (var k in mod) if (
|
|
1027
|
-
|
|
1092
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
1093
|
+
result["default"] = mod;
|
|
1028
1094
|
return result;
|
|
1029
1095
|
};
|
|
1030
|
-
Object.defineProperty(exports, "__esModule",
|
|
1031
|
-
exports.doFindSplitVTDs = exports.doFindCountiesSplitUnexpectedly = void 0;
|
|
1096
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1032
1097
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
1033
1098
|
// NOTE - The active code is below the long multi-line section to be deleted.
|
|
1034
1099
|
// ANALYZE SIMPLE COUNTY & VTD SPLITTING
|
|
@@ -1184,33 +1249,22 @@ exports.doFindSplitVTDs = doFindSplitVTDs;
|
|
|
1184
1249
|
/*!************************!*\
|
|
1185
1250
|
!*** ./src/compact.ts ***!
|
|
1186
1251
|
\************************/
|
|
1187
|
-
|
|
1252
|
+
/*! no static exports found */
|
|
1253
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1188
1254
|
|
|
1255
|
+
"use strict";
|
|
1189
1256
|
|
|
1190
1257
|
//
|
|
1191
1258
|
// COMPACT
|
|
1192
1259
|
//
|
|
1193
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1194
|
-
if (k2 === undefined) k2 = k;
|
|
1195
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1196
|
-
}) : (function(o, m, k, k2) {
|
|
1197
|
-
if (k2 === undefined) k2 = k;
|
|
1198
|
-
o[k2] = m[k];
|
|
1199
|
-
}));
|
|
1200
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1201
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1202
|
-
}) : function(o, v) {
|
|
1203
|
-
o["default"] = v;
|
|
1204
|
-
});
|
|
1205
1260
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1206
1261
|
if (mod && mod.__esModule) return mod;
|
|
1207
1262
|
var result = {};
|
|
1208
|
-
if (mod != null) for (var k in mod) if (
|
|
1209
|
-
|
|
1263
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
1264
|
+
result["default"] = mod;
|
|
1210
1265
|
return result;
|
|
1211
1266
|
};
|
|
1212
|
-
Object.defineProperty(exports, "__esModule",
|
|
1213
|
-
exports.scoreKIWYSICompactness = exports.extractDistrictProperties = void 0;
|
|
1267
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1214
1268
|
const Poly = __importStar(__webpack_require__(/*! @dra2020/poly */ "@dra2020/poly"));
|
|
1215
1269
|
const Compactness = __importStar(__webpack_require__(/*! @dra2020/compactness */ "@dra2020/compactness"));
|
|
1216
1270
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
@@ -1307,14 +1361,15 @@ exports.scoreKIWYSICompactness = scoreKIWYSICompactness;
|
|
|
1307
1361
|
/*!**********************!*\
|
|
1308
1362
|
!*** ./src/equal.ts ***!
|
|
1309
1363
|
\**********************/
|
|
1310
|
-
|
|
1364
|
+
/*! no static exports found */
|
|
1365
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1311
1366
|
|
|
1367
|
+
"use strict";
|
|
1312
1368
|
|
|
1313
1369
|
//
|
|
1314
1370
|
// EQUAL POPULATION
|
|
1315
1371
|
//
|
|
1316
|
-
Object.defineProperty(exports, "__esModule",
|
|
1317
|
-
exports.doHasEqualPopulations = void 0;
|
|
1372
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1318
1373
|
// NOTE - This validity check is *derived* and depends on population deviation %
|
|
1319
1374
|
// being computed (above) and normalized in test log & scorecard generation.
|
|
1320
1375
|
function doHasEqualPopulations(s, bLog = false) {
|
|
@@ -1351,26 +1406,21 @@ exports.doHasEqualPopulations = doHasEqualPopulations;
|
|
|
1351
1406
|
/*!**********************!*\
|
|
1352
1407
|
!*** ./src/index.ts ***!
|
|
1353
1408
|
\**********************/
|
|
1354
|
-
|
|
1409
|
+
/*! no static exports found */
|
|
1410
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1355
1411
|
|
|
1412
|
+
"use strict";
|
|
1356
1413
|
|
|
1357
1414
|
//
|
|
1358
1415
|
// THE DISTRICT-ANALYTICS NODE PACKAGE API
|
|
1359
1416
|
//
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
1368
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1369
|
-
};
|
|
1370
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1371
|
-
__exportStar(__webpack_require__(/*! ./_api */ "./src/_api.ts"), exports);
|
|
1372
|
-
__exportStar(__webpack_require__(/*! ./results */ "./src/results.ts"), exports);
|
|
1373
|
-
__exportStar(__webpack_require__(/*! ./types */ "./src/types.ts"), exports);
|
|
1417
|
+
function __export(m) {
|
|
1418
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
1419
|
+
}
|
|
1420
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1421
|
+
__export(__webpack_require__(/*! ./_api */ "./src/_api.ts"));
|
|
1422
|
+
__export(__webpack_require__(/*! ./results */ "./src/results.ts"));
|
|
1423
|
+
__export(__webpack_require__(/*! ./types */ "./src/types.ts"));
|
|
1374
1424
|
|
|
1375
1425
|
|
|
1376
1426
|
/***/ }),
|
|
@@ -1379,40 +1429,29 @@ __exportStar(__webpack_require__(/*! ./types */ "./src/types.ts"), exports);
|
|
|
1379
1429
|
/*!*************************!*\
|
|
1380
1430
|
!*** ./src/minority.ts ***!
|
|
1381
1431
|
\*************************/
|
|
1382
|
-
|
|
1432
|
+
/*! no static exports found */
|
|
1433
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1383
1434
|
|
|
1435
|
+
"use strict";
|
|
1384
1436
|
|
|
1385
1437
|
//
|
|
1386
1438
|
// PROTECTS MINORITIES
|
|
1387
1439
|
//
|
|
1388
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1389
|
-
if (k2 === undefined) k2 = k;
|
|
1390
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1391
|
-
}) : (function(o, m, k, k2) {
|
|
1392
|
-
if (k2 === undefined) k2 = k;
|
|
1393
|
-
o[k2] = m[k];
|
|
1394
|
-
}));
|
|
1395
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1396
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1397
|
-
}) : function(o, v) {
|
|
1398
|
-
o["default"] = v;
|
|
1399
|
-
});
|
|
1400
1440
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1401
1441
|
if (mod && mod.__esModule) return mod;
|
|
1402
1442
|
var result = {};
|
|
1403
|
-
if (mod != null) for (var k in mod) if (
|
|
1404
|
-
|
|
1443
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
1444
|
+
result["default"] = mod;
|
|
1405
1445
|
return result;
|
|
1406
1446
|
};
|
|
1407
1447
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
1408
1448
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1409
1449
|
};
|
|
1410
|
-
Object.defineProperty(exports, "__esModule",
|
|
1411
|
-
exports.doAnalyzeRacialPolarization = exports.getVRASection5 = exports.getMajorityMinority = void 0;
|
|
1450
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1412
1451
|
const RPV = __importStar(__webpack_require__(/*! @dra2020/racial-voting */ "@dra2020/racial-voting"));
|
|
1413
1452
|
const majority_minority_json_1 = __importDefault(__webpack_require__(/*! ../static/majority-minority.json */ "./static/majority-minority.json"));
|
|
1414
1453
|
const vra5_preclearance_json_1 = __importDefault(__webpack_require__(/*! ../static/vra5-preclearance.json */ "./static/vra5-preclearance.json"));
|
|
1415
|
-
// TODO -
|
|
1454
|
+
// TODO - Update/revise this, when the update comes out in September:
|
|
1416
1455
|
// Sources for majority-minority info:
|
|
1417
1456
|
// - https://en.wikipedia.org/wiki/List_of_majority-minority_United_States_congressional_districts
|
|
1418
1457
|
// - http://www.ncsl.org/Portals/1/Documents/Redistricting/Redistricting_2010.pdf (PP. 80–84)
|
|
@@ -1449,14 +1488,15 @@ exports.doAnalyzeRacialPolarization = doAnalyzeRacialPolarization;
|
|
|
1449
1488
|
/*!**************************!*\
|
|
1450
1489
|
!*** ./src/political.ts ***!
|
|
1451
1490
|
\**************************/
|
|
1452
|
-
|
|
1491
|
+
/*! no static exports found */
|
|
1492
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1453
1493
|
|
|
1494
|
+
"use strict";
|
|
1454
1495
|
|
|
1455
1496
|
//
|
|
1456
1497
|
// FAIR/PROPORTIONAL
|
|
1457
1498
|
//
|
|
1458
|
-
Object.defineProperty(exports, "__esModule",
|
|
1459
|
-
exports.fptpWin = void 0;
|
|
1499
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1460
1500
|
function fptpWin(demPct) {
|
|
1461
1501
|
// Vote shares should be fractions in the range [0.0 – 1.0]
|
|
1462
1502
|
//assert((demPct <= 1.0) && (demPct >= 0.0));
|
|
@@ -1471,33 +1511,22 @@ exports.fptpWin = fptpWin;
|
|
|
1471
1511
|
/*!***************************!*\
|
|
1472
1512
|
!*** ./src/preprocess.ts ***!
|
|
1473
1513
|
\***************************/
|
|
1474
|
-
|
|
1514
|
+
/*! no static exports found */
|
|
1515
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1475
1516
|
|
|
1517
|
+
"use strict";
|
|
1476
1518
|
|
|
1477
1519
|
//
|
|
1478
1520
|
// PREPROCESS DATA
|
|
1479
1521
|
//
|
|
1480
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1481
|
-
if (k2 === undefined) k2 = k;
|
|
1482
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1483
|
-
}) : (function(o, m, k, k2) {
|
|
1484
|
-
if (k2 === undefined) k2 = k;
|
|
1485
|
-
o[k2] = m[k];
|
|
1486
|
-
}));
|
|
1487
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1488
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1489
|
-
}) : function(o, v) {
|
|
1490
|
-
o["default"] = v;
|
|
1491
|
-
});
|
|
1492
1522
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1493
1523
|
if (mod && mod.__esModule) return mod;
|
|
1494
1524
|
var result = {};
|
|
1495
|
-
if (mod != null) for (var k in mod) if (
|
|
1496
|
-
|
|
1525
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
1526
|
+
result["default"] = mod;
|
|
1497
1527
|
return result;
|
|
1498
1528
|
};
|
|
1499
|
-
Object.defineProperty(exports, "__esModule",
|
|
1500
|
-
exports.doPreprocessData = void 0;
|
|
1529
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1501
1530
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
1502
1531
|
// NOTE - Do preprocessing separately, so the constructor returns quickly.
|
|
1503
1532
|
function doPreprocessData(s, bLog = false) {
|
|
@@ -1653,35 +1682,23 @@ function doPreprocessCensus(s, bLog = false) {
|
|
|
1653
1682
|
/*!************************!*\
|
|
1654
1683
|
!*** ./src/results.ts ***!
|
|
1655
1684
|
\************************/
|
|
1656
|
-
|
|
1685
|
+
/*! no static exports found */
|
|
1686
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1657
1687
|
|
|
1688
|
+
"use strict";
|
|
1658
1689
|
|
|
1659
1690
|
//
|
|
1660
1691
|
// TEMPLATES FOR UNFORMATTED ANALYTICS RESULTS
|
|
1661
1692
|
//
|
|
1662
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1663
|
-
if (k2 === undefined) k2 = k;
|
|
1664
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1665
|
-
}) : (function(o, m, k, k2) {
|
|
1666
|
-
if (k2 === undefined) k2 = k;
|
|
1667
|
-
o[k2] = m[k];
|
|
1668
|
-
}));
|
|
1669
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1670
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1671
|
-
}) : function(o, v) {
|
|
1672
|
-
o["default"] = v;
|
|
1673
|
-
});
|
|
1674
1693
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1675
1694
|
if (mod && mod.__esModule) return mod;
|
|
1676
1695
|
var result = {};
|
|
1677
|
-
if (mod != null) for (var k in mod) if (
|
|
1678
|
-
|
|
1696
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
1697
|
+
result["default"] = mod;
|
|
1679
1698
|
return result;
|
|
1680
1699
|
};
|
|
1681
|
-
Object.defineProperty(exports, "__esModule",
|
|
1682
|
-
exports.doAnalyzePostProcessing = exports.prepareDistrictStatistics = exports.prepareRequirementsChecklist = void 0;
|
|
1700
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1683
1701
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
1684
|
-
const S = __importStar(__webpack_require__(/*! ./settings */ "./src/settings.ts"));
|
|
1685
1702
|
const analyze_1 = __webpack_require__(/*! ./analyze */ "./src/analyze.ts");
|
|
1686
1703
|
function prepareRequirementsChecklist(s, bLog = false) {
|
|
1687
1704
|
if (!(s.bPostProcessingDone)) {
|
|
@@ -1759,7 +1776,7 @@ function prepareDistrictStatistics(s, bLog = false) {
|
|
|
1759
1776
|
// Transpose the rows & columns, so rows are districts.
|
|
1760
1777
|
let dsTable = [];
|
|
1761
1778
|
for (let i = 0; i < s.districts.numberOfRows(); i++) {
|
|
1762
|
-
|
|
1779
|
+
const rawRow = {
|
|
1763
1780
|
districtID: i,
|
|
1764
1781
|
totalPop: s.districts.table.totalPop[i],
|
|
1765
1782
|
popDevPct: s.districts.table.popDevPct[i],
|
|
@@ -1779,22 +1796,22 @@ function prepareDistrictStatistics(s, bLog = false) {
|
|
|
1779
1796
|
asianPct: s.districts.table.asianPct[i],
|
|
1780
1797
|
nativePct: s.districts.table.nativePct[i]
|
|
1781
1798
|
};
|
|
1782
|
-
|
|
1799
|
+
const readyRow = U.deepCopy(rawRow);
|
|
1783
1800
|
dsTable.push(readyRow);
|
|
1784
1801
|
}
|
|
1785
|
-
|
|
1802
|
+
const dsDetails = {
|
|
1786
1803
|
// None at this time
|
|
1787
1804
|
};
|
|
1788
|
-
|
|
1789
|
-
shapes:
|
|
1805
|
+
const dsDatasets = {
|
|
1806
|
+
shapes: U.deepCopy(s.config['descriptions']['SHAPES']),
|
|
1790
1807
|
census: U.deepCopy(s.config['descriptions']['CENSUS']),
|
|
1791
1808
|
vap: U.deepCopy(s.config['descriptions']['VAP']),
|
|
1792
1809
|
election: U.deepCopy(s.config['descriptions']['ELECTION'])
|
|
1793
1810
|
};
|
|
1794
|
-
|
|
1811
|
+
const dsResources = {
|
|
1795
1812
|
// None at this time
|
|
1796
1813
|
};
|
|
1797
|
-
|
|
1814
|
+
const ds = {
|
|
1798
1815
|
table: dsTable,
|
|
1799
1816
|
details: dsDetails,
|
|
1800
1817
|
datasets: dsDatasets,
|
|
@@ -1811,7 +1828,7 @@ function doAnalyzePostProcessing(s, bLog = false) {
|
|
|
1811
1828
|
let popDev = s.getTest(4 /* PopulationDeviation */);
|
|
1812
1829
|
popDev['normalizedScore'] = scorecard.populationDeviation.normalized;
|
|
1813
1830
|
const datasets = {
|
|
1814
|
-
shapes:
|
|
1831
|
+
shapes: U.deepCopy(s.config['descriptions']['SHAPES']),
|
|
1815
1832
|
census: U.deepCopy(s.config['descriptions']['CENSUS']),
|
|
1816
1833
|
vap: U.deepCopy(s.config['descriptions']['VAP']),
|
|
1817
1834
|
election: U.deepCopy(s.config['descriptions']['ELECTION'])
|
|
@@ -1839,33 +1856,22 @@ exports.doAnalyzePostProcessing = doAnalyzePostProcessing;
|
|
|
1839
1856
|
/*!**********************!*\
|
|
1840
1857
|
!*** ./src/score.ts ***!
|
|
1841
1858
|
\**********************/
|
|
1842
|
-
|
|
1859
|
+
/*! no static exports found */
|
|
1860
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1843
1861
|
|
|
1862
|
+
"use strict";
|
|
1844
1863
|
|
|
1845
1864
|
//
|
|
1846
1865
|
// SCORING
|
|
1847
1866
|
//
|
|
1848
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1849
|
-
if (k2 === undefined) k2 = k;
|
|
1850
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1851
|
-
}) : (function(o, m, k, k2) {
|
|
1852
|
-
if (k2 === undefined) k2 = k;
|
|
1853
|
-
o[k2] = m[k];
|
|
1854
|
-
}));
|
|
1855
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1856
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1857
|
-
}) : function(o, v) {
|
|
1858
|
-
o["default"] = v;
|
|
1859
|
-
});
|
|
1860
1867
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1861
1868
|
if (mod && mod.__esModule) return mod;
|
|
1862
1869
|
var result = {};
|
|
1863
|
-
if (mod != null) for (var k in mod) if (
|
|
1864
|
-
|
|
1870
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
1871
|
+
result["default"] = mod;
|
|
1865
1872
|
return result;
|
|
1866
1873
|
};
|
|
1867
|
-
Object.defineProperty(exports, "__esModule",
|
|
1868
|
-
exports.scorePlan = exports.getStatewideDemographics = exports.profilePlan = void 0;
|
|
1874
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1869
1875
|
const Score = __importStar(__webpack_require__(/*! @dra2020/dra-score */ "@dra2020/dra-score"));
|
|
1870
1876
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
1871
1877
|
const M = __importStar(__webpack_require__(/*! ./minority */ "./src/minority.ts"));
|
|
@@ -2033,14 +2039,15 @@ exports.scorePlan = scorePlan;
|
|
|
2033
2039
|
/*!*************************!*\
|
|
2034
2040
|
!*** ./src/settings.ts ***!
|
|
2035
2041
|
\*************************/
|
|
2036
|
-
|
|
2042
|
+
/*! no static exports found */
|
|
2043
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2037
2044
|
|
|
2045
|
+
"use strict";
|
|
2038
2046
|
|
|
2039
2047
|
//
|
|
2040
2048
|
// GLOBAL CONSTANTS
|
|
2041
2049
|
//
|
|
2042
|
-
Object.defineProperty(exports, "__esModule",
|
|
2043
|
-
exports.SHAPES = exports.DISTRICT_SPLITTING_WEIGHT = exports.COUNTY_SPLITTING_WEIGHT = exports.EQUAL_TOLERANCE = exports.OUT_OF_STATE = exports.NUMBER_OF_ITEMS_TO_REPORT = exports.NOT_ASSIGNED = exports.NORMALIZED_RANGE = exports.PRECISION = void 0;
|
|
2050
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2044
2051
|
// Keep four decimal places for fractions [0–1], i.e.,
|
|
2045
2052
|
// keep two decimal places for %'s [0–100].
|
|
2046
2053
|
exports.PRECISION = 4;
|
|
@@ -2058,8 +2065,8 @@ exports.EQUAL_TOLERANCE = AVERAGE_BLOCK_SIZE / 2;
|
|
|
2058
2065
|
// County & district splitting weights
|
|
2059
2066
|
exports.COUNTY_SPLITTING_WEIGHT = 0.8;
|
|
2060
2067
|
exports.DISTRICT_SPLITTING_WEIGHT = 1.0 - exports.COUNTY_SPLITTING_WEIGHT;
|
|
2061
|
-
//
|
|
2062
|
-
|
|
2068
|
+
// 2020
|
|
2069
|
+
// export const SHAPES = "2010 VTD shapes";
|
|
2063
2070
|
|
|
2064
2071
|
|
|
2065
2072
|
/***/ }),
|
|
@@ -2068,16 +2075,17 @@ exports.SHAPES = "2010 VTD shapes";
|
|
|
2068
2075
|
/*!**********************!*\
|
|
2069
2076
|
!*** ./src/types.ts ***!
|
|
2070
2077
|
\**********************/
|
|
2071
|
-
|
|
2078
|
+
/*! no static exports found */
|
|
2079
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2072
2080
|
|
|
2081
|
+
"use strict";
|
|
2073
2082
|
|
|
2074
2083
|
//
|
|
2075
2084
|
// TYPE DEFINITIONS
|
|
2076
2085
|
//
|
|
2077
|
-
Object.defineProperty(exports, "__esModule",
|
|
2078
|
-
exports.estSeatProbability = void 0;
|
|
2086
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2079
2087
|
var dra_score_1 = __webpack_require__(/*! @dra2020/dra-score */ "@dra2020/dra-score");
|
|
2080
|
-
|
|
2088
|
+
exports.estSeatProbability = dra_score_1.estSeatProbability;
|
|
2081
2089
|
// END
|
|
2082
2090
|
|
|
2083
2091
|
|
|
@@ -2087,33 +2095,22 @@ Object.defineProperty(exports, "estSeatProbability", ({ enumerable: true, get: f
|
|
|
2087
2095
|
/*!**********************!*\
|
|
2088
2096
|
!*** ./src/utils.ts ***!
|
|
2089
2097
|
\**********************/
|
|
2090
|
-
|
|
2098
|
+
/*! no static exports found */
|
|
2099
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2091
2100
|
|
|
2101
|
+
"use strict";
|
|
2092
2102
|
|
|
2093
2103
|
//
|
|
2094
2104
|
// UTILITIES
|
|
2095
2105
|
//
|
|
2096
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2097
|
-
if (k2 === undefined) k2 = k;
|
|
2098
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
2099
|
-
}) : (function(o, m, k, k2) {
|
|
2100
|
-
if (k2 === undefined) k2 = k;
|
|
2101
|
-
o[k2] = m[k];
|
|
2102
|
-
}));
|
|
2103
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
2104
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2105
|
-
}) : function(o, v) {
|
|
2106
|
-
o["default"] = v;
|
|
2107
|
-
});
|
|
2108
2106
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
2109
2107
|
if (mod && mod.__esModule) return mod;
|
|
2110
2108
|
var result = {};
|
|
2111
|
-
if (mod != null) for (var k in mod) if (
|
|
2112
|
-
|
|
2109
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
2110
|
+
result["default"] = mod;
|
|
2113
2111
|
return result;
|
|
2114
2112
|
};
|
|
2115
|
-
Object.defineProperty(exports, "__esModule",
|
|
2116
|
-
exports.depthof = exports.deepCopy = exports.shallowCopy = exports.countEnumValues = exports.objectContains = exports.arrayContains = exports.getSelectObjectKeys = exports.getNumericObjectKeys = exports.getObjectKeys = exports.isArrayEmpty = exports.isSetEmpty = exports.isObjectEmpty = exports.keyExists = exports.andArray = exports.initArray = exports.maxArray = exports.minArray = exports.avgArray = exports.sumArray = exports.trim = exports.isUninhabited = exports.isWaterOnly = exports.parseGeoID = exports.getDistrict = exports.isOutOfState = exports.isInState = void 0;
|
|
2113
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2117
2114
|
const DT = __importStar(__webpack_require__(/*! @dra2020/dra-types */ "@dra2020/dra-types"));
|
|
2118
2115
|
const S = __importStar(__webpack_require__(/*! ./settings */ "./src/settings.ts"));
|
|
2119
2116
|
// PLAN HELPERS
|
|
@@ -2332,7 +2329,7 @@ export function mapBooleanToTriState(bool: boolean): T.TriState
|
|
|
2332
2329
|
}
|
|
2333
2330
|
*/
|
|
2334
2331
|
var util_1 = __webpack_require__(/*! @dra2020/util */ "@dra2020/util");
|
|
2335
|
-
|
|
2332
|
+
exports.depthof = util_1.depthof;
|
|
2336
2333
|
|
|
2337
2334
|
|
|
2338
2335
|
/***/ }),
|
|
@@ -2341,33 +2338,22 @@ Object.defineProperty(exports, "depthof", ({ enumerable: true, get: function ()
|
|
|
2341
2338
|
/*!**********************!*\
|
|
2342
2339
|
!*** ./src/valid.ts ***!
|
|
2343
2340
|
\**********************/
|
|
2344
|
-
|
|
2341
|
+
/*! no static exports found */
|
|
2342
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2345
2343
|
|
|
2344
|
+
"use strict";
|
|
2346
2345
|
|
|
2347
2346
|
//
|
|
2348
2347
|
// MAP/PLAN VALIDATIONS
|
|
2349
2348
|
//
|
|
2350
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2351
|
-
if (k2 === undefined) k2 = k;
|
|
2352
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
2353
|
-
}) : (function(o, m, k, k2) {
|
|
2354
|
-
if (k2 === undefined) k2 = k;
|
|
2355
|
-
o[k2] = m[k];
|
|
2356
|
-
}));
|
|
2357
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
2358
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2359
|
-
}) : function(o, v) {
|
|
2360
|
-
o["default"] = v;
|
|
2361
|
-
});
|
|
2362
2349
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
2363
2350
|
if (mod && mod.__esModule) return mod;
|
|
2364
2351
|
var result = {};
|
|
2365
|
-
if (mod != null) for (var k in mod) if (
|
|
2366
|
-
|
|
2352
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
2353
|
+
result["default"] = mod;
|
|
2367
2354
|
return result;
|
|
2368
2355
|
};
|
|
2369
|
-
Object.defineProperty(exports, "__esModule",
|
|
2370
|
-
exports.doIsFreeOfHoles = exports.doIsContiguous = exports.doIsComplete = void 0;
|
|
2356
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2371
2357
|
const U = __importStar(__webpack_require__(/*! ./utils */ "./src/utils.ts"));
|
|
2372
2358
|
const S = __importStar(__webpack_require__(/*! ./settings */ "./src/settings.ts"));
|
|
2373
2359
|
//
|
|
@@ -2533,7 +2519,8 @@ exports.doIsFreeOfHoles = doIsFreeOfHoles;
|
|
|
2533
2519
|
/*!***************************************!*\
|
|
2534
2520
|
!*** ./static/majority-minority.json ***!
|
|
2535
2521
|
\***************************************/
|
|
2536
|
-
|
|
2522
|
+
/*! exports provided: AL, AK, AZ, AR, CA, CO, CT, DC, 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, PR, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, default */
|
|
2523
|
+
/***/ (function(module) {
|
|
2537
2524
|
|
|
2538
2525
|
module.exports = JSON.parse("{\"AL\":{\"Black\":[7],\"Hispanic\":[],\"Pacific\":[]},\"AK\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"AZ\":{\"Black\":[],\"Hispanic\":[2,4,7],\"Pacific\":[]},\"AR\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"CA\":{\"Black\":[13,37,43],\"Hispanic\":[17,18,20,21,28,31,32,34,35,38,39,43,45,47,51],\"Pacific\":[12,13,14,15,17,18,19,27,34,39,45,47,52]},\"CO\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"CT\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"DC\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"DE\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"FL\":{\"Black\":[5,20,24],\"Hispanic\":[18,21,25],\"Pacific\":[]},\"GA\":{\"Black\":[2,4,5,13],\"Hispanic\":[],\"Pacific\":[]},\"HI\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[2]},\"ID\":{\"Black\":[],\"Hispanic\":[1],\"Pacific\":[]},\"IL\":{\"Black\":[1,2,7],\"Hispanic\":[4],\"Pacific\":[]},\"IN\":{\"Black\":[7],\"Hispanic\":[],\"Pacific\":[]},\"IA\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"KS\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"KY\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"LA\":{\"Black\":[2],\"Hispanic\":[],\"Pacific\":[]},\"ME\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"MD\":{\"Black\":[4,7],\"Hispanic\":[],\"Pacific\":[]},\"MA\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"MI\":{\"Black\":[13,14],\"Hispanic\":[],\"Pacific\":[]},\"MN\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"MS\":{\"Black\":[2],\"Hispanic\":[],\"Pacific\":[]},\"MO\":{\"Black\":[1,5],\"Hispanic\":[],\"Pacific\":[]},\"MT\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"NE\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"NV\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"NH\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"NJ\":{\"Black\":[10,12],\"Hispanic\":[13],\"Pacific\":[6]},\"NM\":{\"Black\":[],\"Hispanic\":[2,13],\"Pacific\":[]},\"NY\":{\"Black\":[5,8,9,13],\"Hispanic\":[12,16],\"Pacific\":[6,7,10]},\"NC\":{\"Black\":[1,12],\"Hispanic\":[],\"Pacific\":[]},\"ND\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"OH\":{\"Black\":[3,11],\"Hispanic\":[],\"Pacific\":[]},\"OK\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"OR\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"PA\":{\"Black\":[2],\"Hispanic\":[],\"Pacific\":[]},\"PR\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"RI\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"SC\":{\"Black\":[6],\"Hispanic\":[],\"Pacific\":[]},\"SD\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"TN\":{\"Black\":[9],\"Hispanic\":[],\"Pacific\":[]},\"TX\":{\"Black\":[9,18,33],\"Hispanic\":[15,16,19,20,23,27,28,29,32],\"Pacific\":[]},\"UT\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"VT\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"VA\":{\"Black\":[3],\"Hispanic\":[],\"Pacific\":[]},\"WA\":{\"Black\":[],\"Hispanic\":[3],\"Pacific\":[9]},\"WV\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]},\"WI\":{\"Black\":[4],\"Hispanic\":[],\"Pacific\":[]},\"WY\":{\"Black\":[],\"Hispanic\":[],\"Pacific\":[]}}");
|
|
2539
2526
|
|
|
@@ -2543,7 +2530,8 @@ module.exports = JSON.parse("{\"AL\":{\"Black\":[7],\"Hispanic\":[],\"Pacific\":
|
|
|
2543
2530
|
/*!***************************************!*\
|
|
2544
2531
|
!*** ./static/vra5-preclearance.json ***!
|
|
2545
2532
|
\***************************************/
|
|
2546
|
-
|
|
2533
|
+
/*! exports provided: AL, AK, AZ, CA, FL, GA, LA, MI, MS, NY, NC, SC, SD, TX, VA, default */
|
|
2534
|
+
/***/ (function(module) {
|
|
2547
2535
|
|
|
2548
2536
|
module.exports = JSON.parse("{\"AL\":\"all\",\"AK\":\"all\",\"AZ\":\"all\",\"CA\":\"parts\",\"FL\":\"parts\",\"GA\":\"all\",\"LA\":\"all\",\"MI\":\"parts\",\"MS\":\"all\",\"NY\":\"parts\",\"NC\":\"parts\",\"SC\":\"all\",\"SD\":\"parts\",\"TX\":\"all\",\"VA\":\"all\"}");
|
|
2549
2537
|
|
|
@@ -2553,9 +2541,10 @@ module.exports = JSON.parse("{\"AL\":\"all\",\"AK\":\"all\",\"AZ\":\"all\",\"CA\
|
|
|
2553
2541
|
/*!***************************************!*\
|
|
2554
2542
|
!*** external "@dra2020/compactness" ***!
|
|
2555
2543
|
\***************************************/
|
|
2556
|
-
|
|
2544
|
+
/*! no static exports found */
|
|
2545
|
+
/***/ (function(module, exports) {
|
|
2557
2546
|
|
|
2558
|
-
module.exports = require("@dra2020/compactness")
|
|
2547
|
+
module.exports = require("@dra2020/compactness");
|
|
2559
2548
|
|
|
2560
2549
|
/***/ }),
|
|
2561
2550
|
|
|
@@ -2563,9 +2552,10 @@ module.exports = require("@dra2020/compactness");;
|
|
|
2563
2552
|
/*!*************************************!*\
|
|
2564
2553
|
!*** external "@dra2020/dra-graph" ***!
|
|
2565
2554
|
\*************************************/
|
|
2566
|
-
|
|
2555
|
+
/*! no static exports found */
|
|
2556
|
+
/***/ (function(module, exports) {
|
|
2567
2557
|
|
|
2568
|
-
module.exports = require("@dra2020/dra-graph")
|
|
2558
|
+
module.exports = require("@dra2020/dra-graph");
|
|
2569
2559
|
|
|
2570
2560
|
/***/ }),
|
|
2571
2561
|
|
|
@@ -2573,9 +2563,10 @@ module.exports = require("@dra2020/dra-graph");;
|
|
|
2573
2563
|
/*!*************************************!*\
|
|
2574
2564
|
!*** external "@dra2020/dra-score" ***!
|
|
2575
2565
|
\*************************************/
|
|
2576
|
-
|
|
2566
|
+
/*! no static exports found */
|
|
2567
|
+
/***/ (function(module, exports) {
|
|
2577
2568
|
|
|
2578
|
-
module.exports = require("@dra2020/dra-score")
|
|
2569
|
+
module.exports = require("@dra2020/dra-score");
|
|
2579
2570
|
|
|
2580
2571
|
/***/ }),
|
|
2581
2572
|
|
|
@@ -2583,9 +2574,10 @@ module.exports = require("@dra2020/dra-score");;
|
|
|
2583
2574
|
/*!*************************************!*\
|
|
2584
2575
|
!*** external "@dra2020/dra-types" ***!
|
|
2585
2576
|
\*************************************/
|
|
2586
|
-
|
|
2577
|
+
/*! no static exports found */
|
|
2578
|
+
/***/ (function(module, exports) {
|
|
2587
2579
|
|
|
2588
|
-
module.exports = require("@dra2020/dra-types")
|
|
2580
|
+
module.exports = require("@dra2020/dra-types");
|
|
2589
2581
|
|
|
2590
2582
|
/***/ }),
|
|
2591
2583
|
|
|
@@ -2593,9 +2585,10 @@ module.exports = require("@dra2020/dra-types");;
|
|
|
2593
2585
|
/*!********************************!*\
|
|
2594
2586
|
!*** external "@dra2020/poly" ***!
|
|
2595
2587
|
\********************************/
|
|
2596
|
-
|
|
2588
|
+
/*! no static exports found */
|
|
2589
|
+
/***/ (function(module, exports) {
|
|
2597
2590
|
|
|
2598
|
-
module.exports = require("@dra2020/poly")
|
|
2591
|
+
module.exports = require("@dra2020/poly");
|
|
2599
2592
|
|
|
2600
2593
|
/***/ }),
|
|
2601
2594
|
|
|
@@ -2603,9 +2596,10 @@ module.exports = require("@dra2020/poly");;
|
|
|
2603
2596
|
/*!*****************************************!*\
|
|
2604
2597
|
!*** external "@dra2020/racial-voting" ***!
|
|
2605
2598
|
\*****************************************/
|
|
2606
|
-
|
|
2599
|
+
/*! no static exports found */
|
|
2600
|
+
/***/ (function(module, exports) {
|
|
2607
2601
|
|
|
2608
|
-
module.exports = require("@dra2020/racial-voting")
|
|
2602
|
+
module.exports = require("@dra2020/racial-voting");
|
|
2609
2603
|
|
|
2610
2604
|
/***/ }),
|
|
2611
2605
|
|
|
@@ -2613,43 +2607,13 @@ module.exports = require("@dra2020/racial-voting");;
|
|
|
2613
2607
|
/*!********************************!*\
|
|
2614
2608
|
!*** external "@dra2020/util" ***!
|
|
2615
2609
|
\********************************/
|
|
2616
|
-
|
|
2610
|
+
/*! no static exports found */
|
|
2611
|
+
/***/ (function(module, exports) {
|
|
2617
2612
|
|
|
2618
|
-
module.exports = require("@dra2020/util")
|
|
2613
|
+
module.exports = require("@dra2020/util");
|
|
2619
2614
|
|
|
2620
2615
|
/***/ })
|
|
2621
2616
|
|
|
2622
|
-
/******/
|
|
2623
|
-
/************************************************************************/
|
|
2624
|
-
/******/ // The module cache
|
|
2625
|
-
/******/ var __webpack_module_cache__ = {};
|
|
2626
|
-
/******/
|
|
2627
|
-
/******/ // The require function
|
|
2628
|
-
/******/ function __webpack_require__(moduleId) {
|
|
2629
|
-
/******/ // Check if module is in cache
|
|
2630
|
-
/******/ if(__webpack_module_cache__[moduleId]) {
|
|
2631
|
-
/******/ return __webpack_module_cache__[moduleId].exports;
|
|
2632
|
-
/******/ }
|
|
2633
|
-
/******/ // Create a new module (and put it into the cache)
|
|
2634
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2635
|
-
/******/ // no module.id needed
|
|
2636
|
-
/******/ // no module.loaded needed
|
|
2637
|
-
/******/ exports: {}
|
|
2638
|
-
/******/ };
|
|
2639
|
-
/******/
|
|
2640
|
-
/******/ // Execute the module function
|
|
2641
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2642
|
-
/******/
|
|
2643
|
-
/******/ // Return the exports of the module
|
|
2644
|
-
/******/ return module.exports;
|
|
2645
|
-
/******/ }
|
|
2646
|
-
/******/
|
|
2647
|
-
/************************************************************************/
|
|
2648
|
-
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
|
2649
|
-
/******/ // startup
|
|
2650
|
-
/******/ // Load entry module and return exports
|
|
2651
|
-
/******/ return __webpack_require__("./src/index.ts");
|
|
2652
|
-
/******/ })()
|
|
2653
|
-
;
|
|
2617
|
+
/******/ });
|
|
2654
2618
|
});
|
|
2655
2619
|
//# sourceMappingURL=district-analytics.js.map
|