Hillary Clinton was an extraordinarily terrible candidate for the Democrats to run in 2016.

Donald Trump's approval rating is 38 percent. President Obama's just bumped up to 57 percent. No amount of furious dissembling from humiliated Clinton partisans will convince me that Obama — and very probably Bernie Sanders — wouldn't have beaten Trump handily.

So what gives?

Let me start by noting that the overall polls were off, but not by that much. They predicted a Clinton victory by about about 3 points. And in the popular vote, that prediction was reasonably close. Clinton is ahead by a bit less than 1 percent nationally, with many votes still to count.

What tipped the election was about 100,000 votes spread across just three states: Wisconsin, Michigan, and Pennsylvania. Here's where the polls did seriously botch things. Trump won these states by 1, 0.3, and 1.2 points respectively (assuming the close result in Michigan holds). The poll averages showed Clinton winning these states by roughly 6 points, 3 to 7 points, and 2 to 5 points respectively, depending on who you ask.

Some people did correctly point to this outcome being a possibility. Remarkably, most of them relied heavily on gut-check analysis. Zach Carter and Ryan Grim wrote way back in February that Trump could win by peeling off Rust Belt states, based on little more than intuitions about trade and general voting patterns. Michael Moore hypothesized something similar. Nathan J. Robinson wrote around the same time that Clinton would lose because she is a wooden, uninspiring campaigner who was almost uniquely vulnerable to Trump-style attacks on character and integrity.

Van Jones was perhaps most prescient of all. In June, he argued that Trump would not gaffe himself out of the election, because outrageous statements help him get attention on social media; that tut-tutting about his lack of realistic policy would not work, because voters neither know nor care about that; and that he could potentially win over Rust Belt whites attracted to Trump's anti-trade messaging, because "we're not paying attention to a big chunk of America that is hurting — that would accept any change, the bigger the better."

With the benefit of hindsight, I think we can add a couple more factors to the pile. First is the self-deception of the Clinton campaign and its media sycophants. She did not visit Wisconsin at all between April and the election, and largely abandoned Obama's working-class message from 2012 in favor of portraying Trump as a dangerous, woman-hating maniac.

They were enabled in this by pro-Clinton publications, which churned out endless slavish portrayals of Clinton as some kind of wizard of politics and policy, whose grasp of fine detail would surely deliver the electoral goods. In fact, it turned out that her vaunted algorithm-driven turnout machine was contacting tons of Trump voters. Paul Romer points to the problem of "mathiness" in economics, where complicated and intimidating theoretical symbolism is built up without establishing clear linkages to the real world. Lots of computers, theories, and datasets might be the most sophisticated way to attack voter turnout, or it might be a way to simply appear sophisticated while dismissing people whose ideas don't come packaged with a science-y veneer. (Something similar seems to have happened to the wonky election-simulator people.)

Then there is the Clintons' omnipresent aura of scandal and corruption, which is about 50 percent unfair double standard and 50 percent totally their fault. The political media has been obsessed with the Clintons for 20 years to a frankly psychotic degree, particularly given how much worse the stories about Trump were. On the other hand, the Clintons enable that coverage with a paranoid and secretive attitude, and an obvious hatred of the press. The Clinton Foundation coverage was unfair compared to the much worse Trump Foundation, but then again, there was some genuinely skeezy stuff in there. There's a good chance that FBI Director James Comey's vague letter about emails to congressional Republicans, which led to an extremely ill-timed media firestorm, tipped the election to Trump. But then again, she might have avoided the whole story by following the dang rules in the first place.

I always assumed that if Clinton were nominated for president, the race would be dominated by some weird quasi-scandal that dragged on for month after month. It's not fair, but it is simply the reality of the Clintons. At some point, one simply has to take that into account.

That brings me to a final point: Clinton's general political affect. She is not a great campaigner (by her own admission), a rather robotic speaker, and most of all, a dynasty politician who very obviously got the nomination because the party elite cleared the decks for her. Given how the party has evolved, her political history was filled with devastating indictments of her judgment and priorities. Even after getting a reasonably good party platform (after just barely beating back about the most unlikely primary challenger imaginable), she was a non-credible vehicle for it. Without Obama's mesmerizing charisma and political energy, her image was defined by things like taking millions of dollars for secret speeches to Wall Street banks and refusing to release the transcripts. She simply was not a good fit for the party, and a terrible avatar of the party in a country furious at self-dealing elite institutions of all kinds.

Hillary Clinton was a heavily compromised candidate and bad campaigner who grossly misjudged the political terrain, and thus bled just enough of the Obama coalition to let Trump sneak past. If we ever get to vote again, let's hope the party learns from this epic disaster.

And that, now, is the key question: Where do the Democrats go from here?

This is the second article in a four-part series on the Democratic Party. Read the first article here, and the third article here.