Once upon a time, people really did vote for person over party. As recently as the 1970s, a voter’s preferences were only loosely moored to partisanship. But those days are over. Here in 2018, the results of the just-concluded U.S. House elections tracked almost perfectly with FiveThirtyEight’s partisan lean metric, or how much more Republican- or Democratic-leaning a district is than the country as a whole.

That doesn’t mean that Republicans won all the red districts and Democrats won all the blue districts — in fact, Democrats won or are leading in 40 districts that lean Republican. But it helps us understand the pivotal role the national environment played in deciding the electoral map. Our partisan lean metric is calibrated to a neutral political environment (imagine a world in which the Democratic and Republican presidential candidates tie 50-50 in the popular vote), but this election did not take place in a neutral environment. Indeed, the Democratic-leaning national mood played a crucial role in deciding the electoral map: The swing toward Democrats was almost totally uniform, with a few exceptions (which we’ll get to in a moment).

If you wanted to predict the results of the 2018 midterm elections, you could have done a lot worse than simply adding the generic-ballot average to each district’s partisan lean. The average Democratic candidate in a contested House district outperformed his or her district’s partisan lean by 7.3 percentage points, which almost exactly mirrors the national House popular vote.

But while House races as a whole were very predictable, there were still some individual districts that moved farther to the left or right than the national political environment would imply. (Although they really didn’t stray too far from the pack in the chart above.) Forty-three Democratic candidates outperformed their districts’ partisan leans by more than 15 percentage points. The biggest overperformers included Democratic Rep. Dan Lipinski in the Illinois 3rd District, who won against a Nazi sympathizer and white supremacist who was disavowed by Republicans, and Democratic Rep. Collin Peterson in the Minnesota 7th District, a long-time incumbent in a red, rural district who has survived by taking socially conservative stances and wielding clout on the House Agriculture Committee.

The 10 Democratic candidates who most outperformed their districts’ partisan leans District Democrat Partisan Lean 2018 Margin Dem. Swing IL-3 Dan Lipinski D+11 D+47 +37 MN-7 Collin Peterson R+25 D+4 +30 NY-26 Brian Higgins D+21 D+47 +27 WV-3 Richard Ojeda R+37 R+13 +25 CT-2 Joe Courtney D+2 D+27 +25 TN-5 Jim Cooper D+13 D+36 +23 IL-17 Cheri Bustos D+1 D+24 +22 WI-3 Ron Kind R+3 D+19 +22 NY-27 Nate McMurray R+23 R+1 +22 SC-1 Joe Cunningham R+19 D+1 +20 Partisan lean is the average difference between how a district votes and how the country votes overall, where 2016 presidential results are weighted 50 percent, 2012 presidential election results are weighted 25 percent and results from elections for the state legislature are weighted 25 percent. 2018 election results are unofficial as of Nov. 19. Source: ABC News

Forty-three Republican candidates outperformed their districts’ partisan leans, too. The difference was that their margins weren’t as big, which is no surprise, given that the national environment was so favorable to Democrats. In the farming-dependent California 21st, Republican Rep. David Valadao has given himself a fighting chance at re-election (the race is still too close to call) by focusing on water-access issues and not on President Trump, who lost there in 2016. And in the Florida 25th District, demographics may have helped Rep. Mario Diaz-Balart win re-election. The district is 44 percent Cuban-American, and although Cuban-Americans are cool toward Trump, they continue to be warm toward down-ballot Republicans, which probably benefited Diaz-Balart (a Republican who is also a member of a prominent Cuban-American family). Fellow Cuban-American Republican Rep. Carlos Curbelo wasn’t so lucky; he lost re-election despite an almost as strong overperformance in the neighboring Florida 26th. In other cases shown below, the Republican may have just faced a weak Democratic candidate, like Dana Balter in the New York 24th.

The 10 Republican candidates who most outperformed their districts’ partisan lean District Republican Partisan Lean 2018 Margin GOP Swing CA-21 David Valadao D+10 R+2 +12 FL-25 Mario Diaz-Balart R+9 R+21 +12 NY-24 John Katko D+5 R+6 +12 WI-8 Mike Gallagher R+16 R+27 +11 LA-5 Ralph Abraham R+26 R+37 +11 AR-1 Rick Crawford R+30 R+40 +10 LA-4 Mike Johnson R+21 R+31 +10 LA-6 Garret Graves R+32 R+41 +8 FL-26 Carlos Curbelo D+10 D+2 +8 AR-4 Bruce Westerman R+29 R+36 +6 Partisan lean is the average difference between how a district votes and how the country votes overall, where 2016 presidential results are weighted 50 percent, 2012 presidential election results are weighted 25 percent and results from elections for the state legislature are weighted 25 percent. 2018 election results are unofficial as of Nov. 19. Source: ABC News

Elections are complex, with many different issues factoring into people’s votes. And even though it’s touted as a national election, the U.S. House of Representatives election is 435 different elections — enough races that the bulk can go to form while still leaving dozens to move in idiosyncratic ways. Still, those are the exceptions, not the rule. Most districts moved in tandem. That doesn’t mean there are no persuadable voters left in American politics. There are plenty — Democrats couldn’t have carried so many red districts without them. But those voters are increasingly responding to national issues, not local quirks.