Gavin Newsom, Democratic candidate for governor of California speaks as his wife, Jennifer Siebel Newsom, listens during a primary election watch party in San Francisco on June 5. (David Paul Morris/Bloomberg)

One month ago, Californians went to the polls and picked their candidates for the midterms. On Friday, at last, the state’s legendarily sluggish vote count is all but finished.

The more than 2 million ballots that remained uncounted on election night are down to 6,037 votes in Lake County, a small but swingy region north of the San Francisco Bay area. With nearly every vote tabulated, we now know that the 2018 primary had the highest number of votes in the history of California midterm elections — 6,955,089 votes cast in the primary for governor, up from 4,333,028 in 2014. (The previous record was 6,206,618 votes in 1998’s open primary.)

We also know that Democrats dramatically grew their vote statewide and in most, but not all, of the House races where they hope to compete in November. By the numbers:

Governor: Democratic candidates, led by Lt. Gov. Gavin Newsom, won 62.6 percent of the total vote. Republicans, who sent businessman John Cox to the general election, won a combined 36.1 percent of the vote. It’s the biggest gap in two-party turnout since 1998, which ended in a Democratic sweep. In 2014, Democrats won 54.3 percent of the vote compared with 38.1 percent for Republicans.

CA-10: The northern California district of Republican Rep. Jeff Denham trended hard toward the Democrats. One month of counting did not much change the two-party vote — combined, Denham and a right-wing Republican who opposed Denham’s support for immigration reform got 52.1 percent of the vote. But four years ago, Denham, by himself, won 58.9 percent of the vote; last month, he won just 37.5 percent. That’s a major reason Josh Harder, the investor whom Democrats got through the jungle primary, is being taken seriously.

CA-12: The bad news for House Democratic Leader Nancy Pelosi was that 19 percent of voters in her San Francisco district backed a different Democratic candidate — the largest such protest vote since she first won the seat. The good news was that three Democrats split that vote and that Lisa Renner, a Republican who won just 9.1 percent of the vote, will lose to Pelosi in November. (In what might have been a protest of the Green Party’s perceived role as a 2016 spoiler, the same Green candidate who won 5.7 percent of the primary vote in 2014 won just 2.0 percent this year.)

CA-21: In 2014, Republican Rep. David Valadao defied Democrats in his mostly Hispanic district and won 63 percent of the primary vote. This year, he tumbled to … 62.8 percent, the smallest falloff of any incumbent Republican. Accordingly, there’s less talk about flipping this seat, which backed Hillary Clinton for president in 2016.

CA-22: In 2014, Rep. Devin Nunes was known mostly as an ambitious Republican who criticized the House Freedom Caucus as irresponsible and divisive. Nunes and a lesser-known Republican won a combined 75.1 percent of the vote. This year, after Nunes gained a following as the president’s blocker and tackler on the House Intelligence Committee, he was the lone Republican on the ballot and won 57.6 percent of the vote. The GOP’s vote was basically flat from 2014 — all of the new votes came from Democrats, who sent Andrew Janz into the general election, in a race Nunes is favored to win.

CA-25: The last Republican-held district in Los Angeles County gave Republicans 65 percent of the vote in 2014, sending Steve Knight to Congress. This year, Knight — the only Republican on the ballot — won 51.8 percent of the vote.

CA-39: Long represented by Edward R. Royce, this district gave the Republican 70.6 percent of the vote in the 2014 primary. This year, just 53.3 percent of the vote went to Republicans; 45 percent went to Democrats. Both parties expect a competitive general election between Democrat Gil Cisneros and Republican Young Kim.

CA-45: Rep. Mimi Walters won the seat for the first time in 2014, when Republicans got 69.3 percent of the vote. This year, Walters got 51.7 percent of the vote — one reason she has already gone on the air against Democrat Katie Porter, in a district that never used to be competitive.

CA-48: Democrats came closer here to a “lockout” than in any other California district, but Democrat Harley Rouda made the November election with his party getting 46 percent of the combined vote. Republicans got 53.1 percent — but Rep. Dana Rohrabacher, who some in Washington wanted to see forced into an all-Republican runoff, got just 30.3 percent, the lowest total for any incumbent on the ballot. In 2014, Rohrabacher won 56.1 percent of the vote, with Democrats taking just 32.1 percent across the district.

CA-49: The seat long held by Republican Darrell Issa is now the most likely Democratic pickup in the state. With every vote counted, Democrats won 50.8 percent of the vote — the first time they had ever outpolled Republicans in a primary.

The gas tax repeal: Republican hopes for bucking a Democratic trend this year rest largely on a ballot measure to repeal the state’s 2017 gas tax. The dry run for that campaign was the successful recall of Josh Newman, a Democratic state senator in Orange County. On Election Day, it appeared that 59.4 percent of voters backed the recall vote; with late-counted ballots, that number fell only slightly, to 58.1 percent. Much of the district overlaps with the 39th congressional district, which is one reason that Republicans ran stronger there, and one reason the party believes it can hold it.