Virginia Gov.-elect Ralph Northam celebrates his election victory with his wife, Pam, and daughter Aubrey, right, and Dorothy McAuliffe, wife of Virginia Gov. Terry McAuliffe at the Northam for Governor election night party at George Mason University in Fairfax, Va., on Nov. 7. (Cliff Owen/AP)

Ralph Northam’s convincing victory in last night’s Virginia governor’s race — coupled with Democratic gains in the Virginia state legislature, the party’s victory in the New Jersey governor’s race, a key win in Washington state, and the vote to expand Medicaid in Maine — put a spring in the step of Democrats and liberals.

But beyond “it was a good night for Democrats,” what else should we learn from this election? Here are four key takeaways.

Northam beat expectations, but not the fundamentals.

A few days ago, FiveThirtyEight’s Nate Silver worked up a back-of-the-envelope model of 90 open-seat governor’s races since 2001. Based on the state’s average partisanship and the generic congressional ballot, Northam should have won by 9 points. He won by 8.6 points.

In other words, without knowing anything about the candidates, without knowing who ran what ads about immigration, and without knowing what tweets Trump sent, it was possible to predict this particular election very accurately. None of this means that the candidates or ads “didn’t matter,” but it does tell us that neither Northam nor Gillespie ran much ahead or behind of where they “should have” run.

Democrat Ralph Northam won the Virginia governor's race over Republican Ed Gillespie on Nov. 7. Here are some other takeaways from the state's election. (Amber Ferguson/The Washington Post)

Polling misses are hard to predict.

In 2016, the polls in a handful of key battleground states famously underestimated Trump’s share of the vote. In the run-up to Tuesday’s election in Virginia, there were again concerns that pollsters hadn’t fixed this problem, perhaps with weighting or sampling schemes that would accurately capture the subgroups of white voters who were important to Trump’s coalition.

Instead, the polls underestimated Northam’s win, and by a significant margin. Polling averages had him up by 3 points, and he beat those averages by a solid 5 points. Indeed, the accurate polling estimates, per Scott Clement and Mark Blumenthal’s analysis, leaned more heavily on self-reported intention to turnout — an indicator that can often be unreliable.

So the takeaway here is: It’s very hard to know in advance which direction the polls will err, if they err at all. And it’s equally hard to know which method of identifying likely voters will be the most accurate in any particular race.

It’s not clear that Gillespie’s strategy failed.

One interpretation of the election: Gillespie failed. Specifically, “Trumpism without Trump” — that is, trying to juice the Republican base with a “Trumpist” campaign focused on immigration and crime — failed. As my Post colleague Aaron Blake put it, “For a time, it seemed that the strategy might be helping Gillespie close the gap, but in the end it doesn’t seem to have helped much at all.”

I’m not as sure. The polls overestimated Gillespie’s vote, but I don’t see any reason to doubt the polling trend, which did show Gillespie closing the gap in October. Of course, perhaps the race would have narrowed even if Gillespie had focused on health care and entitlement reform. We won’t know. But I wouldn’t say that Gillespie failed. He achieved exactly what the fundamentals suggested he should.

Of course, politicians will use this outcome to advocate for whatever they already think. Immigration hawks like Rep. Steve King (R-Iowa) think the party should have nominated someone even more conservative than Gillespie. More moderate Republicans think this shows the bankruptcy of a Trumpist campaign. No surprises there. I’m just not sure the evidence supports any of these interpretations.

Don’t expect a turn away from Trumpism.

I agree that the election was a referendum on President Trump. There is a great deal of evidence that down-ballot elections are increasingly driven by national forces. The Virginia map last night looked a lot like the map in 2016.

But does that mean that Republican candidates will start breaking with Trump, or running campaigns focused on immigration reform rather than a border wall? I’m not so sure. The most important thing to remember is that the parties were changing in a “Trumpist” fashion before Trump ran for president. The polling data show whites without a college degree shifting to the GOP before 2015-2016.

Moreover, the increasing alignment of party identification and attitudes on racial issues — with Democrats increasingly liberal on issues such as immigration and Republicans increasingly conservative — predates Trump.

None of this requires Republicans to act like Trump or take Trump’s positions on issues. But in a world where party politics is increasingly racialized, it becomes harder and harder not to.