@dra2020/district-analytics 12.1.2 → 14.1.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.
@@ -1,5 +1,5 @@
1
1
  import * as Score from '@dra2020/dra-score';
2
- import * as RPV from '@dra2020/racial-voting';
2
+ import { Minority } from '@dra2020/dra-analytics';
3
3
  import { RequirementsChecklist } from './results';
4
4
  import { DistrictStatistics } from './results';
5
5
  import * as D from './_data';
@@ -16,14 +16,14 @@ export declare class AnalyticsSession {
16
16
  _scorecard?: Score.Scorecard;
17
17
  state: D.State;
18
18
  counties: D.Counties;
19
- graph: D.Graph;
19
+ graph: D.GraphClass;
20
20
  features: D.Features;
21
21
  plan: D.Plan;
22
22
  districts: D.Districts;
23
23
  constructor(SessionRequest: T.SessionRequest);
24
24
  processConfig(config: T.Dict): T.Dict;
25
25
  analyzePlan(bLog?: boolean, overridesJSON?: any): boolean;
26
- analyzeRacialPolarization(districtID: number, groups: RPV.MinorityFilter, bLog?: boolean): RPV.RPVAnalysis | undefined;
26
+ analyzeRacialPolarization(districtID: number, groups: Minority.MinorityFilter, bLog?: boolean): Minority.RPVAnalysis | undefined;
27
27
  getDistrictStatistics(bLog?: boolean): DistrictStatistics;
28
28
  getPlanProfile(bLog?: boolean): Score.Profile;
29
29
  getPlanScorecard(bLog?: boolean): Score.Scorecard;
@@ -1,4 +1,4 @@
1
- import * as RPV from '@dra2020/racial-voting';
1
+ import { Minority } from '@dra2020/dra-analytics';
2
2
  import * as T from './types';
3
3
  import { AnalyticsSession } from './_api';
4
4
  export declare type TransposedTable = {
@@ -48,9 +48,9 @@ export declare class Districts {
48
48
  recalcStatistics(bLog?: boolean): void;
49
49
  extractDistrictShapeProperties(bLog?: boolean): void;
50
50
  getCountyIndex(geoID: string): number;
51
- extractVotesByDemographic(districtID: number, groups: RPV.MinorityFilter, bLog?: boolean): RPV.DemographicVotingByFeature | undefined;
51
+ extractVotesByDemographic(districtID: number, groups: Minority.MinorityFilter, bLog?: boolean): Minority.DemographicVotingByFeature | undefined;
52
52
  }
53
- export declare function inferSelectedMinority(groups: RPV.MinorityFilter): string;
53
+ export declare function inferSelectedMinority(groups: Minority.MinorityFilter): string;
54
54
  export declare class Features {
55
55
  _session: AnalyticsSession;
56
56
  _data: T.GeoFeatureCollection;
@@ -106,7 +106,7 @@ export declare class Plan {
106
106
  geoIDsForDistrictID(i: number): Set<string>;
107
107
  }
108
108
  export declare function invertPlan(plan: T.PlanByGeoID, s?: AnalyticsSession, bLog?: boolean): T.PlanByDistrictID;
109
- export declare class Graph {
109
+ export declare class GraphClass {
110
110
  _session: AnalyticsSession;
111
111
  _graph: T.ContiguityGraph;
112
112
  constructor(s: AnalyticsSession, graph: T.ContiguityGraph);
@@ -3,4 +3,13 @@ export { geoIDForFeature, fieldForFeature, inferSelectedMinority } from './_data
3
3
  export * from './results';
4
4
  export * from './types';
5
5
  export * from './utils';
6
- export { MinorityFilter, Point, DemographicVotingByFeature, RPVFactor, RPVAnalysis } from '@dra2020/racial-voting';
6
+ import { Minority, Rate, Splitting } from '@dra2020/dra-analytics';
7
+ export declare type MinorityFilter = Minority.MinorityFilter;
8
+ export declare type Point = Minority.Point;
9
+ export declare type DemographicVotingByFeature = Minority.DemographicVotingByFeature;
10
+ export declare type RPVFactor = Minority.RPVFactor;
11
+ export declare type RPVAnalysis = Minority.RPVAnalysis;
12
+ export declare const ratePartisanBias: typeof Rate.ratePartisanBias;
13
+ export declare const isAntimajoritarian: typeof Rate.isAntimajoritarian;
14
+ export declare const effectiveSplits: typeof Splitting.effectiveSplits;
15
+ export declare const uncertaintyOfMembership: typeof Splitting.uncertaintyOfMembership;
@@ -1,6 +1,6 @@
1
- import * as RPV from '@dra2020/racial-voting';
1
+ import { Minority } from '@dra2020/dra-analytics';
2
2
  import * as T from './types';
3
3
  import { AnalyticsSession } from './_api';
4
4
  export declare function getMajorityMinority(s: AnalyticsSession): T.Dict;
5
5
  export declare function getVRASection5(s: AnalyticsSession): string;
6
- export declare function doAnalyzeRacialPolarization(s: AnalyticsSession, districtID: number, groups: RPV.MinorityFilter, bLog?: boolean): RPV.RPVAnalysis | undefined;
6
+ export declare function doAnalyzeRacialPolarization(s: AnalyticsSession, districtID: number, groups: Minority.MinorityFilter, bLog?: boolean): Minority.RPVAnalysis | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/district-analytics",
3
- "version": "12.1.2",
3
+ "version": "14.1.0",
4
4
  "description": "District analytics TypeScript package",
5
5
  "main": "dist/district-analytics.js",
6
6
  "files": [
@@ -29,31 +29,28 @@
29
29
  },
30
30
  "homepage": "https://github.com/dra2020/district-analytics#readme",
31
31
  "devDependencies": {
32
- "@types/geojson": "^7946.0.7",
32
+ "@types/geojson": "^7946.0.8",
33
33
  "@types/jest": "^26.0.19",
34
- "@types/node": "^12",
35
- "@types/yargs": "^12.0.12",
36
- "jest": "^26.6.3",
34
+ "@types/node": "^12.20.23",
35
+ "@types/yargs": "^17.0.2",
36
+ "jest": "^27.1.0",
37
37
  "json-loader": "^0.5.7",
38
- "prettier": "^2.2.1",
39
- "source-map-loader": "^1.1.3",
40
- "ts-jest": "^26.4.4",
41
- "ts-loader": "^8.0.12",
42
- "tsify": "^5.0.2",
38
+ "prettier": "^2.3.2",
39
+ "source-map-loader": "^3.0.0",
40
+ "ts-loader": "^9.2.5",
41
+ "tsify": "^5.0.4",
43
42
  "tslint": "^6.1.3",
44
43
  "tslint-config-prettier": "^1.18.0",
45
- "typescript": "^4.1.3",
46
- "webpack": "^5.10.3",
47
- "webpack-cli": "^4.2.0",
48
- "yargs": "^12.0.5"
44
+ "typescript": "^4.4.2",
45
+ "webpack": "^5.52.0",
46
+ "webpack-cli": "^4.8.0",
47
+ "yargs": "^17.1.1"
49
48
  },
50
49
  "dependencies": {
51
- "@dra2020/baseclient": "^1.0.26",
52
- "@dra2020/compactness": "^3.0.1",
53
- "@dra2020/dra-graph": "^2.0.2",
50
+ "@dra2020/baseclient": "^1.0.38",
51
+ "@dra2020/dra-analytics": "^0.5.1",
54
52
  "@dra2020/dra-score": "^11.1.3",
55
- "@dra2020/dra-types": "^1.8.22",
56
- "@dra2020/racial-voting": "^3.1.0",
53
+ "@dra2020/dra-types": "^1.8.28",
57
54
  "geojson": "^0.5.0"
58
55
  }
59
56
  }