@dra2020/district-analytics 14.1.3 → 14.2.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.
|
@@ -2313,6 +2313,9 @@ function scorePlan(s, p, bLog = false, overridesJSON) {
|
|
|
2313
2313
|
const nDistricts = byDistrict.length;
|
|
2314
2314
|
for (let districtID = 1; districtID <= nDistricts; districtID++) {
|
|
2315
2315
|
byDistrict[districtID - 1].kiwysiScore = kiwysiScores[districtID - 1];
|
|
2316
|
+
// 09-17-21 - Fix the normalized Polsby–Popper score!
|
|
2317
|
+
const rawPolsby = byDistrict[districtID - 1].rawPolsby;
|
|
2318
|
+
byDistrict[districtID - 1].normalizedPolsby = dra_analytics_1.Rate.ratePolsby(rawPolsby);
|
|
2316
2319
|
}
|
|
2317
2320
|
}
|
|
2318
2321
|
catch (e) {
|
|
@@ -2654,9 +2657,11 @@ function matchCompactnessByDistrict(property, received, good, tolerance) {
|
|
|
2654
2657
|
const rawPolsby = property + '/' + i.toString() + '/' + 'rawPolsby';
|
|
2655
2658
|
if (!matchFloats(rawPolsby, received[i].rawPolsby, good[i].rawPolsby, tolerance))
|
|
2656
2659
|
bMismatched = true;
|
|
2660
|
+
// TODO
|
|
2657
2661
|
// 09-17-21 - By-district Polsby–Popper ratings from dra-score in production are wrong!
|
|
2658
|
-
|
|
2659
|
-
|
|
2662
|
+
const normalizedPolsby = property + '/' + i.toString() + '/' + 'normalizedPolsby';
|
|
2663
|
+
if (!matchInts(normalizedPolsby, received[i].normalizedPolsby, good[i].normalizedPolsby))
|
|
2664
|
+
bMismatched = true;
|
|
2660
2665
|
const kiwysiScore = property + '/' + i.toString() + '/' + 'kiwysiScore';
|
|
2661
2666
|
if (!matchInts(kiwysiScore, received[i].kiwysiScore, good[i].kiwysiScore))
|
|
2662
2667
|
bMismatched = true;
|