The Pew global opinion surveys are very informative. Two fairly recent ones deserve a closer look.
The first is from last December. It's about the views citizens in twenty-seven countries hold about immigration and emigration. This graph shows the findings (click on it to make it bigger):
The take-home message of that survey is that people in quite different parts of the world prefer less in-migration. Majorities in Greece, Hungary, Germany, Italy and Sweden hold that opinion, but also majorities in Israel, Indonesia, Argentina, South Africa and Kenya*. Also:
In every country surveyed, less than a third say their nation should allow more immigrants to enter.
What's fascinating about that survey is that similar negative opinions also apply to out-migration:
What motivates those opinions? The reasons are probably many, but two important reasons are
a) that people don't like rapid social and cultural change
and
b) that both in-migration and out-migration can be seen to cause short-term economic losses to those who stay put**.
The second Pew survey, also covering twenty-seven countries, is more recent. It asks questions about any recent changes in gender equality (between men and women), in diversity and in the importance of religion in the respondent's country. The answers to these questions are then used to find out if the respondents think the changes in, say, gender equality in their countries are good or bad. Here are the results:
The limitations of that table should be taken into account before it is interpreted:
The follow-up question asking, say, if more gender equality is a good thing or a bad thing was asked only when the respondents stated that there had been a change in gender equality*** in their country. The people who thought that there had been no change at all were not asked about their views on how favorable or unfavorable no-change might be.
Still, the overall support for increased equality between men and women is a wonderful thing to observe in the survey, though some of it may, of course, be based on people trying to give the answers their culture condones.
----------
* Greece and Italy are the main entry points of migrants and refugees to Europe and the countries have trouble coping with the sheer numbers. Germany and Sweden took in very large numbers of refugees in 2015.
Thus, at least partly the opinions reflect high current in-migration levels. I'm not knowledgeable about the situations in the other countries where majorities favor less immigration, though I have read that South Africa has a problem with illegal border-crossings.
** Examples: If the in-migrating individuals are without resources at the point of entry they require some form of public sector support (to be paid from taxes) to initially survive in the new country, and if the out-migrating individuals are, on average, better educated and wealthier than those who stay put, their exit reduces the tax base of the country and, depending on the economic development level of the country, can make it harder for those who stay put to get adequate access to doctors, dentists and so on.
*** Interestingly, men tended to see more increases in gender equality than women in several of the surveyed countries:
In many of the countries surveyed, men are more likely than women to say that gender equality has increased in their country over the past 20 years.
For example, 78% of German men say that gender equality has increased over the past 20 years, versus only 62% of women. Double-digit differences also occur in Japan, the UK, Canada, South Korea, the Netherlands, Spain, the U.S., Sweden and Kenya.
However, women are also more likely than men to say that there has been no change in gender equality in their countries over the past 20 years. This is true in 11 of the countries surveyed.