{'fraction_non_alphanumeric': 0.026705446853516657, 'fraction_numerical': 0.011678124449145073, 'mean_word_length': 4.755262490489475, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comparing Voting Districts with Uncertain Data Envelopment Analysis

Gerrymandering voting districts is one of the most salient concerns of contemporary American society, and the creation of new voting maps, along with their subsequent legal challenges, speaks for much of our modern political discourse. The legal, societal, and political debate over serviceable voting districts demands a concept of fairness, which is a loosely characterized, but amorphous, concept that has evaded precise definition. We advance a new paradigm to compare voting maps that avoids the pitfalls associated with an a priori metric being used to uniformly assess maps. Our evaluative method instead shows how to use uncertain data envelopment analysis to assess maps on a variety of metrics, a tactic that permits each district to be assessed separately and optimally. We test our methodology on a collection of proposed and publicly available maps to illustrate our assessment strategy.


Introduction and Strategy
The question of how to draw congressional boundaries in the US is among the most politically charged of debates, and as such, it has drawn significant attention in both our contemporary literature, see e.g. [2,8,19,22], and in our academic literature, see [3,4,6,15,16,17,18,20,23] as well as the related districting problems in [5,9,12]. Recent concerns about partisan tactics have lead to legal cases [24], and gerrymandering has been linked to economic impacts [1]. Moreover, there are numerous amalgamations of federal and state laws that blur any sense of an ideal process, a fact that regularly promotes wrangling among political factions.
Our goal here is not to enter the highly contested fray of drawing congressional boundaries per se, and we are not advocating for any specific type of map or for any particular map quality. We instead have the singular goal to demonstrate that it is reasonable to compare different congressional maps relative to a collection of agreed upon characteristics. We example a couple of justifiable characteristics and use them to compute a map's proximity to equitable efficiency [11], which is an evaluation that permits each map, and indeed each district, to be assessed on its own optimal metric. The map closest to equitable efficiency is then declared to be the best of the comparative cohort.
We adopt the sense of efficiency from data envelopment analysis (DEA), which is a stalwart analytic technique that separates decision making units (DMUs) into those that are efficient and those that are not. There are numerous DEA adaptations, see [7] as a review, but we build from the recent work in [10,11], the latter of which defines the proximity to equitable efficiency. We neither review DEA nor its recent robust/uncertain extensions for the sake of brevity, although readers can find recent reviews and advances in [21,25,26]. The proximity to equitable efficiency is the smallest amount of uncertainty required of the defining characteristics so that all DMUs have a claim to efficiency with an appropriate selection of data from within the collection of uncertain possibilities. So a collection of DMUs with a small proximity value indicates a shared efficiency status, whereas a large proximity value suggests disparities among the DMUs. We note that small proximity values do not imply similar characteristics but instead mean that each DMU has a way to weight its defining characteristics to reach an efficiency score of one.

Characteristic Data
Congressional districts segment a state's population by assigning individuals to districts, and we assume that C s represents a district and that C = {C s : s = 1, 2, . . . , S} is a proposed map for a particular state. We select two characteristics for each district, one input and one output, the intents of which are: input-characteristicminimize wasted votes, and output-characteristicmaximize proportional representation.
We tout the use of one input and one output in our example because the proximity value is restricted within a range whose bounds have a ratio no greater than √ 2, which is the smallest possible ratio [14]. The use of only two characteristics further supports graphical interpretation. However, our assessment strategy extends to an arbitrary number of inputs and outputs, and political and social scientists could straightforwardly include more and different characteristics.
Eight different maps are compared for each state from FiveThiryEight's The Atlas of Redistricting. 1 Each district in the atlas associates with 1) a chance of being represented by a democrat, 2) a chance of being represented by a republican, and 3) the size of the voting age population, as well as several other statistics. We further collect the political leaning of each state from the Pew Research Center, 2 data that divides each state's population into percentages that are, or lean, republican; are, or lean, democrat; and that have no tendency. We simplify this information by evenly splitting the percentage having no tendency between the other two categories. We use the following notation for these statistics: We assume two parties, and as such, ρ D skt = 1 − ρ R skt and D k = 1 − R k . Our input-characteristic is a normalized proxy for wasted votes and is modeled as, We assume without loss of application that the size of the voting age population satisfies v skt ≥ 1/(ρ W skt − (1/2)), which presupposes the example's reality that ρ W skt > 1/2, i.e. no district under any map has perfect parity with regard to its chance of being represented by either party. This assumption ensures the nonnegativity of X skt . As an illustration, suppose a district with 10000 eligible voters has an 80% chance of going republican and a 20% chance of going democratic. We interpret this information as there being a likely outcome of 8000 republican votes and 2000 democratic votes, in which case the losing party wasted all 2000 votes and the winning party wasted 8000−2000−1 = 5999 votes. The total number of wasted votes is thus 7999. The minimum number of wasted votes in a two party system is half of the total number of votes, and our numerator is 7999 − 5000 = 2999 as a deviation from this ideal. The denominator normalizes this calculation and guarantees that where the approximation is asymptotically perfect as the population grows. Voting age populations are in the hundreds of thousands, and our practical upper bound on X skt is 1/3. The input-characteristic for the example is 2999/12999 ≈ 0.23. Notice that X skt is near its smallest assumed value of zero only if which coincides with there being a minimum number of wasted votes under our assumption on the size of the voting age population. The output-characteristic represents each district's importance with regard to statewide proportional representation. Let Z skt be a binary random variable so that an observation of 1 means that district s is won by the anticipated party and an observation of 0 means that the district is lost by the anticipated party. The output-characteristic we assume is a conditional expectation of the form, The value of γ k is the targeted proportional representation for state k, represented by The random vector Z kt indexes over s and represents a possible outcome of an election in state k under map t. For instance, if state k under map t has 5 districts, then an election outcome could be Z kt = (1, 0, 1, 1, 0), which would mean that districts 1, 3, and 4 were won by the anticipated party but that districts 2 and 5 were upset by the non-anticipated party. The function ψ calculates the ratio of majority to minority party districts won. Suppose for instance that Z kt = (1, 0, 1, 1, 0) as above and that the Republicans hold a 60% majority in the state. Then the statewide Republican to Democrat ratio is γ k = 0.6/0.4 = 1.5. Suppose further that the first four districts are majority Republican and are thus anticipated to be won by Re-publicans. The election represented by Z kt shows that Republicans won three of their four anticipated districts and that Democrats lost their one anticipated district. The ratio of majority to minority district wins in this case is 4/1 = 4, which for this particular outcome of Z kt gives, As a second illustration, suppose we are calculating the importance of the third district, which is majority Republican. The most anticipated outcome with district three being lost by the Republicans is Z kt = (1, 1, 0, 1, 1), and the ratio of majority to minority district wins in this case is 3/2 = 1.5. The result for this outcome of Z kt is thus, This calculation suggests that district three's importance toward achieving statewide district proportionality is diminished, especially if the sample election (1, 1, 0, 1, 1) is highly likely given the district's loss. Republican districts one, two, and four have similar interpretations in this case, although their Y skt values are unlikely to be identical due to their varying chances of being won or lost. We note that the denominator defining Y skt normalizes deviation from an assumed ideal like the denominator of X skt , which helps maintain scale. We further note that the evaluation of ψ(Z kt ) could have been justifiably weighted by the districts' populations, its just that we have instead decided to count districts as representative party units. We simulate elections to estimate Y skt . One concern with calculating Y skt during a simulation is that the minority party might lose all districts in any particular random election, which would make the denominator of ψ(Z kt ) zero. In this case we set ψ(Z kt ) to be the number of majority wins, which is a reasonable upper bound on all other cases -one that guarantees a finite expectation. Each Y skt is the average of 1000 sample means, with each being based on 250 random elections. A simulated election assigns each district other than s an independent sample from a standard uniform variable, and Z skt is 1 if the outcome is no more than max ρ D skt , ρ R skt . Otherwise Z skt is 0 and the district is won by the district's minority party.

Voting Maps
Eight different congressional maps are considered for each state. These maps are defined in The Atlas of Redistricting 3 and are: • Current (Crt) -the current congressional map (as of 2020), • Republican (Rep) -designed to favor Republicans, • Democrat (Dem) -designed to favor Democrats, • Ratio (Rto) -designed to match statewide partisan representation, • Competitive (Cpt) -designed to increase competitive elections, • MajMin (MMn) -attempts to maximize the number of majority-minority districts, • Compact (Cmt) -designed for most compact districts, and • County (Cty) -designed for compact districts that conform to county borders.
The compact map is generated algorithmically 4 , but all others are hand drawn by the author's of The Atlas Project, with designs being guided by general principles like requiring contiguous districts. We note that the term minority means racial or ethnic minority, and not political minority, when used to describe a map. Several of the maps are defined by a deliberate objective, and some of these objectives align with our inputs and outputs. Specifically, our suggestion to increase proportional representation agrees with the intent of the ratio map, and our suggestion to decrease wasted votes agrees with the intent of the competitive map. This observation might seem to bias our outcomes toward these maps, but this expectation is fallacious against our results. The reason is that the proximity to equitable efficiency is not solely defined by one of these objectives but is instead defined by each district's best employ of the characteristics so that it can simultaneously seek to maximize proportional representation and minimize the number of wasted votes -doing so in a way that best competes with the other districts of the map.

Experimental Commentary
The input data of our model is without doubt uncertain due to constant changes in demography and political sway. Selecting and promoting maps with a minimal proximity to equitable efficiency submits a preference toward maps that can uniformly achieve efficiency scores of one across their districts with only small adjustments in the political divisions imposed by the map. So a map most proximal to equitable efficiency is closest to a sense of 'perfect' fairness, by which we mean that each district has a way to measure itself with regard to the characteristics in a way that matches the others. If the proximity value is zero, then the map achieves this sense of equity without adjustment.
A collection of matrices defines the structure of uncertainty, and we assume identity matrices in our example for simplicity. We could adjust these matrices to explore different outcomes, but designing characteristics and detailing their relationships is generally the responsibility of experts should they use our proximity measure to evaluate maps. Moreover, our uncertainty assumption is mathematically on X skt and Y skt , but the lack of knowledge really stems from the imperfect nature of the supporting data, i.e. from ρ D skt , ρ R skt , v skt , D k , and R k . Each map associates with a heuristically estimated σ * = (σ * X , σ * Y ) that expresses (near) minimum levels of uncertainty required of the transformed data X skt and Y skt , and the proximity to equitable efficiency is P(C) = σ * . The search for σ * occurs within a region satisfying σ / √ 2 ≤ σ * ≤ σ , wherê σ is a bounding vector, although there are cases for which a search is unnecessary because P(C) = σ * = σ , see [14]. The components of σ * do not explicitly provide information about the original data ρ D skt , ρ R skt , v skt , D k , and R k , and while one could work to back-calculate the uncertainty necessitated of the original data, especially because doing so could identify influential political options that might improve a map's standing, we do not make this effort here and instead base our comments on the transformed data X skt and Y skt . We reiterate before presenting our results that our goal is not to advocate our outcomes as a catholicon for the gerrymandering problem. We only compare eight different maps and make no effort to draw or infer new or improved district boundaries. We only use two defendable characteristics based on sound data but do not consider different, or larger collections of, characteristics. The options and possibilities upon which an analysis could be made are very, very many, and we reiterate that our singular goal is to demonstrate that the proximity to equitable efficiency is a practical comparison tool that can support a datadriven approach to identifying a best congressional map from a predetermined collection of maps and an established set of characteristics. Table 1 contains a summary of our comparative study, and Table 2 in the supplementary material lists all outcomes. Only maps with the smallest proximity values are listed in Table 1, and only states with at least five congressional districts are included in this table. All states with only two congressional districts had at least six maps with proximity values of zero, but all states with at least three or four congressional districts had positive minimum proximity values. This last observation is somewhat surprising since a low number of DMUs would regularly lead to each district having an efficiency score of one.

Congressional Map Comparisons
Most proximity values in Table 1 are less than 0.1, which suggests that good maps for most states should have proximity measures below this value. Some states are much lower, for instance North Carolina and Washington, and some are higher, for instance Pennsylvania. The compact map for Pennsylvania has a highest proximity value of 0.2909, which is 244% of the minimum proximity value of the Republican map. This spread suggests substantial disparity in the districts' efficiency scores for the various maps. Similarly, the ratios of the highest to lowest proximity values for North Carolina and Washington are respectively 957% (Compact/Democratic) and 1242% (Current/Republican). Another observation is that we rarely invoke the equality P(C) = σ , with the best maps for New Jersey and Wisconsin being exceptions. Also notice that Num.
Most  Missouri, Alabama, and Louisiana have ties for their best map, with the current map being an option in each case. The vast majority of states otherwise have minimum proximity values that are decided by a single map. One way to visualize the disparity of the various maps is to plot their input and output characteristics against each other, a technique common in the DEA literature. Figure 1 depicts the characteristics for Pennsylvania, North Carolina, and Washington; graphs on the left show characteristics for all eight maps, and graphs on the right show characteristics for only the current, Republican, and Democratic maps. A district with characteristics in the upper left would be favorable since it would have an anticipated low number of wasted votes and a high expected value toward achieving proportional representation. Districts to the lower right reverse this sentiment and suggest a loss in quality as measured by our characteristics.
Consider the graph for North Carolina in Figure 1 that illustrates the current, Republican, and Democratic maps, for which the proximity measures are respectively 0.1680, 0.0932, and 0.0294. The Democratic map has the lowest proximity value of the three even though its districts trend toward the lower right portion of the graph, which might seem to suggest that the current and Republican maps are better. However, both the current and Republican maps have districts near the top and/or left of the graph that are somewhat distant from other districts toward the bottom and/or right, and this spread between their best and worst districts increases the value of the proximity to equitable efficiency. The proximity values for the current and Republican maps are higher than that of the Democratic map because they require more characteristic uncertainty before all districts have an equal claim to efficiency with regard to each other. This fact is important to note: the proximity to equitable efficiency is an intra-comparison and not an inter-comparison, and a map's proximity to equitable efficiency is indifferent to the other maps. In this case, the districts of the Democratic map are more equitable, especially with regard to their role in proportional representation, than are the districts of either the current or Republican map. An apt interpretation is that the high quality districts of the current and Republican maps force the other districts to have less quality with regard to efficiency, and it is this disparity that the proximity to equitable efficiency measures. A similar analysis applies to the comparison of the current, Republican, and Democratic maps of Washington, but in this case the Republican map's proximity value of 0.0192 bests those of the current and Democratic maps, which are 0.2385 and 0.1864. A graphical interpretation of Pennsylvania is less clear, and in this case the proximity values are 0.182 (current), 0.1194 (Republican), and 0.1342 (Democratic). Conspicuous disparities in this case appear, at least primarily, to be the result of variations with regard to wasted votes.
We remind that our proximity measure does not specifically favor a map because its districts have more homogeneous characteristics. This suspicion would in fact be a misinterpretation of the results just presented. For instance, it is incorrect to assume that the Republican map for Washington is favored by our proximity measure simply because its data is most clustered. The Wisconsin map in Figure 2 illustrates this point by adding the traditional efficient frontiers of each map. A map's proximity value is zero only if all districts lie on their respective efficient frontier. The Republican map in this case has the lowest proximity measure although its data has a greater spread of proportional representation and about an equal spread of wasted votes as compared with the Democratic map. To exaggerate this point, suppose that the current map's districts to the lower right had instead appeared on their (black) efficient frontier. The current map would have then had a proximity value of zero, and it would have been preferred over both the Democratic and Republican maps even though its districts would have had a far greater variation in their characteristics. Lastly, our proximity measure is also not a straightforward merger of distances from the efficient frontier because the frontier itself depends on how each district individually selects data from the realm of uncertain options.
The results of this section can be recreated with the supplemental python code, which is described in the supplementary material. This code could be altered to replace or add new characteristics or to assess newly proposed congressional maps. All robust problems were modeled with Pyomo [13] and solved with Gurobi.

Supplmentary Materials for
Comparing Voting Districts with Uncertain Data Envelopment Analysis

Software
Python code to reproduce the results in Using Uncertain Data Envelopment Analysis to Compare Classifications with an Application in Gerrymandering is part of the supplementary materials. Data is located in the data directory with the following titles: • CongressionalDistricts.txt -original source data from FiveThirtyEight's The Atlas of Redistricting, • partyAffiliation.csv -original source data from the Pew Research Center, • XdataFile.dat.article -transformed data X skt , • YdataFile.dat.article -transformed data Y skt , • gmResultsStateMap.csv -results in Table 2 in Section 2, and • gmResultsState.csv -results for all states like those in Table 1 of the article.
Python code is in the ver1 directory, with the primary script being gerrymandering.py.
The code runs with Python 2.7.17 and requires Pyomo [13] and Gurobi. Settings at the top of gerrymandering.py allow a user to set the states and maps to consider, to generate new data (Y skt ), to save data, to generate new LaTeX tables, and to make new data plots like those in Figure 1. New figures are placed in the figs directory in png format. Completing the script with the article's data takes several hours, and simulating new data takes about an hour. Table 2 lists comparative results for all state and map combinations. The state order decreases in the number of congressional districts, and each value of P(C) is either boundedσ or is stated as an equality.

Complete Tabulated Results
Num. Most