@dra2020/district-analytics 8.2.6 → 8.2.7
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/cli.js
CHANGED
|
@@ -282092,8 +282092,12 @@ function doHasEqualPopulations(s, bLog = false) {
|
|
|
282092
282092
|
let popDevTest = s.getTest(4 /* PopulationDeviation */);
|
|
282093
282093
|
const popDevPct = popDevTest['score'];
|
|
282094
282094
|
const popDevNormalized = popDevTest['normalizedScore'];
|
|
282095
|
+
// 09-19-2020 - Added to catch edge case of only one non-empty district
|
|
282096
|
+
const p = s._profile;
|
|
282097
|
+
const totPopByDistrict = p.populationProfile.totalPopByDistrict.filter(x => x > 0);
|
|
282098
|
+
const bTwoOrMoreDistricts = (totPopByDistrict.length > 1) ? true : false;
|
|
282095
282099
|
// Populate the test entry
|
|
282096
|
-
if (popDevNormalized > 0) {
|
|
282100
|
+
if (bTwoOrMoreDistricts && (popDevNormalized > 0)) {
|
|
282097
282101
|
test['score'] = true;
|
|
282098
282102
|
}
|
|
282099
282103
|
else {
|