As of today, it looks more likely than not that the Republican Party will nominate Donald Trump as its presidential standard bearer. There’s still an awful lot of football to be played – analysts on either side are willing to admit – but you can’t deny the ground has shifted pretty firmly in Trump’s favor. Since virtually no one saw this coming, it’s worth asking how this came to pass.

Most analysts, many of whom are on the left, have focused on Trump’s comments about deporting Mexican-Americans (as well as his recent comments about David Duke), and concluded his candidacy is entirely the result of white resentment and racism. To be clear, this doubtless propels some of his candidacy. But at a certain point, this suffers from the old “when your only tool is a hammer, all your problems look like nails” issue. History is rarely monocausal, and this is an unlikely exception.

As some of us at RealClearPolitics have written before, there is also a strong strain of anti-elite sentiment in the country right now, and Trump taps into that. The same sentiment is noted in this piece on Eric Cantor’s loss in 2014, which is worth rereading to get a better handle on how the GOP base views its “establishment.”

But beyond the “big picture” factors, the Trump candidacy is something of a perfect storm of tactical factors, coming together at the same time.

Free Media coverage: As political scientists John Sides and Lynn Vavreck noted in their book, “The Gamble,” media coverage plays a huge role in determining who emerges from the pack. So what did we see this summer?

This chart summarizes the total number of minutes CNN dedicated to the coverage of GOP candidates in the last two weeks of August. Note that Trump was doing well in the polls at this point, but was not yet the clear front-runner. Obviously he deserved quite a bit of coverage, especially given some of the things he was saying. But Trump received three times as much coverage as the other candidates combined! If we look only at Ben Carson, Ted Cruz, John Kasich and Marco Rubio – the candidates who made it to the late winter – Trump received 12 times as much coverage. Subtract Carson, and we wind up with 64 times as much news coverage for Trump as for Cruz, Kasich and Rubio combined. You get the picture.

Oxygen: Sides and Vavreck also write about the cycle of discovery, scrutiny, and decline, whereby media discover candidates, scrutinize them, then bring about their decline if they don’t survive.

But Trump, rather expertly, kept sucking the oxygen out of the room for other Republicans and feeding the media frenzy. In other words, the media were so obsessed by his antics that they never discovered other candidates. More importantly, they never really moved on to some of the more substantive scrutiny of Trump – his business dealings, Trump University, his run for the Reform Party nomination, his use of eminent domain – that would probably have more impact on voters than the reality TV show of the past eight months. It’s all buried in the noise.

So we’re left with the situation we’re in now, and voters actually haven’t seen much in-depth press scrutiny of any of the candidates. This impressionistic take on the candidates has left people ill equipped to deal with where we stand today.

The analysts: Dan Drezner wrote an intriguing piece a few weeks ago speculating that adherence to the book, “The Party Decides,” caused GOP strategists not to take Trump seriously enough. The book hypothesized that party endorsements and back-room wrangling ultimately guides nominations more than voter decisions. So campaigns spent more time worrying about traditional “invisible primary” concerns than how the ground was shifting under their feet.

Perhaps this isn’t a huge part of the story, but it is part of it. There was a certain amount of Trump “unthinkability bias” built into the mix. Basically, everything we know about party nomination processes told us that sooner or later, Trump would implode. But, as we’ve seen, the unthinkable does happen from time to time.

Factional friction. Finally, the large, chaotic Republican field worked out in one important way: Trump had no serious contenders for his slice of the electorate.

Consider the following chart, from Patrick Ruffini of Echelon Insights.

It’s sort of a mess, but it basically shows, for all Iowa counties, the correlations between vote shares for different candidates in Iowa and the demographics of the counties. He then groups the candidates to see which ones were competing for the same voters.

So we see that Ted Cruz and Ben Carson ran well in counties with high shares of married couples with families. This is consistent with them running well among voters in the religious right. Indeed, if you check the long-term RCP Averages, you will see Carson’s decline coinciding almost perfectly with Cruz’s rise.

You’ll see the middle box that Chris Christie, Jeb Bush, Rand Paul, Kasich and Rubio all ran well in counties with high incomes, high levels of college graduates, high numbers of new homes, and recently transplanted populations. This is consistent with these five candidates splitting the “establishment” vote among themselves, with no one able to obtain a solid lead.

Then in the bottom right corner, we see Mike Huckabee and Trump running well in counties of self-described “Americans,” people of Scots-Irish descent (which overlaps with “American”), and high levels of unemployment. This is consistent with our understanding of Trump as the continuation of the Buchananite tradition of insurgencies within the Republican Party, rather than what we might call religious or libertarian Tea Party-ism.

This has continued post-Iowa. David Byler has put together a useful calculator, which we will keep updated, showing correlations between vote shares and the demographics of counties. You can look for individual states, or you can slide down to “all in” (though you can only do so for campaigns that have not been suspended). These run on a scale from -1.0 to 1.0, with 1 representing a perfect correlation, and -1 representing a perfect negative correlation (Press "Go!" to see demographics).

So we see that Cruz runs best in counties with high numbers of married voters and voters with kids, and poorly in counties with high levels of education, new houses, and high unemployment. The same is basically true of Carson (leading to questions whether the reason Carson has stayed in this long is payback to Cruz for some of the supposed dirty tricks coming out of Iowa).

Kasich does well in counties with newer homes, high levels of education, and high incomes, and does poorly in counties with fewer transplants, lower levels of education, and high levels of renters. We see the same basic tendency with Rubio.

Trump, on the other hand, does well in counties with low levels of education, high unemployment and lots of renters, and poorly in counties with high education and high income. Note that he does well in areas with large numbers of African-Americans. Since few African-Americans vote in GOP primaries, this probably has more to do with the whites who are living there, which could possibly be explained by the “racial threat” hypothesis in political science (tracing at least back to V.O. Key, which concluded that whites who lived in areas with high African-American populations were more susceptible to racialized appeals than elsewhere).

This is all consistent with Henry Olsen and Dante Scala’s theory in their forthcoming book, “The Four Faces of the Republican Party,” which finds Republican nomination battles are fairly stable within factions, but the order and rate at which the field winnows have a lot to do with who ultimately wins.

Because Trump was able to consolidate his branch of the Republican Party so early, while the others have fought among themselves, he’s been able to stay above the fray to a certain extent, and to build an air of inevitability around his nomination.

It’s fascinating that so many short-term factors could result in a potential nomination with so many long-term ramifications. A Trump candidacy would scramble party coalitions. We suspect this would benefit the Democratic Party, but if the last eight months have taught us anything, it is to be skeptical of confident predictions given the current mood of the country. But where we are headed is a story for another day. If we want to know where we’re going, it’s crucial to first get straight where we’ve been.

Sean Trende is senior elections analyst for RealClearPolitics. He is a co-author of the 2014 Almanac of American Politics and author of The Lost Majority. He can be reached at strende@realclearpolitics.com. Follow him on Twitter @SeanTrende.