### Pennsylvania!

 The new PA Supreme Court approved US Congressional Districts. Courtesy of the Philadelphia Inquirer.
Last month, the Pennsylvania Supreme Court made big news when it ruled 4-3 that the current Pennsylvania Congressional districts are illegally structured to give Republicans an unfair advantage. In Pennsylvania, the Supreme Court is elected statewide, and the balance is currently 5-2 in favor of the Democrats, so perhaps this wasn't a surprise.

Also not a surprise was the fact the legislature (controlled in both houses by the Republicans) hated this decision, and immediately appealed the decision to the U.S. Supreme Court.  Samuel Alito oversees appeals made from Pennsylvania, and he dismissed the appeal out of hand.  When you've lost Alito (the decision was based on the state constitution, not the US constitution), then you've really lost.  But at least one State House member, Chris Dush, has supported impeaching the lot of them – the Democrats anyway, and so far, none of the Republican leadership has put the kibosh on impeachment talk.  Technically, they have the numbers, in large part because the State House and Senate districts are also illegally gerrymandered.  But, personally, I don't think they'll do it. After all, this ruling doesn't affect them directly (only the US districts). It's much more likely that behaving in such a nakedly partisan way would cost them seats on the whole, and I suspect they'll just continue to act like children.

The Court gave the Senate until February 9th to produce a map that the Governor approved of and not only couldn't they do so, they didn't even vote on a map in the State House of Senate. The leadership simply produced a map and passed it on to Gov. Wolf who, obviously, did not support it. The other part of the ruling was that if the legislature wouldn't produce a decent map, then they would draw it themselves.  They hired a non-partisan scholar, Nathaniel Persily, to produce the map above, and by any objective standard, it's way better than before.  To understand why, we need to delve into the nitty-gritty of how Pennsylvanians vote.

Gerrymandering Primer

 The old US House Boundaries are seriously messed up.

Pennsylvania Congressional Districts have some seriously messed up electoral boundaries – or at least they did until a few days ago.  Look especially in the Southeast (Philly) and the Southwest (Pittsburgh).  As you probably know, Pennsylvania's boundaries (like those in Wisconsin, Maryland, and many other states) are the product of gerrymandering. The origin of the word came from 1812 , when the governor of Massachussetts, Elbridge Gerry, redrew the legislative districts to favor his party, and it came out looking like this:

 Courtesy The good folks at wikipedia.
