@dra2020/district-analytics 6.2.0 → 6.3.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/cli.js CHANGED
@@ -89439,7 +89439,8 @@ function evalMinorityOpportunity(p, bLog = false) {
89439
89439
  const averageRVf = (RWins.length > 0) ? U.avgArray(RWins) : undefined;
89440
89440
  // Initialize arrays for results
89441
89441
  const offset = 1; // Don't process 'White'
89442
- const nDemos = 6 /* Native */ + 1 - offset; // Ditto
89442
+ const nDemos = 6 /* Total */; // Ditto
89443
+ // const nDemos = T.DemographicField.Native + 1 - offset; // Ditto
89443
89444
  const demosByDistrict = p.demographicProfile.mfArrayByDistrict;
89444
89445
  // Initialize the demographic buckets
89445
89446
  // COMPETITIVENESS - 06/23/2020 - And populate the statewide values.
@@ -89484,10 +89485,13 @@ function evalMinorityOpportunity(p, bLog = false) {
89484
89485
  }
89485
89486
  // The # of opportunity districts for each separate demographic and all minorities
89486
89487
  const oD = U.sumArray(opptyByDemo.slice(1)); // Sum individual demos, skipping all minorities
89487
- const cD = opptyByDemo[1 /* Minority */ - offset]; // All minorities
89488
+ const cD = opptyByDemo[0 /* Minority */]; // All minorities
89489
+ // const cD: number = opptyByDemo[T.DemographicField.Minority - offset]; // All minorities
89488
89490
  // The # of proportional districts for each separate demographic and all minorities
89489
- const pOd = bucketsByDemo[7 /* Total */ - 1][4 /* PropSeats */];
89490
- const pCd = bucketsByDemo[1 /* Minority */ - 1][4 /* PropSeats */];
89491
+ const pOd = bucketsByDemo[6 /* Total */][4 /* PropSeats */];
89492
+ const pCd = bucketsByDemo[0 /* Minority */][4 /* PropSeats */];
89493
+ // const pOd: number = bucketsByDemo[T.DemographicField.Total - 1][T.PivotField.PropSeats];
89494
+ // const pCd: number = bucketsByDemo[T.DemographicField.Minority - 1][T.PivotField.PropSeats];
89491
89495
  // const pOd: number = U.sumArray(districtsByDemo.slice(1)); // Sum individual demos, skipping all minorities
89492
89496
  // const pCd: number = districtsByDemo[0]; // All minorities
89493
89497
  // Score opportunity