@dra2020/dra-analytics 4.1.1 → 4.1.4

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021-2022 Dave's Redistricting, LLC.
3
+ Copyright (c) 2021-2024 Social Good Fund for Dave's Redistricting.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -73,3 +73,5 @@ There are three packages that are part of this repo:
73
73
  ```npm run buildsplitting``` build the splitting command
74
74
 
75
75
  ```npm run test``` run automated jest tests
76
+
77
+ Email questions to [feedback](mailto:feedback@davesredistricting.org?subject=dra-analytics).
@@ -344,11 +344,11 @@ function makeCompactnessScorecard(shapes, bLog = false) {
344
344
  }
345
345
  const avgReock = totReock / shapes.features.length;
346
346
  const avgPolsby = totPolsby / shapes.features.length;
347
- const avgKWIWYSI = Math.round(totKIWYSI / shapes.features.length);
347
+ const avgKIWYSI = Math.round(totKIWYSI / shapes.features.length);
348
348
  const s = {
349
349
  avgReock: avgReock,
350
350
  avgPolsby: avgPolsby,
351
- avgKWIWYSI: avgKWIWYSI,
351
+ avgKIWYSI: avgKIWYSI,
352
352
  byDistrict: byDistrict,
353
353
  details: {}, // None
354
354
  // score?:
@@ -387,11 +387,11 @@ function calcCompactness(shapes) {
387
387
  }
388
388
  const avgReock = totReock / shapes.features.length;
389
389
  const avgPolsby = totPolsby / shapes.features.length;
390
- const avgKWIWYSI = Math.round(totKIWYSI / shapes.features.length);
390
+ const avgKIWYSI = Math.round(totKIWYSI / shapes.features.length);
391
391
  const out = {
392
392
  avgReock: avgReock,
393
393
  avgPolsby: avgPolsby,
394
- avgKWIWYSI: avgKWIWYSI,
394
+ avgKIWYSI: avgKIWYSI,
395
395
  byDistrict: byDistrict
396
396
  };
397
397
  return out;
@@ -709,9 +709,9 @@ function calcKIWYSICompactness(shapes) {
709
709
  };
710
710
  byDistrict.push(entry);
711
711
  }
712
- const avgKWIWYSI = Math.round(totKIWYSI / shapes.features.length);
712
+ const avgKIWYSI = Math.round(totKIWYSI / shapes.features.length);
713
713
  const out = {
714
- avgKWIWYSI: avgKWIWYSI,
714
+ avgKIWYSI: avgKIWYSI,
715
715
  byDistrict: byDistrict
716
716
  };
717
717
  return out;