Pennsylvania’s new congressional district map, released Monday by the state Supreme Court, is sure to improve Democrats’ electoral outlook in the state. Over the long term, Democrats can expect to occupy one to two additional seats compared with the current map, according to a FiveThirtyEight analysis. (The state’s congressional delegation currently has 12 Republicans and five Democrats. One seat is vacant.)

The court ordered that the map be redrawn after finding that the current one, which was enacted by the Republican state legislature in 2011, was a partisan gerrymander and violated the state’s constitution. (Republicans were given a chance to submit a substitute plan — which they did. And the Democratic governor, Tom Wolf, was given a chance to reject the plan — which he did.) The map submitted by Republicans probably would have benefited them less than the current map does, but it would still have been better for the GOP than what would be expected based on the partisan makeup of the state. Because the legislature and the governor couldn’t come to an agreement, the court stepped in.

Compared with the current map, the new one could easily be mistaken for a Democratic gerrymander. In reality, it gets much closer to matching the political makeup of Pennsylvania’s electorate, which is about evenly divided. (President Trump carried the Keystone State by less than 1 percentage point in 2016, for example.) The new map also splits fewer municipalities and has districts that are more compact than the current one.

Earlier this year, FiveThirtyEight presented seven alternatives to the current congressional maps of Pennsylvania and every other state, each using a different set of criteria. (One prioritized creating competitive districts, for example; another tried to maximize the number of majority-minority districts.) In addition to estimating the electoral implications of each map, we used other measurements to compare them. The goal was to show how different priorities in drawing district lines are sometimes in tension, and you can see that in the new Pennsylvania map.

Ranking Pennsylvania’s new map How the court-drawn map scores according to five metrics, compared with the current map and seven hypothetical maps that were presented in FiveThirtyEight’s Atlas Of Redistricting Efficiency gap Competitive districts Majority-nonwhite districts Dem. gerrymander D+2% Competitive 12 Current 2 Proportional D+2 Current 6 Compact (algorithmic) 2 Court-drawn R+3 Court-drawn 5 Majority minority 2 Competitive D+6 Compact (algorithmic) 4 GOP gerrymander 2 Compact (borders) R+9 Majority minority 4 Competitive 2 Compact (algorithmic) R+11 Compact (borders) 4 Court-drawn 2 Majority minority R+12 Proportional 2 Proportional 1 Current R+18 Dem. gerrymander 2 Dem. gerrymander 1 GOP gerrymander R+21 GOP gerrymander 0 Compact (borders) 1 County splits Compactness rank Compact (borders) 17 Compact (borders) 1 Court-drawn 18 Majority minority 2 Majority minority 22 Compact (algorithmic) 3 GOP gerrymander 30 GOP gerrymander 4 Current 39 Court-drawn 5 Competitive 40 Competitive 6 Dem. gerrymander 46 Dem. gerrymander 7 Proportional 46 Proportional 8 Compact (algorithmic) 72 Current 9

Using the new map, we would expect Democrats to win 7.5 of the state’s 18 U.S. House seats over the long term, based on a model that assigns win probabilities to each party based only on a district’s partisanship. (The same model would expect 6.1 seats for Democrats and 11.9 for Republicans under the map that was enacted in 2011.)

Compared with the current map, the new one results in fewer “wasted votes” — a metric known as the “efficiency gap,” which is one way of measuring partisan gerrymandering. The new map has one fewer “highly competitive” district than the current map does. (Highly competitive districts are those in which both parties have at least a 1-in-6 chance of winning.) But two districts — the 4th and the 10th — just miss falling into that category. On the current map, the 12 districts that are not usually competitive are well outside the 1-in-6 cutoff.

Because any individual election is affected heavily by the political environment, we also estimated how the seats would look in different national scenarios. What happens in a GOP wave year like 2010? Or in a Democratic romp like 2006? (Democrats currently hold a 6.4-point lead in the congressional generic ballot.)

How Pennsylvania’s new map fares in different national political environments Democratic chances of winning each district, based only on a district’s partisanship and the national political environment National House Popular Vote District R+10 R+5 Even D+5 D+10 1 13.3% 26.4% 45.4% 66.0% 81.9% 2 99.9 99.9 >99.9 >99.9 >99.9 3 >99.9 >99.9 >99.9 >99.9 >99.9 4 63.8 80.4 90.5 95.7 98.1 5 92.7 96.7 98.6 99.4 99.7 6 24.6 43.1 63.8 80.4 90.5 7 17.9 33.7 54.2 73.4 86.5 8 11.9 23.9 42.2 62.9 79.8 9 0.2 0.3 0.8 1.9 4.2 10 2.8 6.4 13.7 26.9 46.2 11 0.2 0.4 0.9 2.1 4.8 12 0.1 0.1 0.3 0.7 1.7 13 <0.01 <0.01 0.1 0.1 0.3 14 0.2 0.5 1.1 2.5 5.7 15 <0.01 0.1 0.1 0.3 0.8 16 1.3 2.9 6.6 14.1 27.7 17 6.0 12.8 25.5 44.4 65.0 18 92.6 96.7 98.5 99.4 99.7 Expected seats 5.3 6.2 7.4 8.7 9.9

The new map has five seats that we would categorize as “usually Democratic” over the long term, compared with four under the current map. These are districts where Democrats have better than about a 5-in-6 chance. And, as you can see in the table above, Democrats would still be heavily favored to hold four of those new districts — the 2nd, 3rd, 5th and 18th — even in an extremely GOP-friendly national environment. The other one — the 4th — could be at risk in a Republican wave. Eight seats, meanwhile — the 9th through 16th districts — are, to varying degrees, “usually Republican.” The other five districts — the 1st, 6th, 7th and 8th districts and, and to a lesser extent, the 17th — all look highly competitive.

The new map will go into effect for primaries and general elections for the Congress that begins next year but will not be in effect for the special election for the vacant seat, the 18th District, scheduled for March 13. The winner of the Republican-leaning seat will serve out the term of former Rep. Tim Murphy, who resigned in October. Once the redrawn map goes into effect, most of the current 18th District will become the new 14th District, which is more favorable to Republicans than the current 18th is.

CORRECTION (Feb. 20, 4:10 p.m.): A previous version of the first table in this article listed an incorrect compactness rank for the majority-minority map. It ranks second, not fifth.