This function checks conditions inputted to clean_race by the user
check_diffs(vote_sums, provided_totals, max_dev = 0.1, avg_dev = 0.25)
A list containing two objects, 'closeness' and 'deviates'. See details for more information.
A numeric vector containing the sums of votes by each race/ethnicity
A numeric vector containing the totals provided to the clean_race function
A floating point object passed from clean_race
A floating point object passed from clean_race
Ari Decter-Frain
When this function returns 0, votes do not sum close enough to the provided vote totals.
When this function returns 1, votes sum marginally away from the provided totals. Restandardization is appropriate
When this function returns 2, votes sum exactly to vote totals