Issues involving immigrants and refugees (I&R) are challenging, but there have been are few studies of social media’s influence on public perception of I&R. In recent years, research has shown a great deal of interest in the possibility of using social media to measure public opinion. Due to its accessibility, availability and large audience, social media has provided a new communication platform on which people can share and discuss ideas; therefore, to explore different sentiments toward I&R issues, we have studied tweets using refugee(s) and/or immigrant(s) hashtags. We feel this is an appropriate resource for analysis and study of public perception of these populations. The purpose of this study is to use social media monitoring in examining information about public attitudes toward I&R. Specifically, our study has two aims: 1) to describe the public perception of I&R as expressed on social media via Twitter, and 2) to provide recommendation for programs or policies that could lead to changes in the public perception of I&R.
We extracted data from Twitter; we collected more than 20,000 tweets referencing refugee(s) and immigrant(s), using tweets made in the last 12 months (April 2018 through April 2019) as search strings. We collected Twitter data via Twitter’s premium search API and full-archive development environment and used RESTful programming techniques in Python. We used Python libraries to collect and package data for further analysis. We used R language and R packages such as “tm,” “ggplot2,” “dplyr,” and “sentiment” to analyze the Twitter data. We limited the search geographically to tweets from the US, written in the English language, and we exclude retweets for each hashtag.
Of the 21,995 tweets, 58.5% included #immigrant(s) and 41.5% included #refugee(s). Using sentiment analysis, we found that overall public discourse was higher on the positive side of I&R (58.4% for immigrant[s] and 57% for refugee[s] than the negative side (41.6% for immigrant[s] and 43% for refugee[s]). However, the shift was not significant in the past one year. People who tweeted using #immigrant(s) most commonly used the terms “donaldtrump,” “border,” and “immigration”; tweets using #refugee(s) most commonly included the terms “buildthewall,” “donaldtrump,” and “children.” The frequency of use of these words may have been related to recent social issues. During the period over the US experienced political or social events related to I&R crisis (for example, President Donald Trump’s Executive Order 13767, titled “Border Security”). People who tweeted positively about I&R expressed feelings of anticipation, trust, and joy. Conversely, those who tweeted negatively about I&R expressed feelings of anger, fear, and disgust.
To our knowledge, this was the first study of public opinion toward I&R using Twitter hashtag analysis. In our study, a comprehensive review of Twitter data on public perception of I&R reveals that overall perception of I&R was positive in the past year despite the US government’s current immigration policies, which are unfavorable and hostile to I&R. Specific implications will be discussed.