@dra2020/district-analytics 15.2.2 → 15.4.0
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/district-analytics.js +13 -2
- package/dist/district-analytics.js.map +1 -1
- package/package.json +2 -2
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/all.d.ts +0 -22
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/compactness.d.ts +0 -47
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/general.d.ts +0 -11
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/graph.d.ts +0 -14
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/minority.d.ts +0 -90
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/partisan.d.ts +0 -64
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/population.d.ts +0 -7
- package/dist/node_modules/@dra2020/dra-analytics/lib/types/splitting.d.ts +0 -9
- package/dist/src/pg.d.ts +0 -2
- package/dist/src/political.d.ts +0 -1
|
@@ -1054,7 +1054,11 @@ class Counties {
|
|
|
1054
1054
|
this.nCounties = this._data.features.length;
|
|
1055
1055
|
}
|
|
1056
1056
|
countyByIndex(i) { return this._data.features[i]; }
|
|
1057
|
-
|
|
1057
|
+
// 10-16-21 - Analyze view crashing because county names were undefined in the lookup table.
|
|
1058
|
+
// Property had changed from 'NAME' to 'name' for *some* states.
|
|
1059
|
+
propertyForCounty(f, pk) {
|
|
1060
|
+
return f.properties[pk] ? f.properties[pk] : f.properties[pk.toLowerCase()];
|
|
1061
|
+
}
|
|
1058
1062
|
mapFIPSToName(fips, name) { this._countyNameLookup[fips] = name; }
|
|
1059
1063
|
nameFromFIPS(fips) { return this._countyNameLookup[fips]; }
|
|
1060
1064
|
indexFromFIPS(fips) { return this.index[fips]; }
|
|
@@ -1605,7 +1609,7 @@ const dra_analytics_1 = __webpack_require__(/*! @dra2020/dra-analytics */ "@dra2
|
|
|
1605
1609
|
exports.estSeatProbability = dra_analytics_1.Partisan.estSeatProbability;
|
|
1606
1610
|
exports.ratePartisanBias = dra_analytics_1.Rate.ratePartisanBias;
|
|
1607
1611
|
exports.isAntimajoritarian = dra_analytics_1.Rate.isAntimajoritarian;
|
|
1608
|
-
exports.avgSVError = dra_analytics_1.
|
|
1612
|
+
exports.avgSVError = dra_analytics_1.Partisan.avgSVError;
|
|
1609
1613
|
exports.effectiveSplits = dra_analytics_1.Splitting.effectiveSplits;
|
|
1610
1614
|
exports.uncertaintyOfMembership = dra_analytics_1.Splitting.uncertaintyOfMembership;
|
|
1611
1615
|
|
|
@@ -2287,6 +2291,13 @@ function thunkScorecard(newScorecard, bLog = false) {
|
|
|
2287
2291
|
const scratchpad = newScorecard.scratchpad;
|
|
2288
2292
|
// Partisan scorecard
|
|
2289
2293
|
const pS = U.deepCopy(newScorecard.partisan);
|
|
2294
|
+
// EXPERIMENTAL
|
|
2295
|
+
const lPropAlt = newScorecard.partisan.experimental.lProp;
|
|
2296
|
+
if (lPropAlt)
|
|
2297
|
+
pS.details['lProp'] = lPropAlt;
|
|
2298
|
+
const lUE = newScorecard.partisan.experimental.lUE;
|
|
2299
|
+
if (lUE)
|
|
2300
|
+
pS.details['lUE'] = lUE;
|
|
2290
2301
|
// Minority scorecard
|
|
2291
2302
|
const mS = U.deepCopy(newScorecard.minority);
|
|
2292
2303
|
// Compactness scorecard
|