This library supports analysis of population deviation & 'roughly' equal population.
There is one high-level export.
This calculates the population deviation and determines whether it meets the 'roughly' equal population threshold. This is part of an overall DRA scorecard. The deviation can be later rated (scored).
export declare function makePopulationScorecard(totPopByDistrict: number[], targetSize: number, bLegislative: boolean, bLog: boolean = false): PopulationScorecard;
This is the formula for population deviation.
export declare function calcPopulationDeviation(max: number, min: number, targetSize: number): number;
This checks whether a population deviation meets the 'rough' equal threshold, taking into account the kind of districts (congressional or state legislative).
export declare function isRoughlyEqual(devation: number, bLegislative: boolean): boolean;