Last week Trump signed Executive Order 13769 which banned refugees from 7 countries from entering the United States for a period of time. My colleague, Dan McGlone, wrote a blog post earlier this week that mapped Congressional Districts with the most foreign-born people from countries included in the Executive Order ban.
In an effort to further document data associated with this topic, I conducted a text analysis of the responses from U.S. Congressmen and Women using R packages TM (text mining), ggplot2, and wordcloud to visualize commonly-used words.
Getting the Data
Jenn B. Caballero and a group of collaborators are actively maintaining a Google Sheet that documents the responses from elected officials, including senators, representatives, attorney generals, and governors. Included within this document is information about each elected official’s stance on the Executive Order and the statement they shared with the public.
I accessed and copied this data on January 31 at which point 24% of responders supported the Executive Order, 51% were opposed, 22% were silent, and 3% had responded but were ambivalent. The source of statements varied slightly, with some released through media outlets, some using social media like Twitter and Facebook, and some as public statements.
The responses from elected officials are separated into 8 categories on the Google Sheet, although no specific methodology for the categorization is defined.
“Position on #MuslimBan EO” 8 Categories:
- Strong Supportive
- Soft Supportive
- Soft Opposed
- Strong Opposed
I grouped the categories based on the words “supportive” and “opposed” and cleaned up the data tables. As you probably know, cleaning data is often the most time-consuming part of a project!
This map shows the response by U.S. Senators as of February 3.
Visualizing the Words of the U.S. Congress
I used R to find the most frequently used words in supportive and opposition statements. Some very commonly used words, such as Executive Order, were excluded. A complete list of excluded words and words that were merged is at the end of the article.
Looking at the word clouds below of the top 50 words used in the statements, you can see that there are some distinct differences between the way these two groups of people are talking about the Executive Order 13769.
Some words that appear in the top 50 for supportive statements, but not for opposition statements, include:
Supportive statements, on the other hand, include some unique words such as:
I also put together a bar graph for each type of statement to see how the frequency varied between words. You can also see the difference in relative frequency between words that are used by both groups, such as “security”. For opposition statements, “security” is the 6th most common word. For supportive statements, it is the 3rd most common word.
Method for Text Cleaning
I excluded words because of their high level of frequency between both groups:
I converted / merged specific words into the same word for consistency:
- “muslim ban” -> “muslim-ban”
- “extreme vetting” -> “extreme-vetting”
- “trump’s” -> “trump”
- “#trump” -> “trump
- “american” -> “america”
- “america’s” -> “america”
- “refugees” -> “refugee”
- “terrorist” -> “terror”
- “terrorism” -> “terror”
- “vetting” -> “vet”
- “natl” -> “national”
- “countries” -> “country”
What Can You Do?
Review the Google Sheet that documents the responses from elected officials – it’s being actively updated with current information. Conduct your own text analysis using the updated info and let us know what you find.
See a response from your representative that doesn’t reflect your opinion? Use our Cicero Live tool to find your reps contact info and reach out to them!