For the first time in eight years, Democrats have regained control of the House, picking up 32 seats with seven others still undecided. Even if all seven break for the Republicans, Democrats still have a healthy edge: They needed just 23 seats to assume the chamber’s majority.

In a previous analysis we published ahead of Tuesday’s vote, we described how four groups of voters were expected to play an outsize role in the election’s outcome. They’re voters who live in counties with distinct demographic and voting profiles: majority-minorities counties, majority-white suburban counties, pro-Trump counties with a manufacturing base, and counties that voted for former President Barack Obama in 2012 and then for Donald Trump in 2016.

Some of these areas saw shifts in the last presidential election that helped Trump win the White House. And this election cycle, an uptick in Democratic votes across all these areas likely helped Democrats take the House and succeed in a number of other statewide races.

Democratic support in the county groups increased by at least 2 percentage points, driven by a hefty nationwide increase in turnout compared with previous midterms. There had been indications of a surge in voter engagement ahead of Election Day. Early voting, for example, was much higher than in previous years in some areas of the country, and backlash to Trump’s presidency was expected to push many voters to the polls. According to estimates from the United States Elections Project, nearly 50 percent of eligible voters cast ballots, compared with 36.7 percent of voters in the 2014 midterm elections. And there were more Democratic votes cast this election than Republican votes.

Using data from three sources—the 2017 American Community Survey (ACS), an annual sampling of the U.S. population; the Bureau of Labor Statistics’ employment data for 2017; and the Associated Press’s election results—we’ve tracked how voting preferences for House candidates in the four groups of counties have changed over time, beginning with the 2012 election. (Figures also include uncontested and noncompetitive races.)

Here is a breakdown of those patterns.

Majority-Minorities Counties

The data here reflect counties where minorities are in the majority—where the share of white, non-Hispanic residents is less than 50 percent, based on the ACS. Many of these counties are clustered in specific areas of the country, such as Southern California, Texas, and Alaska.

Electoral patterns in these areas remained relatively steady over the past three elections, with most voters consistently pulling the lever for Democratic House candidates. Turnout among Democratic voters in particular often dips in midterm elections, but organizers this year were well aware of this challenge and were pushing to mobilize voters accordingly. It’s unclear just yet whether those efforts were what helped Democrats in these counties, but the party’s support in 2018 surpassed that of the three previous election cycles. Democrats saw an increase of 3 percentage points in these areas compared with 2016.

The Democratic votes helped unseat Republican incumbents, contributing to the victories of Lucy McBath in Georgia, Lizzie Fletcher and Colin Allred in Texas, and Debbie Mucarsel-Powell in Florida.

White Suburban Counties

This year, Democratic support in majority-white suburban counties reached a whopping 42 percent, outpacing the past three election cycles. Republican support, meanwhile, dipped to 57 percent, lower than any previous year dating back to 2012. Challengers Sharice Davids in Kansas and Angie Craig in Minnesota won their elections thanks to Democratic votes in these counties.

Prior to the election, polls indicated that college-educated white women, many of whom live in the suburbs, were disillusioned by Trump and could tip suburban districts to Democrats. Compared with their male counterparts, these women disapprove of Trump at higher rates, and recent research had suggested that voters’ attitudes about the president correlate with their preferences in House and Senate races. Preliminary exit polls showed that women in general voted for Democratic House candidates by a 21-point margin.

Pro-Trump Manufacturing Counties

President Donald Trump visited some of these areas while campaigning for Republican candidates ahead of the midterm elections. These counties, which supported him in 2016, have manufacturing at the heart of their economies. Many of them are in the Rust Belt, a region Trump dominated in 2016.

The country’s manufacturing regions weren’t always a Republican stronghold. Support for GOP House candidates has grown since the 2012 presidential election—from 63 percent that year to 67 percent in 2014, and to 70 percent in 2016.