@dra2020/district-analytics 17.0.1 → 17.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.
package/dist/equal.d.ts CHANGED
@@ -1,3 +0,0 @@
1
- import * as T from './types';
2
- import { AnalyticsSession } from './_api';
3
- export declare function doHasEqualPopulations(s: AnalyticsSession, bLog?: boolean): T.TestEntry;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './_api';
2
- export { geoIDForFeature, fieldForFeature, inferSelectedMinority } from './_data';
3
- export * from './results';
2
+ export { geoIDForFeature, fieldForFeature } from './data';
3
+ export { inferSelectedMinority } from './rpv';
4
4
  export * from './types';
5
5
  export { Profile, Scorecard, SplittingScorecard, Measurement } from './legacy-types';
6
6
  export * from './utils';
@@ -1,3 +1,4 @@
1
+ import { Dict } from './types';
1
2
  export type Profile = {
2
3
  state: string;
3
4
  name: string;
@@ -159,6 +160,3 @@ export type SVpoint = {
159
160
  v: number;
160
161
  s: number;
161
162
  };
162
- export type Dict = {
163
- [key: string]: any;
164
- };
@@ -1,6 +0,0 @@
1
- import { Types } from '@dra2020/dra-analytics';
2
- import * as T from './types';
3
- import { AnalyticsSession } from './_api';
4
- export declare function getMajorityMinority(s: AnalyticsSession): T.Dict;
5
- export declare function getVRASection5(s: AnalyticsSession): string;
6
- export declare function doAnalyzeRacialPolarization(s: AnalyticsSession, districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
@@ -1,2 +1,2 @@
1
1
  import { AnalyticsSession } from './_api';
2
- export declare function doPreprocessData(s: AnalyticsSession, bLog?: boolean): void;
2
+ export declare function initialize(s: AnalyticsSession): void;
@@ -0,0 +1,12 @@
1
+ import * as D from './data';
2
+ export declare function isComplete(popByDistricts: number[]): boolean;
3
+ export declare function emptyDistricts(popByDistricts: number[]): number[];
4
+ export declare function getUnassignedFeatures(container: D.SessionData): string[];
5
+ export declare function isContiguous(geoids: Set<string>, graph: {
6
+ [geoID: string]: string[];
7
+ }, bLog?: boolean): boolean;
8
+ export declare function isEmbedded(districtID: number, geoids: Set<string>, plan: {
9
+ [geoID: string]: number;
10
+ }, graph: {
11
+ [geoID: string]: string[];
12
+ }, bLog?: boolean): boolean;
package/dist/results.d.ts CHANGED
@@ -1,50 +0,0 @@
1
- import * as T from './types';
2
- import { AnalyticsSession } from './_api';
3
- export type RequirementsChecklist = {
4
- score: boolean;
5
- metrics: {
6
- complete: boolean;
7
- contiguous: boolean;
8
- freeOfHoles: boolean;
9
- equalPopulation: boolean;
10
- };
11
- details: {
12
- unassignedFeatures: string[];
13
- emptyDistricts: number[];
14
- discontiguousDistricts: number[];
15
- embeddedDistricts: number[];
16
- populationDeviation: number;
17
- deviationThreshold: number;
18
- };
19
- datasets: T.Datasets;
20
- resources: {};
21
- };
22
- export declare function prepareRequirementsChecklist(s: AnalyticsSession, bLog?: boolean): RequirementsChecklist;
23
- export type DistrictRow = {
24
- districtID: number;
25
- totalPop: number;
26
- popDevPct: number;
27
- bEqualPop: boolean;
28
- bNotEmpty: boolean;
29
- bContiguous: boolean;
30
- bNotEmbedded: boolean;
31
- demPct: number;
32
- repPct: number;
33
- othPct: number;
34
- totalVAP: number;
35
- whitePct: number;
36
- minorityPct: number;
37
- blackPct: number;
38
- hispanicPct: number;
39
- pacificPct: number;
40
- asianPct: number;
41
- nativePct: number;
42
- };
43
- export type DistrictStatistics = {
44
- table: DistrictRow[];
45
- details: {};
46
- datasets: T.Datasets;
47
- resources: {};
48
- };
49
- export declare function prepareDistrictStatistics(s: AnalyticsSession, bLog?: boolean): DistrictStatistics;
50
- export declare function doAnalyzePostProcessing(s: AnalyticsSession, bLog?: boolean): void;
package/dist/rpv.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Types } from '@dra2020/dra-analytics';
2
- import { AnalyticsSession } from './_api';
3
- export declare function doRPV(s: AnalyticsSession, districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
2
+ import * as D from './data';
3
+ export declare function doRPV(container: D.SessionData, districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
4
4
  export declare function inferSelectedMinority(groups: Types.MinorityFilter): string;
package/dist/score.d.ts CHANGED
@@ -1,9 +1,8 @@
1
+ import { Types } from '@dra2020/dra-analytics';
1
2
  import * as L from './legacy-types';
2
3
  import * as T from './types';
3
- import { AnalyticsSession } from './_api';
4
- import { Types } from '@dra2020/dra-analytics';
5
- export declare function profilePlan(s: AnalyticsSession, bLog?: boolean): L.Profile;
6
- export declare function getStatewideDemographics(s: AnalyticsSession, bLog?: boolean): L.Demographics;
4
+ import * as D from './data';
5
+ export declare function makeProfile(container: D.SessionData): L.Profile;
7
6
  export declare function computeMetrics(p: L.Profile, districtShapes: T.GeoFeatureCollection, bLog?: boolean): Types.Scorecard;
8
7
  export declare function rateKeyDimensions(scorecard: Types.Scorecard, p: L.Profile, bLog?: boolean): Types.Scorecard;
9
8
  export declare function thunkScorecard(newScorecard: Types.Scorecard, bLog?: boolean): L.Scorecard;
@@ -1,4 +1,3 @@
1
1
  export declare const PRECISION: number;
2
2
  export declare const NOT_ASSIGNED: number;
3
- export declare const NUMBER_OF_ITEMS_TO_REPORT: number;
4
3
  export declare const OUT_OF_STATE: string;
@@ -1,39 +1,16 @@
1
1
  import { Types } from '@dra2020/dra-analytics';
2
- import { PF } from '@dra2020/dra-types';
3
- import { RequirementsChecklist } from './results';
4
- import { DistrictStatistics } from './results';
5
- import * as D from './_data';
2
+ import * as D from './data';
6
3
  import * as T from './types';
7
4
  import * as L from './legacy-types';
8
5
  export declare class AnalyticsSession {
9
- title: string;
10
- legislativeDistricts: boolean;
11
- config: T.Dict;
12
- bOneTimeProcessingDone: boolean;
13
- bPlanAnalyzed: boolean;
14
- bPostProcessingDone: boolean;
15
- tests: T.TestEntries;
16
- _profile?: L.Profile;
17
- _scorecard?: L.Scorecard;
18
- state: D.State;
19
- counties: D.Counties;
20
- graph: D.GraphClass;
21
- features: D.Features;
22
- plan: D.Plan;
23
- districts: D.Districts;
24
- aggregates: PF.PackedFields[];
25
- repsByDistrict?: number[];
6
+ data: D.SessionData;
7
+ bLog: boolean;
26
8
  constructor(SessionRequest: T.SessionRequest);
27
- processConfig(config: T.Dict): T.Dict;
28
9
  analyzePlan(bLog?: boolean, overridesJSON?: any): boolean;
29
- getGoodShapes(): T.GeoFeatureCollection;
30
10
  analyzeRacialPolarization(districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
31
- getDistrictStatistics(bLog?: boolean): DistrictStatistics;
32
11
  getPlanProfile(bLog?: boolean): L.Profile;
33
12
  getPlanScorecard(bLog?: boolean): L.Scorecard;
34
13
  getRatings(bLog?: boolean): T.Ratings;
35
- getRequirementsChecklist(bLog?: boolean): RequirementsChecklist;
36
- getDiscontiguousDistrictFeatures(bLog?: boolean): T.GeoFeatureCollection;
37
- getTest(testID: T.Test): T.TestEntry;
38
- populationDeviationThreshold(): number;
14
+ getRequirementsChecklist(bLog?: boolean): T.RequirementsChecklist;
15
+ getDistrictStatistics(bLog?: boolean): T.DistrictStatistics;
39
16
  }
@@ -1,5 +1,5 @@
1
- import { Types } from '@dra2020/dra-analytics';
2
1
  import * as T from './types';
2
+ export * from './data';
3
3
  import { AnalyticsSession } from './_api';
4
4
  export type TransposedTable = {
5
5
  totalPop: number[];
@@ -32,7 +32,7 @@ export type TransposedTable = {
32
32
  asianPct: number[];
33
33
  nativePct: number[];
34
34
  };
35
- export declare class Districts {
35
+ export declare class LegacyDistricts {
36
36
  _session: AnalyticsSession;
37
37
  _shapes: T.GeoFeatureCollection;
38
38
  _geoProperties: T.DistrictProperties;
@@ -48,69 +48,4 @@ 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: Types.MinorityFilter, bLog?: boolean): Types.DemographicVotingByFeature | undefined;
52
- }
53
- export declare function inferSelectedMinority(groups: Types.MinorityFilter): string;
54
- export declare class Features {
55
- _session: AnalyticsSession;
56
- _data: T.GeoFeatureCollection;
57
- _keys: T.DatasetKeys;
58
- _featureIDs: T.FeaturesByGeoID;
59
- constructor(s: AnalyticsSession, data: T.GeoFeatureCollection, keys: T.DatasetKeys);
60
- nFeatures(): number;
61
- featureByIndex(i: number): T.GeoFeature;
62
- resetDataset(d: T.Dataset, k: string): void;
63
- mapGeoIDsToFeatureIDs(): void;
64
- featureID(i: string): number;
65
- }
66
- export declare function geoIDForFeature(f: any): string;
67
- export declare function fieldForFeature(f: any, dk: string, ff: T.FeatureField): any;
68
- export declare class Counties {
69
- _session: AnalyticsSession;
70
- _data: T.GeoFeatureCollection;
71
- _countyNameLookup: T.FIPSCodeToCountyNameMap;
72
- nCounties: number;
73
- index: T.FIPSToOrdinalMap;
74
- fips: T.OrdinalToFIPSlMap;
75
- totalPopulation: number[];
76
- constructor(s: AnalyticsSession, data: T.GeoFeatureCollection);
77
- countyByIndex(i: number): T.GeoFeature;
78
- propertyForCounty(f: any, pk: string): any;
79
- mapFIPSToName(fips: string, name: string): void;
80
- nameFromFIPS(fips: string): string;
81
- indexFromFIPS(fips: string): number;
82
- }
83
- export declare class State {
84
- _session: AnalyticsSession;
85
- xx: string;
86
- nDistricts: number;
87
- nReps: number;
88
- totalPop: number;
89
- targetSize: number;
90
- tooBigFIPS: string[];
91
- tooBigName: string[];
92
- singleCountyDistrictMax: number;
93
- expectedSplits: number;
94
- expectedAffected: number;
95
- constructor(s: AnalyticsSession, xx: string, n: number);
96
- }
97
- export declare class Plan {
98
- _session: AnalyticsSession;
99
- _planByGeoID: T.PlanByGeoID;
100
- _planByDistrictID: T.PlanByDistrictID;
101
- districtIDs: number[];
102
- constructor(s: AnalyticsSession, p: T.PlanByGeoID);
103
- invertPlan(bLog?: boolean): void;
104
- initializeDistrict(i: number): void;
105
- byGeoID(): T.PlanByGeoID;
106
- byDistrictID(): T.PlanByDistrictID;
107
- districtForGeoID(i: string): number;
108
- geoIDsForDistrictID(i: number): Set<string>;
109
- }
110
- export declare function invertPlan(plan: T.PlanByGeoID, s?: AnalyticsSession, bLog?: boolean): T.PlanByDistrictID;
111
- export declare class GraphClass {
112
- _session: AnalyticsSession;
113
- _graph: T.ContiguityGraph;
114
- constructor(s: AnalyticsSession, graph: T.ContiguityGraph);
115
- peerNeighbors(node: string): string[];
116
51
  }
@@ -1,4 +1,2 @@
1
1
  import { AnalyticsSession } from './_api';
2
- export declare function doAnalyzeDistricts(s: AnalyticsSession, bLog?: boolean): void;
3
- export declare function doAnalyzePlan(s: AnalyticsSession, bLog?: boolean): void;
4
- export declare function doDeriveSecondaryTests(s: AnalyticsSession, bLog?: boolean): void;
2
+ export declare function newAnalyzePlan(s: AnalyticsSession): boolean;
@@ -1,4 +1,3 @@
1
1
  import * as T from './types';
2
- import { AnalyticsSession } from './_api';
3
- export declare function doFindCountiesSplitUnexpectedly(s: AnalyticsSession, bLog?: boolean): T.TestEntry;
4
- export declare function doFindSplitVTDs(s: AnalyticsSession, bLog?: boolean): T.TestEntry;
2
+ import * as D from './data';
3
+ export declare function findCountiesSplitUnexpectedly(container: D.SessionData, bLog?: boolean): T.TestEntry;
@@ -1,2 +0,0 @@
1
- import { AnalyticsSession } from './_api';
2
- export declare function extractDistrictProperties(s: AnalyticsSession, bLog?: boolean): void;
@@ -1,37 +1,80 @@
1
+ import { PF } from '@dra2020/dra-types';
2
+ import { Types } from '@dra2020/dra-analytics';
1
3
  import * as T from './types';
4
+ import * as L from './legacy-types';
5
+ import * as D from './data';
2
6
  import { AnalyticsSession } from './_api';
3
- export declare class Districts {
7
+ export declare class SessionData {
4
8
  _session: AnalyticsSession;
9
+ profile?: L.Profile;
10
+ legacyScorecardAlt?: L.Scorecard;
11
+ newScorecard?: Types.Scorecard;
12
+ ratings?: T.Ratings;
13
+ checklist?: T.RequirementsChecklist;
14
+ statistics?: T.DistrictStatistics;
15
+ bOneTimeProcessingDone: boolean;
16
+ bPlanAnalyzed: boolean;
17
+ title: string;
18
+ legislativeDistricts: boolean;
19
+ repsByDistrict?: number[];
20
+ config: T.Dict;
21
+ state: State;
22
+ counties: Counties;
23
+ graph: T.ContiguityGraph;
24
+ features: Features;
25
+ plan: Plan;
26
+ districts: Districts;
27
+ aggregates: Aggregates;
28
+ CxD: number[][];
29
+ constructor(s: AnalyticsSession, SessionRequest: T.SessionRequest);
30
+ }
31
+ export declare class Aggregates {
32
+ _container: D.SessionData;
33
+ _aggregates: PF.PackedFields[];
34
+ unpacked: {
35
+ [key: string]: {
36
+ [key: string]: number[];
37
+ };
38
+ };
39
+ columns: {
40
+ [key: string]: any[];
41
+ };
42
+ constructor(container: D.SessionData, aggregates: PF.PackedFields[]);
43
+ process(): void;
44
+ transpose(): T.DistrictRow[];
45
+ private _unpack;
46
+ private _columnize;
47
+ private _checkReqs;
48
+ private _convert;
49
+ }
50
+ export declare class Districts {
51
+ _container: D.SessionData;
5
52
  _shapes: T.GeoFeatureCollection;
6
- _geoProperties: T.DistrictProperties;
7
- constructor(s: AnalyticsSession, ds: T.GeoFeatureCollection);
8
- getDistrictShapes(): T.GeoFeatureCollection;
9
- getDistrictShapeByID(id: number): T.GeoFeature | undefined;
10
- getCountyIndex(geoID: string): number;
53
+ constructor(container: D.SessionData, ds: T.GeoFeatureCollection);
54
+ getShapes(): T.GeoFeatureCollection;
11
55
  }
12
56
  export declare class Features {
13
- _session: AnalyticsSession;
57
+ _container: D.SessionData;
14
58
  _data: T.GeoFeatureCollection;
15
59
  _keys: T.DatasetKeys;
16
60
  _featureIDs: T.FeaturesByGeoID;
17
- constructor(s: AnalyticsSession, data: T.GeoFeatureCollection, keys: T.DatasetKeys);
61
+ constructor(container: D.SessionData, data: T.GeoFeatureCollection, keys: T.DatasetKeys);
18
62
  nFeatures(): number;
19
63
  featureByIndex(i: number): T.GeoFeature;
20
- resetDataset(d: T.Dataset, k: string): void;
21
64
  mapGeoIDsToFeatureIDs(): void;
22
65
  featureID(i: string): number;
23
66
  }
24
67
  export declare function geoIDForFeature(f: any): string;
25
68
  export declare function fieldForFeature(f: any, dk: string, ff: T.FeatureField): any;
26
69
  export declare class Counties {
27
- _session: AnalyticsSession;
70
+ _container: D.SessionData;
28
71
  _data: T.GeoFeatureCollection;
29
72
  _countyNameLookup: T.FIPSCodeToCountyNameMap;
30
73
  nCounties: number;
31
74
  index: T.FIPSToOrdinalMap;
32
75
  fips: T.OrdinalToFIPSlMap;
33
76
  totalPopulation: number[];
34
- constructor(s: AnalyticsSession, data: T.GeoFeatureCollection);
77
+ constructor(container: D.SessionData, data: T.GeoFeatureCollection);
35
78
  countyByIndex(i: number): T.GeoFeature;
36
79
  propertyForCounty(f: any, pk: string): any;
37
80
  mapFIPSToName(fips: string, name: string): void;
@@ -39,7 +82,7 @@ export declare class Counties {
39
82
  indexFromFIPS(fips: string): number;
40
83
  }
41
84
  export declare class State {
42
- _session: AnalyticsSession;
85
+ _container: D.SessionData;
43
86
  xx: string;
44
87
  nDistricts: number;
45
88
  nReps: number;
@@ -50,14 +93,14 @@ export declare class State {
50
93
  singleCountyDistrictMax: number;
51
94
  expectedSplits: number;
52
95
  expectedAffected: number;
53
- constructor(s: AnalyticsSession, xx: string, n: number);
96
+ constructor(container: D.SessionData, xx: string, n: number);
54
97
  }
55
98
  export declare class Plan {
56
- _session: AnalyticsSession;
99
+ _container: D.SessionData;
57
100
  _planByGeoID: T.PlanByGeoID;
58
101
  _planByDistrictID: T.PlanByDistrictID;
59
102
  districtIDs: number[];
60
- constructor(s: AnalyticsSession, p: T.PlanByGeoID);
103
+ constructor(container: D.SessionData, p: T.PlanByGeoID);
61
104
  invertPlan(bLog?: boolean): void;
62
105
  initializeDistrict(i: number): void;
63
106
  byGeoID(): T.PlanByGeoID;
@@ -65,4 +108,5 @@ export declare class Plan {
65
108
  districtForGeoID(i: string): number;
66
109
  geoIDsForDistrictID(i: number): Set<string>;
67
110
  }
68
- export declare function invertPlan(plan: T.PlanByGeoID, s?: AnalyticsSession, bLog?: boolean): T.PlanByDistrictID;
111
+ export declare function invertPlan(plan: T.PlanByGeoID, container?: D.SessionData, bLog?: boolean): T.PlanByDistrictID;
112
+ export declare function processConfig(config: T.Dict): T.Dict;
@@ -1,3 +0,0 @@
1
- import * as T from './types';
2
- import { AnalyticsSession } from './_api';
3
- export declare function doHasEqualPopulations(s: AnalyticsSession, bLog?: boolean): T.TestEntry;
@@ -1,6 +1,6 @@
1
1
  export * from './_api';
2
- export { geoIDForFeature, fieldForFeature, inferSelectedMinority } from './_data';
3
- export * from './results';
2
+ export { geoIDForFeature, fieldForFeature } from './data';
3
+ export { inferSelectedMinority } from './rpv';
4
4
  export * from './types';
5
5
  export { Profile, Scorecard, SplittingScorecard, Measurement } from './legacy-types';
6
6
  export * from './utils';
@@ -1,3 +1,4 @@
1
+ import { Dict } from './types';
1
2
  export type Profile = {
2
3
  state: string;
3
4
  name: string;
@@ -159,6 +160,3 @@ export type SVpoint = {
159
160
  v: number;
160
161
  s: number;
161
162
  };
162
- export type Dict = {
163
- [key: string]: any;
164
- };
@@ -1,6 +0,0 @@
1
- import { Types } from '@dra2020/dra-analytics';
2
- import * as T from './types';
3
- import { AnalyticsSession } from './_api';
4
- export declare function getMajorityMinority(s: AnalyticsSession): T.Dict;
5
- export declare function getVRASection5(s: AnalyticsSession): string;
6
- export declare function doAnalyzeRacialPolarization(s: AnalyticsSession, districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
@@ -1,2 +1,2 @@
1
1
  import { AnalyticsSession } from './_api';
2
- export declare function doPreprocessData(s: AnalyticsSession, bLog?: boolean): void;
2
+ export declare function initialize(s: AnalyticsSession): void;
@@ -0,0 +1,12 @@
1
+ import * as D from './data';
2
+ export declare function isComplete(popByDistricts: number[]): boolean;
3
+ export declare function emptyDistricts(popByDistricts: number[]): number[];
4
+ export declare function getUnassignedFeatures(container: D.SessionData): string[];
5
+ export declare function isContiguous(geoids: Set<string>, graph: {
6
+ [geoID: string]: string[];
7
+ }, bLog?: boolean): boolean;
8
+ export declare function isEmbedded(districtID: number, geoids: Set<string>, plan: {
9
+ [geoID: string]: number;
10
+ }, graph: {
11
+ [geoID: string]: string[];
12
+ }, bLog?: boolean): boolean;
@@ -1,50 +0,0 @@
1
- import * as T from './types';
2
- import { AnalyticsSession } from './_api';
3
- export type RequirementsChecklist = {
4
- score: boolean;
5
- metrics: {
6
- complete: boolean;
7
- contiguous: boolean;
8
- freeOfHoles: boolean;
9
- equalPopulation: boolean;
10
- };
11
- details: {
12
- unassignedFeatures: string[];
13
- emptyDistricts: number[];
14
- discontiguousDistricts: number[];
15
- embeddedDistricts: number[];
16
- populationDeviation: number;
17
- deviationThreshold: number;
18
- };
19
- datasets: T.Datasets;
20
- resources: {};
21
- };
22
- export declare function prepareRequirementsChecklist(s: AnalyticsSession, bLog?: boolean): RequirementsChecklist;
23
- export type DistrictRow = {
24
- districtID: number;
25
- totalPop: number;
26
- popDevPct: number;
27
- bEqualPop: boolean;
28
- bNotEmpty: boolean;
29
- bContiguous: boolean;
30
- bNotEmbedded: boolean;
31
- demPct: number;
32
- repPct: number;
33
- othPct: number;
34
- totalVAP: number;
35
- whitePct: number;
36
- minorityPct: number;
37
- blackPct: number;
38
- hispanicPct: number;
39
- pacificPct: number;
40
- asianPct: number;
41
- nativePct: number;
42
- };
43
- export type DistrictStatistics = {
44
- table: DistrictRow[];
45
- details: {};
46
- datasets: T.Datasets;
47
- resources: {};
48
- };
49
- export declare function prepareDistrictStatistics(s: AnalyticsSession, bLog?: boolean): DistrictStatistics;
50
- export declare function doAnalyzePostProcessing(s: AnalyticsSession, bLog?: boolean): void;
package/dist/src/rpv.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Types } from '@dra2020/dra-analytics';
2
- import { AnalyticsSession } from './_api';
3
- export declare function doRPV(s: AnalyticsSession, districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
2
+ import * as D from './data';
3
+ export declare function doRPV(container: D.SessionData, districtID: number, groups: Types.MinorityFilter, bLog?: boolean): Types.RPVAnalysis | undefined;
4
4
  export declare function inferSelectedMinority(groups: Types.MinorityFilter): string;
@@ -1,9 +1,8 @@
1
+ import { Types } from '@dra2020/dra-analytics';
1
2
  import * as L from './legacy-types';
2
3
  import * as T from './types';
3
- import { AnalyticsSession } from './_api';
4
- import { Types } from '@dra2020/dra-analytics';
5
- export declare function profilePlan(s: AnalyticsSession, bLog?: boolean): L.Profile;
6
- export declare function getStatewideDemographics(s: AnalyticsSession, bLog?: boolean): L.Demographics;
4
+ import * as D from './data';
5
+ export declare function makeProfile(container: D.SessionData): L.Profile;
7
6
  export declare function computeMetrics(p: L.Profile, districtShapes: T.GeoFeatureCollection, bLog?: boolean): Types.Scorecard;
8
7
  export declare function rateKeyDimensions(scorecard: Types.Scorecard, p: L.Profile, bLog?: boolean): Types.Scorecard;
9
8
  export declare function thunkScorecard(newScorecard: Types.Scorecard, bLog?: boolean): L.Scorecard;
@@ -1,4 +1,3 @@
1
1
  export declare const PRECISION: number;
2
2
  export declare const NOT_ASSIGNED: number;
3
- export declare const NUMBER_OF_ITEMS_TO_REPORT: number;
4
3
  export declare const OUT_OF_STATE: string;