With planning for the Michigan redistricting commission underway, in class we are discussing ways of assessing compactness and partisan wasted votes along with the corresponding ‘efficiency gap’ (Stephanopoulos and McGhee 2015). A recent article by Kaufman, King, and Komisarchik (2018, http://j.mp/2jNf1Jl) on a survey based method to judge compactness includes an R package, “compactness” (
https://github.com/aaronrkaufman/compactness
), to calculate several traditional compactness scores along with the survey method proposed in the article. We used the package to compare compactness scores for district lines in Michigan.
Here I review the results, contrasting compactness scores across Michigan State House, Senate, and U.S. House districts. In a subsequent post I will compare these scores to the partisan symmetry of the districts.
The compactness package is available via devtools and github:
#devtools::install_github("aaronrkaufman/compactness")
library(compactness)
library(tidyverse) # for data maniplation and visualization
The package measures a series of compactness scores from district boundary line files stored in ESRI shape (.shp) files. The State’s open GIS portal contains the file (https://gis-michigan.opendata.arcgis.com/) to download to a local file path.
With the shapefile in a working directory, the compactness package makes reading in the boundary lines and measuring compactness easy:
shp<-"Michigan_U.S._Congressional_Districts_v17a.shp" # assign shapefile indicator to the .shp file
namecol<-"NAME" # specify the column containing the name of the legislative district
US_House<-read_shapefiles(shp, namecol) # function read_shapefile() which reads in the district coordinates
features_US_House <- generate_features(US_House) #generate the compactness measures
names(features_US_House) # multiple compactness measures
We copy the measures to an object
ushouse_compactness
, before updating the districts with the most recent legislator names, since the shape files pre-date changes in the 2018 election.## Features contains several measures of compactness
ushouse_compactness<-features_US_House
# updating the names of representatives
ushouse_compactness<- ushouse_compactness %>%
mutate(LEGISLATOR= fct_recode(LEGISLATOR,
"Rashida Tlaib" = "John Conyers Jr.",
"Elissa Slotkin" = "Mike Bishop",
"Andy Levin" = "Sander Levin",
"Haley Stevens" = "Dave Trott"
))
ushouse_compactness$LEGISLATOR
# updating incumbent party of district
ushouse_compactness<-ushouse_compactness %>%
mutate(PARTY = case_when(
LEGISLATOR == "Rashida Tlaib" ~ "D",
LEGISLATOR == "Elissa Slotkin" ~ "D",
LEGISLATOR == "Haley Stevens" ~ "D",
TRUE ~ as.character(PARTY)))
# names(ushouse_compactness)
We focused on the compactness metrics with intuitive geometric interpretations; the GIS analytics firm Azavea has a great explanation of the metrics here https://redistricting.azavea.com/.
ushouse_compactness<-ushouse_compactness %>%
select(NAME, LEGISLATOR, PARTY, hull, reock, polsby, schwartzberg, sym_x, sym_y)
For example, rank ordered by Polsby-Popper. Perhaps not surprisingly, the nearly rectangular 6th district represented by Fred Upton (R) (
https://www.govtrack.us/congress/members/MI#map
), scores the highest. Apart from the 1st district, represented by Jack Bergman (R),spanning the upper and lower peninsulas, the second least compact is the 14th, represented by Brenda Lawrence (D). It is interesting that while neighboring the 14th district, the 13th district represented by Rashida Tlaib (D) ranks as slightly more compact than 9th and 11th districts that form part of the spiral of districts over the Pontia, Farmington Hills, to Warren triangle.ushouse_compactness %>%
arrange(desc(polsby))
## # A tibble: 14 x 6
## NAME LEGISLATOR PARTY hull reock polsby
## <chr> <chr> <chr> <dbl> <dbl> <dbl>
## 1 06 Fred Upton R 0.865 0.344 0.539
## 2 04 John Moolenaar R 0.808 0.349 0.387
## 3 08 Elissa Slotkin D 0.763 0.167 0.368
## 4 02 Bill Huizenga R 0.833 0.382 0.338
## 5 07 Tim Walberg R 0.702 0.246 0.247
## 6 03 Justin Amash R 0.743 0.270 0.245
## 7 12 Debbie Dingell D 0.672 0.191 0.217
## 8 13 Rashida Tlaib D 0.612 0.195 0.182
## 9 11 Haley Stevens D 0.641 0.289 0.156
## 10 09 Andy Levin D 0.689 0.207 0.152
## 11 10 Paul Mitchell R 0.850 0.428 0.122
## 12 05 Daniel Kildee D 0.581 0.190 0.105
## 13 14 Brenda Lawrence D 0.396 0.152 0.0983
## 14 01 Jack Bergman R 0.435 0.127 0.0335
On to the Michigan State Senate (a PDF map: https://www.michigan.gov/documents/cgi/senate10statewide_371479_7.pdf), with the same sort on Polsby-Popper:
misenate_compactness %>%
arrange(desc(polsby)) %>%
print(n=38)
## # A tibble: 38 x 6
## NAME LEGISLATOR PARTY hull reock polsby
## <chr> <chr> <chr> <dbl> <dbl> <dbl>
## 1 20 Sean McCann D 0.998 0.449 0.787
## 2 34 Jon Bumstead R 0.955 0.462 0.739
## 3 30 Roger Victory R 0.882 0.413 0.632
## 4 23 Curtis Hertel, Jr. D 0.866 0.343 0.600
## 5 27 Jim Ananich D 0.861 0.324 0.552
## 6 22 Lana Theis R 0.931 0.397 0.545
## 7 33 Rick Outman R 0.822 0.413 0.543
## 8 09 Paul Wojno D 0.846 0.269 0.524
## 9 18 Jeff Irwin D 0.894 0.392 0.485
## 10 16 Mike Shirkey R 0.765 0.275 0.479
## 11 15 Jim Runestad R 0.799 0.386 0.471
## 12 26 Aric Nesbitt R 0.796 0.335 0.467
## 13 21 Kim LaSata R 0.821 0.175 0.458
## 14 07 Dayna Polehanki D 0.824 0.362 0.456
## 15 24 Tom Barrett R 0.779 0.268 0.403
## 16 17 Dale Zorn R 0.951 0.235 0.397
## 17 19 Dr. John Bizon R 0.718 0.341 0.368
## 18 10 Michael MacDonald R 0.764 0.289 0.341
## 19 32 Ken Horn R 0.681 0.301 0.327
## 20 13 Mallory McMorrow D 0.795 0.392 0.316
## 21 28 Peter MacGregor R 0.745 0.305 0.312
## 22 29 Winnie Brinks D 0.789 0.266 0.310
## 23 11 Jeremy Moss D 0.785 0.172 0.304
## 24 12 Rosemary Bayer D 0.701 0.342 0.250
## 25 03 Sylvia Santana D 0.719 0.360 0.243
## 26 35 Curt VanderWall R 0.636 0.238 0.238
## 27 06 Erika Geiss D 0.669 0.283 0.237
## 28 14 Ruth Johnson R 0.662 0.314 0.232
## 29 31 Kevin Daley R 0.654 0.196 0.179
## 30 01 Stephanie Chang D 0.472 0.116 0.175
## 31 36 Jim Stamas R 0.637 0.296 0.158
## 32 08 Pete Lucido R 0.580 0.261 0.153
## 33 05 Betty Jean Alexander D 0.525 0.239 0.150
## 34 02 Adam Hollier D 0.507 0.148 0.134
## 35 04 Marshall Bullock D 0.441 0.113 0.111
## 36 25 Dan Lauwers R 0.749 0.273 0.0989
## 37 38 Ed McBroom R 0.471 0.167 0.0697
## 38 37 Wayne A Schmidt R 0.527 0.202 0.0540
And then the Michigan State House:
mihouse_compactness %>%
arrange(desc(polsby)) %>%
print(n=110)
## # A tibble: 110 x 6 ## NAME LEGISLATOR PARTY hull reock polsby ## <chr> <chr> <chr> <dbl> <dbl> <dbl> ## 1 035 Kyra Bolden D 0.998 0.441 0.785 ## 2 037 Christine Greig D 0.996 0.443 0.782 ## 3 082 Gary Howell R 0.961 0.478 0.720 ## 4 054 Ronnie Peterson D 0.994 0.435 0.691 ## 5 041 Padma Kuppa D 0.956 0.426 0.655 ## 6 058 Eric Leutheuser R 0.950 0.299 0.653 ## 7 019 Laurie Pohutsky D 0.971 0.429 0.651 ## 8 080 Mary Whiteford R 0.936 0.335 0.641 ## 9 103 Daire Rendon R 0.907 0.298 0.629 ## 10 042 Ann Bollin R 0.903 0.318 0.623 ## 11 057 Bronna Kahle R 0.946 0.398 0.598 ## 12 012 Alex Garza D 0.912 0.251 0.570 ## 13 059 Aaron Miller R 0.949 0.264 0.567 ## 14 004 Isaac Robinson D 0.892 0.393 0.563 ## 15 100 Scott VanSingel R 0.840 0.380 0.555 ## 16 047 Hank Vaupel R 0.840 0.319 0.539 ## 17 085 Ben Frederick R 0.884 0.331 0.535 ## 18 026 Jim Ellison D 0.828 0.288 0.519 ## 19 033 Jeff Yaroch R 0.880 0.393 0.513 ## 20 027 Robert Wittenberg D 0.807 0.247 0.512 ## 21 066 Beth Griffin R 0.815 0.256 0.493 ## 22 045 Michael Webber R 0.909 0.439 0.493 ## 23 046 John Reilly R 0.881 0.299 0.474 ## 24 093 Graham Filler R 0.908 0.379 0.473 ## 25 040 Mari Manoogian D 0.877 0.287 0.469 ## 26 050 Tim Sneller D 0.812 0.298 0.467 ## 27 090 Bradley Slagh R 0.846 0.194 0.461 ## 28 088 Luke Meerman R 0.842 0.400 0.458 ## 29 052 Donna Lasinski D 0.814 0.287 0.457 ## 30 089 Jim Lilly R 0.734 0.315 0.452 ## 31 067 Kara Hope D 0.920 0.412 0.446 ## 32 061 Brandt Iden R 0.899 0.386 0.432 ## 33 043 Andrea Schroeder R 0.885 0.413 0.424 ## 34 077 Tommy Brann R 0.843 0.406 0.422 ## 35 038 Kathy Crawford R 0.815 0.298 0.421 ## 36 036 Douglas Wozniak R 0.931 0.317 0.421 ## 37 016 Kevin Coleman D 0.794 0.297 0.416 ## 38 001 Tenisha Yancey D 0.840 0.229 0.410 ## 39 003 Wendell Byrd D 0.823 0.148 0.408 ## 40 021 Kristy Pagan D 0.882 0.348 0.408 ## 41 064 Julie Alexander R 0.787 0.259 0.406 ## 42 095 Vanessa Guerra D 0.843 0.364 0.397 ## 43 083 Shane Hernandez R 0.784 0.268 0.392 ## 44 063 Matt Hall R 0.810 0.240 0.387 ## 45 015 Abdullah Hammoud D 0.778 0.265 0.381 ## 46 008 Sherry Gay-Dagnogo D 0.809 0.280 0.380 ## 47 020 Matt Koleszar D 0.769 0.263 0.378 ## 48 048 Sheryl Kennedy D 0.762 0.223 0.378 ## 49 023 Darrin Camilleri D 0.727 0.267 0.368 ## 50 099 Roger Hauck R 0.809 0.250 0.367 ## 51 072 Steven Johnson R 0.765 0.317 0.358 ## 52 028 Lori Stone D 0.816 0.426 0.358 ## 53 071 Angela Witwer D 0.870 0.369 0.353 ## 54 070 James Lower R 0.771 0.195 0.353 ## 55 096 Brian Elder D 0.834 0.283 0.349 ## 56 031 William Sowerby D 0.766 0.321 0.349 ## 57 069 Julie Brixie D 0.899 0.207 0.338 ## 58 044 Matt Maddock R 0.679 0.316 0.337 ## 59 009 Karen Whitsett D 0.797 0.302 0.335 ## 60 092 Terry Sabo D 0.709 0.286 0.333 ## 61 022 John Chirkun D 0.696 0.276 0.331 ## 62 025 Nate Shannon D 0.864 0.286 0.324 ## 63 056 Jason Sheppard R 0.826 0.378 0.323 ## 64 007 LaTanya Garrett D 0.711 0.224 0.322 ## 65 079 Pauline Wendzel R 0.765 0.193 0.317 ## 66 087 Julie Calley R 0.739 0.274 0.317 ## 67 104 Larry Inman R 0.783 0.346 0.315 ## 68 074 Mark Huizenga R 0.780 0.256 0.302 ## 69 062 Jim Haadsma D 0.617 0.186 0.299 ## 70 086 Thomas Albert R 0.676 0.251 0.298 ## 71 073 Lynn Afendoulis R 0.728 0.279 0.295 ## 72 039 Ryan Berman R 0.785 0.266 0.295 ## 73 078 Brad Paquette R 0.756 0.190 0.283 ## 74 002 Joe Tate D 0.743 0.259 0.278 ## 75 030 Diana Farrington R 0.695 0.288 0.278 ## 76 102 Michele Hoitenga R 0.687 0.227 0.274 ## 77 029 Brenda Carter D 0.668 0.207 0.265 ## 78 014 Cara Clemente D 0.660 0.243 0.264 ## 79 032 Pamela Hornberger R 0.598 0.280 0.259 ## 80 017 Joseph Bellino R 0.712 0.273 0.258 ## 81 053 Yousef Rabhi D 0.790 0.319 0.242 ## 82 060 Jon Hoadley D 0.797 0.392 0.237 ## 83 091 Greg VanWoerkom R 0.661 0.210 0.236 ## 84 005 Cynthia Johnson D 0.687 0.268 0.231 ## 85 018 Kevin Hertel D 0.642 0.220 0.231 ## 86 010 Leslie Love D 0.543 0.157 0.227 ## 87 051 Mike Mueller R 0.566 0.244 0.224 ## 88 011 Jewell Jones D 0.617 0.264 0.220 ## 89 097 Jason Wentworth R 0.831 0.114 0.220 ## 90 098 Annette Glenn R 0.680 0.252 0.216 ## 91 094 Rodney Wakeman R 0.637 0.256 0.216 ## 92 105 Triston Cole R 0.477 0.133 0.214 ## 93 075 David LaGrand D 0.716 0.333 0.210 ## 94 055 Rebekah Warren D 0.688 0.268 0.203 ## 95 068 Sarah Anthony D 0.723 0.374 0.202 ## 96 101 Jack O'Malley R 0.580 0.148 0.193 ## 97 049 John Cherry D 0.615 0.299 0.186 ## 98 006 Tyrone Carter D 0.510 0.110 0.181 ## 99 106 Sue Allor R 0.614 0.243 0.180 ## 100 109 Sara Cambensy D 0.596 0.146 0.175 ## 101 034 Sheldon Neeley D 0.711 0.382 0.174 ## 102 065 Sarah Lightner R 0.590 0.176 0.160 ## 103 024 Steve Marino R 0.559 0.199 0.160 ## 104 084 Phil Green R 0.774 0.288 0.133 ## 105 108 Beau LaFave R 0.638 0.265 0.122 ## 106 013 Frank Liberati D 0.390 0.137 0.122 ## 107 110 Gregory Markkanen R 0.456 0.194 0.0788 ## 108 076 Rachel Hood D 0.436 0.189 0.0683 ## 109 081 Gary Eisen R 0.493 0.226 0.0679 ## 110 107 Lee Chatfield R 0.464 0.158 0.0548
Next up on this subject a review of the wasted votes and efficiency gap, as well as recent mapping packages to plot the shapefiles.
Comments
Post a Comment