In this photo taken Nov. 10, 2016, President Barack Obama meets with President-elect Donald Trump in the Oval Office of the White House in Washington. (Pablo Martinez Monsivais/Associated Press)

The debate about the importance of racism in electing Donald Trump rages on. It even led to a shouting match last week between Clinton and Trump’s campaign aides.

A prominent argument against a “whitelash” sweeping Donald Trump into office is that Trump appears to have won the votes of at least some working-class whites who voted for Obama. The Upshot’s Nate Cohn helped set this narrative into motion when he tweeted:

Cohn was more nuanced about the role of race in subsequent statements, acknowledging that racism could have been an important factor even in shifting Obama voters to Trump.

Many other commentators have been less thoughtful in interpreting these trends. On MSNBC’s “Morning Joe,” the filmmaker Michael Moore responded to the contention that Trump’s victory was rooted in racial animus by saying, “They’re not racist … They twice voted for a man whose middle name is Hussein.”

Joe Scarborough was even more apoplectic, citing Cohn to dismiss the suggestion that Trump’s voters were motivated by race. Scarborough proclaimed:

People who live by the data should die by data, and the data, according to Nate Cohn of the New York Times says this, and let those who have ears to hear, hear: The very people who helped elect Barack Obama president of the United States twice just elected in Wisconsin, in Michigan, in Ohio and Pennsylvania Donald J. Trump.  It’s the data.

It is indeed the data — it’s just a deeply flawed interpretation of them. Putting aside the problems with imputing individual motives from county election returns, implying that all of Obama’s voters weren’t racist is just as inaccurate as saying everyone who voted against him (or for Trump) was.

Scarborough needs to understand this basic fact: Barack Obama won lots of votes from racially prejudiced whites.

Take these graphs, for example:


Graph by Michael Tesler. Source: Pew Research Center Surveys, August 2003; March 2008; September 2012. The 2004 matchup is Bush reelection against a generic Democrat.

The graph above shows the relationship between support for interracial dating and whites’ support for Democratic presidential candidates in 2004, 2008, and 2012.  Whites who opposed interracial dating (roughly 20 percent) were significantly less likely to support Obama in 2012 and 2008 than the Democratic presidential candidate in 2004.

At the same time, about one quarter of whites who didn’t even think blacks and whites should date each other still supported Obama for president. An analysis by political scientists Sam Popkin and Doug Rivers showed the same thing: 20-25% of whites who opposed interracial dating supported Obama throughout the 2008 campaign.

Even though racial attitudes were a bigger factor in Obama’s elections than previously, they were by no means the only factor. The most important determinant of Americans’ votes in 2008 and 2012, as always, was party identification.

But until Obama’s presidency, there were nearly as many white Democrats with explicitly prejudiced views as white Republicans. That meant that lots of racially prejudiced Democrats wound up supporting Obama.

Racially prejudiced whites, however, have increasingly left the Democratic Party during Obama’s presidency — especially racially prejudiced whites without a college degree.  That partisan sorting by racial attitudes, combined with Trump’s explicitly racial presidential campaign, opened the door for racially prejudiced Obama voters to defect to Trump in 2016.

Indeed, I previously showed that racial attitudes were a stronger predictor of vote intention in three different 2016 surveys than they were in 2008 and 2012. Those surveys of individual-level data tell us more about the role of race in this election than county-level data can.

Of course, this doesn’t mean racial attitudes explain everything.  There’s surely more to Trump’s remarkable rise than race.

But dismissing the important role of white Americans’ racial attitudes in this election because Trump won some of Obama’s voters is certainly not “living by the data.”

Michael Tesler is associate professor of political science at UC Irvine and author of “Post-Racial or Most-Racial? Race and Politics in the Obama Era.”