UC Riverside study attempts to understand Obama to Trump voters. They conclude that they were more motivated by race and immigration concerns than economic marginality.
To measure economic marginality they compared survey respondents income to their surrounding area.
To measure race and immigration concerns they used a questionnaire.
They found association with race and immigration views, but not much with economic marginality.
Commentary: this runs counter to the mainstream media narrative that Obama to Trump voters were motivated by being disadvantaged white working class. I suspect the mainstream media is hesitant to attribute these vote switches to racial concerns, though they’re a bit more willing to attribute it to immigration concerns. Even with immigration, they tend to attribute it to illegal immigration concerns, not to demographic changes resulting from general immigration. I suspect the latter is the real concern for most voters.