I'll do a more detailed post on the mathematics of gerrymandering in the near future, but the basic premise is pretty simple.  If one party controls district boundaries, then they can configure them to get the maximum number of seats.  Constitutionally, the districts have to have the same number of people in them, but there's historically been a great deal of leeway into the shapes of the boundaries (and in many states, the regions don't need to even be contiguous).

The basic idea is broken up into two parts.  In a Republican gerrymandered state:
1. Packing – Make it so that your opponents waste their votes by having ~100% of voters within a district be Democrats.
2. Cracking – Split up large groups of your opponents into multiple districts, so that you have a bare majority
Here's a nice graphic from Fairvote.org:
 From fairvote.org.  Their red-blue coloring scheme isn't accidental. Note that in the gerrymandered map (to the right), the blues win their districts by huge margins, but the red wins are much closer.

If – and this is a big if – you can predict exactly how each person will vote, and if you can draw completely arbitrary boundaries, then by attracting a fraction $f$ of the voters, you can get a theoretical maximum of $2f$ of the seats.  Any states where your voters are a majority, even a modest one, an incredibly brazen gerrymander will net you all of the states. This is (or was) very nearly the case in Pennsylvania, where there is near parity of voters (or, indeed, a slight Democratic advantage), but Republicans control $13/18=72%$ of the US House seats.

There are some complications.  For one, we can't always predict how people will vote. In a wave election (which, god willing this will be), you can get a tipping point where the gerrymander actually hurts the party who made the map.  In the cartoon gerrymandered map above, if about 1/6 of their voters switch from Red to Blue, the blues will win all 5 seats.  Think of it this way: all districts result in 0% of the votes get you 0% of the seats or all of the votes gets you all of the seats, and those "dots" need to be connected. In PA, ~50% of the votes got Democrats only 28% of the seats, but that means that the next 50% of the votes would get 72% of the seats.  Every marginal vote in a swing year counts for more than it would in a non-gerrymandered state.

There are a ton of problems with gerrymandering.  It's undemocratic for one.  And it allows a party that is in power temporarily to stay in power more or less indefinitely.  That is, unless there is a forced redistricting by the census and you've got a governor from the other party.  Or unless the courts rule it illegal.The PA Supreme Court case was decided based on the PA constitution, but there are several cases being considered by the US Supreme Court  (which will affect the maps in Wisconsin and Maryland, but likely Texas and North Carolina as well).

Pennsylvania has messed up boundaries on all levels

Pennsylvania is interesting in a lot of different ways.  It's big, the 6th most populous in the country (5.9 million votes in 2016), and one of the most purple in the country:
• 2012 President: Obama (D)/Romney (R) +5.4%
• 2012 Senator: Casey (D)/Smith (R) +7.3%
• 2014 Governor: Wolf (D)/Corbett (R) +9.1%
• 2016 Senator: Toomey (R)/McGinty (D) -1.4%
• 2016 President: Trump (R)/Clinton(D) -0.7%
But even more significant is where those voters live.  The cities are very Democratic, the suburbs is much more closely split, and the rural districts tend to go 25-75 Republican.  This becomes very stark if we look at the precinct level outcomes from the last 4 statewide races.

 A histogram of the precinct level outcomes in the last presidential race, the last gubernatorial race, and the last two senate races in PA. Each line represents the number of district with a particular Democratic vote share. The peak to the right represents Philadelphia districts.
You can immediately see a problem with any redistricting scheme.  There are a ton of precincts (the smallest divisions available) that are for all intents and purposes, 100% Democrat, but there's no similar case for the Republicans. Put congressional districts entirely within Philadelphia and Pittsburgh, and you've immediately accomplished a successful packing.

You will also notice that even in the same year, 2016, the distribution for president produces Dem precincts which are far more Democratic than typical (Philadelphia really hated Trump), and a much wider "red tail" on the left of the plots. There are essentially no 10-90 districts in even the McGinty-Toomey Senate race that also took place in 2016, but there are a bunch that fell that way in the presidential race.  At the precinct level, we can see an S-shaped pattern indicating that the 2016 election
 2016 outcomes by precinct differed significantly between the senate and presidential race. Hillary overperformed the blue districts, while Trump overperformed in the red districts.

Here's the same basic picture on the state level, for the 2014 and 2016 races:
 Courtesy: me. It's a cool thing I made in which Pennsylvania House districts plotted as a cartogram (distorted so that equal numbers of votes get equal area).  Governor Wolf did so well in 2014 because there were almost no districts which went overwhelmingly to the Republican.

So Pennsylvania is not only purple, but it's clearly swingy.  Since we have multiple races, we can model each and every precinct as a function of overall statewide performance.  That is, if all you knew was how a Democratic governor fared in a given year, you could make a pretty good guess, not only of the US House races, but of the 50 State Senate Seats and the 203 State House seats.  Consider how the US Rep districts (under the old map) would look under a variety of statewide environments:

If the Dems get anything less than 50 percent, they'll only be able to get ~20% (4 seats).  But then things start to flip. Dems need win something like 55% of the votes before getting a majority statewide. If the Dems win 60% of the vote, they get 80% of the seats! Gerrymandering is bad, but in a swing year, it really can backfire. The environment is not much better in the State Senate:

If the votes are evenly split, Democrats end up with fewer than 30% of the overall seats.  As is, the 34-16 split in the State Senate is what allows the Republicans to even consider impeaching the State Supreme Court justices, as the motion would require a 2/3. They could do it, but they wouldn't be able to have even a single defection.

Finally, the State House:

Again, even with an evenly split electorate, we end up with a heavily Republican House which is why, again, impeachment of the Supreme Court is on the table. Starting impeachment only requires a simple majority.  The point is that all of these districts are seriously gerrymandered, so even with the new US districts, we've got a long way to go before Pennsylvania really represents the will of the citizens.

The new map is very good for democrats – but it's also fair

So let's finish up by seeing how the new US House map changes things. Even though it's being challenged by the Republicans, there are a lot of ways in which it is an objectively better map than what has hiterto been in place.  It's also better than the map that their leadership submitted to the governor (but which, again, the full legislature never actually voted on).  How does the new map stack up against the old?
1.  It is demonstrably more compact.
One of the metrics that people use to quantify a district is to take the ratio of $\frac{Area}{perimeter^2}$. The most compact of which would be a circle (producing $1/4\pi$.)  Take a look, in particular, at the old 10th district, and the 12th, and especially the infamous 7th, which is barely contiguous. They all fail terribly on the compactness standard.  The Representatives in the state assembly tried to produce a map which was esthetically pleasing (e.g. more compact) but fails on other grounds. In terms of boundaries, the map goes from 2047 miles to 1908 miles (Thanks, WaPo!)
2. It keeps municipal units in tact.
A good map shouldn't split counties or towns. The new map splits 13 counties compared to 33 previously. In my part of the state, most of Philadelphia is still tucked within 2 districts (the 2nd and 3rd), while nearby Bucks county (1st) and Montgomery county (4th), and Chester (5th) more or less get a district to themselves.
I have heard complaints from some friends that the new map splits up their town, but unfortunately, this is going to happen from time to time.  PA maps tend to be drawn so that they have exactly the same number of residence (to within a single person), which means that individual towns are going to get split.
3. Ideally (and this is harder to put into law) the new maps should produce a result consistent with the voter distribution statewide.
The Republican congress has complained that this wasn't officially in the ruling, and therefore, they've tried to defy this standard as much as possible.  Thus, the previous map (as well as the ones produced by the Republican congressional leadership) fail miserably. To give a sense of how much better the new map is, and using only the 2016 presidential numbers, Stephen Wolf at dailykos has come up with these breakdowns:
The previous map produced:
• 4 solid Dem
• 5 swing (10 points or fewer)
• 9 solid Republican
You will notice, incidentally, that Hillary won both the 6th and 7th districts, though both are held by Republicans (Meehan, who's retiring, and Fitzpatrick, respectively), while she badly lost the 17th which went to Matthew Cartwright (D).  Another impact for the new map is that many of these people will effectively lose their incumbency in the eyes of a large fraction of their constituency.  In the new map:
• 6 solid Dem
• 5 swing (10 points or fewer)
• 7 solid Republican
A much fairer distribution. Indeed,  in a swing election, Dems could pick up a ton of seats.  Using the same model as in my omnibus post from last week (10 point swing toward the Dems, and a 7.5 point incumbency advantage), my current estimates for the new seats are:

 District ~Old District Incumbent Incumbent running? 2016 Pres (D-R) 2018 Estimate PA-01 PA-08 Fitzpatrick R 2.0 4.5 PA-02 PA-13 Boyle D 48.0 65.5 PA-03 PA-02 Evans D 83.9 101.4 PA-04 Multiple Open No 19.4 29.4 PA-05 Multiple Meehan No 18.2 28.2 PA-06 PA-06 Costello R 8.3 10.8 PA-07 PA-15 Dent No 1.1 11.1 PA-08 PA-17 Cartwright D -9.5 8.0 PA-09 PA-11 Barletta No -34.0 -24.0 PA-10 PA-04 Perry R -8.9 -6.4 PA-11 PA-16 Smucker R -25.8 -23.3 PA-12 PA-10 Marino R -36.5 -34.0 PA-13 PA-09 Shuster No -45.5 -35.5 PA-14 PA-18 Vacant No -27.0 -17.0 PA-15 PA-05 Thompson R -43.4 -40.9 PA-16 PA-16 Kelly R -19.9 -17.4 PA-17 PA-12 Rothfus D -2.5 15.0 PA-18 PA-14 Doyle D 26.2 43.7

Dems win 10 seats, compared to 5 now, and 7 using the same assumptions, but using the old gerrymandered map.  This is a big deal.  It's 14% of the way toward winning the House.

Finally, a couple of programming notes

This is a new blog, and I'm quite proud of it. I look forward to any comments you have below, but would definitely appreciate you joining the Facebook Page: @progressivephysicist. In addition to linking new posts, I'll broadcast interesting polls, cool articles on a numerical theme, important special elections and the like.  All fun things at the interface of politics and numbers.