Over the past 15 years, America has steadily warmed to the idea of increased immigration. In 1999, 10 percent of the country wanted to see more immigration. In 2014, that figure is up to 22 percent. But, as new data from Gallup shows, the country on the whole remains skeptical about more immigration, including a sharp turn against an increase over the past year.

As always, the chart says more than any words.

Diving into the numbers, Gallup speculates that the slow trend upward for an increase is driven in part by a push from business groups (including Mark Zuckerberg's Facebook) for more H-1B visas, allowing more skilled workers to immigrate. It's people with post-graduate degrees that have become more likely to support an increase, who, Gallup says, are "more likely to be tuned in to the discussion about the need for importing highly skilled workers."

But what about everyone else? Why the up and down? At first we wondered if it was related to actual immigration numbers: the number of people who live in the country without authorization or the number of people apprehended at the border. Using DHS data (population; apprehensions), we plotted it.

(The black bar on the 2010 figure represents a shift in the estimate based on new data from the 2010 Census. The original estimate ended at the bar.)

What's interesting is that opposition to increased immigration dropped along with border apprehensions, and appears to be unrelated to the actual population in the country. Gallup's speculation offers a clue:

Some of these changes may reflect the ebb and flow of Americans' reactions to the 9/11 attacks in 2001 as well as rocketing unemployment in 2009, with both events triggering a temporary surge in anti-immigration sentiment.

That latter point also explains the drop in apprehensions. Border-crossing attempts dropped during the recession, as the prospect of finding work declined. And when you compare attitudes on immigration to the unemployment rate, something interesting happens.

As unemployment rises, so does opposition to immigration. This is just a loose correlation, and doesn't necessarily indicate a link. But there's no doubt that attitudes toward immigration are rooted in economic concerns -- both among better-educated workers who want more H1-B visas and those worried about their own jobs.