@dra2020/district-analytics 2.0.2 → 2.0.3

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
@@ -8364,8 +8364,8 @@ class Districts {
8364
8364
  });
8365
8365
  // COMPUTE DERIVED VALUES
8366
8366
  // Population deviation % and equal population (boolean) by district.
8367
- // Don't set the values for the dummy unassigned district.
8368
- let popDevPct = null;
8367
+ // Default the value for the dummy unassigned district to 0%.
8368
+ let popDevPct = 0 / targetSize;
8369
8369
  if (i > 0) {
8370
8370
  popDevPct = (totalPop - targetSize) / targetSize;
8371
8371
  bEqualPop = (popDevPct <= deviationThreshold);
@@ -10366,8 +10366,10 @@ const testDefns = {
10366
10366
  // Raw numeric analytics, such as population deviation, compactness, etc. are
10367
10367
  // normalized as part of creating a scorecard, so the code to normalize results
10368
10368
  // is encapsulated here.
10369
- // Configure scale parameters for normalizing each raw test result
10370
- // This needs to be separate from the scorecard configuration info above,
10369
+ // Configure scale parameters for normalizing each raw test result.
10370
+ // Scales consist of a minimum & a maximum *raw* value. If the values get
10371
+ // inverted (to make bigger better), these will switch.
10372
+ // This process needs to be separate from the test configuration info above,
10371
10373
  // because some scales need access to the analytics session object.
10372
10374
  function doConfigureScales(s) {
10373
10375
  // Scale defn for PopulationDeviation