Introduction

Immigration has been a polarizing issue in the United States for many years and has amplified in the past few years due to positions in government. Mexican migration is not an easy endeavor and many of these migrants are coming to better their lives. The vast majority of migrants are coming for economic opportunity but recent years have made the overall goal of migration convoluted in a manner that sheds them in a bad light. It is vital to understand migration patterns and how they possibly result in policies that aid in migration as well as possibly aiding countries that these migrants are fleeing from.

The data has multiple data books to them that have different types of questions that are asked to migrants. We initially were going to use 4 data books but narrowed our research down to only using 2 data books since our research questions became altered as well.

Data Books

  • HOUSE
The HOUSE part of the data set refers to household composition, economic and migratory activity of the members in the household. This includes land ownership of migrants, home/real estate, vehicle and livestock ownership, and business ownership and operation. This is pretty important to know to understand what types of migrants are owning land while coming over to the United States.

  • MIG
The MIG portion of the data set refers to a person-level file containing details of all border crossings (up to 30) by each head of household, as well as measures of economic and social activity during the last U.S. visit.

Research Questions

  • We intend to explore the following research questions:1. What demographics such as sex and age are mainly migrating to the United States. 2. What does life look like for many of these immigrants after migrating and are they able to find better living/working conditions?

We will so conduct text analysis on Trump tweets to understand the narrative that was being built around Mexican migration since 2016. This will set up our analysis in showing migrants are simply trying to better the lives. Our group intends to make bar and line graphs showing migration patterns. Along with colored line graphs possibly showing income brackets before their migration and after. We plan to gather the data and explore the relationship between sex and age as variables in how that has played out in Mexican migration patterns. We also will explore the cost of migration for the years available in the data set. After further exploration of the data, our group aims to examine the type of amenities migrants are able to use and at which income brackets they use those.

Methods

Our Analytical Process:

Us researchers explored the data by looking at the code books first. This gave us a good explanation of all the variables that was in this dataset and each of the code books. We then actually started to work with the data to see what exaclty the variables were and how we could work them. We narrowed down our research to only the HOUSE and MIG data books as previously mentioned. 

We wanted to explore the main aspects such as sex, age, and income. Once we got those parts down, we wanted to explore income with these demographics to understand some difference in terms of sex. Each of the data books have income but each are a bit different. The MIG data, we use income of the head of household and compared that to last income recieved in Mexico. Wanted to explore if the money migrants were receiving was better in the U.S. or better in Mexico. The HOUSE data looked at the same thing, head of household income. We had different purposes for these as HOUSE data book had the amenities. We did the samething with wages they made on the first trip to the U.S. to compare it to their last trip. 

We came upon the idea of looking at tweets from Donald Trump and determine what his narrative was on Mexican migration. We used vader sentiment analysis to understand what he was saying was negative or positive. We also looked for the key words that were used a lot in his tweets and which of these were negative as well. We decided to start this part off in our analysis as we think it could help guide our narrative. 

Results

import pandas as pd
import matplotlib.pyplot as plt
import nltk
import requests
from bs4 import BeautifulSoup
import numpy as np
from sklearn.datasets import load_iris
import seaborn as sns
from nltk.sentiment import vader
nltk.download('vader_lexicon')

tweets = pd.read_csv('Tweets.csv')
[nltk_data] Downloading package vader_lexicon to
[nltk_data]     /home/jovyan/nltk_data...
[nltk_data]   Package vader_lexicon is already up-to-date!
tweets.describe()
Date Time Tweet Client Client Simplified
count 30078 30078 30078 30078 30078
unique 2019 24504 29938 19 4
top 01/05/2015 4:40:19 PM MAKE AMERICA GREAT AGAIN! Twitter for Android Twitter for Android
freq 169 7 11 14197 14197
df = pd.DataFrame(tweets)

#a = df.loc[df['Tweet'] == 'immigrant']
#look at tweets that include words like immigrant, mexican, immigrants, borders, etc. and then look at the most common words 
#within the tweets that contain those words
#get the index of those tweets and then look at the dates they were tweeted

key_words = df.loc[df['Tweet'].str.contains("immigrant|mexican|mexican immigrants|mexicans|immigrants", case=False)]
key_words
Date Time Tweet Client Client Simplified
421 10/19/2016 9:34:49 PM Hillary has called for 550% more Syrian immigr... Twitter Web Client Twitter Web Client
832 09/25/2016 8:18:40 PM Five people killed in Washington State by a Mi... Twitter for Android Twitter for Android
1348 08/01/2016 6:54:27 PM During the GOP convention, CNN cut away from t... Twitter for iPhone Twitter for iPhone
1459 07/27/2016 6:08:35 AM Crooked Hillary Clinton wants to flood our cou... Twitter for Android Twitter for Android
1812 06/24/2016 2:48:50 PM New Government data by the Center for Immigrat... Twitter for iPhone Twitter for iPhone
... ... ... ... ... ...
29491 10/05/2011 12:11:49 PM @BarackObama sold guns to the Mexican drug car... TweetDeck Other
29533 09/27/2011 3:32:23 PM It seems @BarackObama had our tax dollars buy ... TweetDeck Other
29603 09/07/2011 1:37:17 PM Why was @BarackObama selling guns to Mexican d... TweetDeck Other
29612 09/02/2011 2:27:03 PM Fast and Furious put semi-automatics in the ha... TweetDeck Other
29753 07/18/2011 12:21:54 PM @BarackObama has sold guns to Mexican drug lor... TweetDeck Other

98 rows × 5 columns

key_words
Date Time Tweet Client Client Simplified
421 10/19/2016 9:34:49 PM Hillary has called for 550% more Syrian immigr... Twitter Web Client Twitter Web Client
832 09/25/2016 8:18:40 PM Five people killed in Washington State by a Mi... Twitter for Android Twitter for Android
1348 08/01/2016 6:54:27 PM During the GOP convention, CNN cut away from t... Twitter for iPhone Twitter for iPhone
1459 07/27/2016 6:08:35 AM Crooked Hillary Clinton wants to flood our cou... Twitter for Android Twitter for Android
1812 06/24/2016 2:48:50 PM New Government data by the Center for Immigrat... Twitter for iPhone Twitter for iPhone
... ... ... ... ... ...
29491 10/05/2011 12:11:49 PM @BarackObama sold guns to the Mexican drug car... TweetDeck Other
29533 09/27/2011 3:32:23 PM It seems @BarackObama had our tax dollars buy ... TweetDeck Other
29603 09/07/2011 1:37:17 PM Why was @BarackObama selling guns to Mexican d... TweetDeck Other
29612 09/02/2011 2:27:03 PM Fast and Furious put semi-automatics in the ha... TweetDeck Other
29753 07/18/2011 12:21:54 PM @BarackObama has sold guns to Mexican drug lor... TweetDeck Other

98 rows × 5 columns

scores = vader.SentimentIntensityAnalyzer()
compound_scores = []

for i in key_words['Tweet']:
    print(scores.polarity_scores(i))
    compound_scores.append(scores.polarity_scores(i)['compound'])
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.381, 'neu': 0.619, 'pos': 0.0, 'compound': -0.9134}
{'neg': 0.426, 'neu': 0.528, 'pos': 0.046, 'compound': -0.8957}
{'neg': 0.119, 'neu': 0.778, 'pos': 0.103, 'compound': -0.1152}
{'neg': 0.171, 'neu': 0.758, 'pos': 0.071, 'compound': -0.4767}
{'neg': 0.232, 'neu': 0.684, 'pos': 0.084, 'compound': -0.6533}
{'neg': 0.229, 'neu': 0.537, 'pos': 0.234, 'compound': 0.2846}
{'neg': 0.076, 'neu': 0.717, 'pos': 0.207, 'compound': 0.5093}
{'neg': 0.114, 'neu': 0.636, 'pos': 0.25, 'compound': 0.6435}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.184, 'neu': 0.816, 'pos': 0.0, 'compound': -0.5574}
{'neg': 0.265, 'neu': 0.735, 'pos': 0.0, 'compound': -0.5574}
{'neg': 0.317, 'neu': 0.564, 'pos': 0.118, 'compound': -0.7718}
{'neg': 0.0, 'neu': 0.58, 'pos': 0.42, 'compound': 0.865}
{'neg': 0.217, 'neu': 0.677, 'pos': 0.106, 'compound': -0.561}
{'neg': 0.098, 'neu': 0.81, 'pos': 0.092, 'compound': -0.0387}
{'neg': 0.089, 'neu': 0.665, 'pos': 0.247, 'compound': 0.6459}
{'neg': 0.288, 'neu': 0.712, 'pos': 0.0, 'compound': -0.8172}
{'neg': 0.264, 'neu': 0.517, 'pos': 0.218, 'compound': -0.1511}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.205, 'neu': 0.707, 'pos': 0.088, 'compound': -0.3182}
{'neg': 0.243, 'neu': 0.652, 'pos': 0.105, 'compound': -0.5859}
{'neg': 0.21, 'neu': 0.581, 'pos': 0.21, 'compound': 0.0}
{'neg': 0.3, 'neu': 0.7, 'pos': 0.0, 'compound': -0.807}
{'neg': 0.0, 'neu': 0.745, 'pos': 0.255, 'compound': 0.7824}
{'neg': 0.0, 'neu': 0.839, 'pos': 0.161, 'compound': 0.4263}
{'neg': 0.121, 'neu': 0.539, 'pos': 0.34, 'compound': 0.7574}
{'neg': 0.096, 'neu': 0.582, 'pos': 0.322, 'compound': 0.7745}
{'neg': 0.134, 'neu': 0.722, 'pos': 0.144, 'compound': -0.1779}
{'neg': 0.118, 'neu': 0.748, 'pos': 0.135, 'compound': -0.2741}
{'neg': 0.13, 'neu': 0.87, 'pos': 0.0, 'compound': -0.5562}
{'neg': 0.142, 'neu': 0.858, 'pos': 0.0, 'compound': -0.5106}
{'neg': 0.0, 'neu': 0.603, 'pos': 0.397, 'compound': 0.8353}
{'neg': 0.38, 'neu': 0.52, 'pos': 0.1, 'compound': -0.8191}
{'neg': 0.189, 'neu': 0.811, 'pos': 0.0, 'compound': -0.5423}
{'neg': 0.364, 'neu': 0.532, 'pos': 0.104, 'compound': -0.7466}
{'neg': 0.228, 'neu': 0.609, 'pos': 0.163, 'compound': -0.25}
{'neg': 0.053, 'neu': 0.833, 'pos': 0.114, 'compound': 0.3818}
{'neg': 0.229, 'neu': 0.771, 'pos': 0.0, 'compound': -0.6844}
{'neg': 0.276, 'neu': 0.661, 'pos': 0.063, 'compound': -0.7964}
{'neg': 0.151, 'neu': 0.849, 'pos': 0.0, 'compound': -0.5994}
{'neg': 0.27, 'neu': 0.73, 'pos': 0.0, 'compound': -0.8122}
{'neg': 0.118, 'neu': 0.592, 'pos': 0.29, 'compound': 0.7111}
{'neg': 0.143, 'neu': 0.637, 'pos': 0.22, 'compound': 0.3382}
{'neg': 0.145, 'neu': 0.691, 'pos': 0.164, 'compound': -0.2481}
{'neg': 0.34, 'neu': 0.66, 'pos': 0.0, 'compound': -0.8674}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.0, 'neu': 0.829, 'pos': 0.171, 'compound': 0.4767}
{'neg': 0.167, 'neu': 0.833, 'pos': 0.0, 'compound': -0.2023}
{'neg': 0.475, 'neu': 0.465, 'pos': 0.06, 'compound': -0.9676}
{'neg': 0.0, 'neu': 0.738, 'pos': 0.262, 'compound': 0.652}
{'neg': 0.221, 'neu': 0.662, 'pos': 0.117, 'compound': -0.4648}
{'neg': 0.293, 'neu': 0.386, 'pos': 0.321, 'compound': 0.3018}
{'neg': 0.0, 'neu': 0.857, 'pos': 0.143, 'compound': 0.4588}
{'neg': 0.424, 'neu': 0.576, 'pos': 0.0, 'compound': -0.8889}
{'neg': 0.0, 'neu': 0.687, 'pos': 0.313, 'compound': 0.7964}
{'neg': 0.182, 'neu': 0.818, 'pos': 0.0, 'compound': -0.6114}
{'neg': 0.164, 'neu': 0.746, 'pos': 0.09, 'compound': -0.4574}
{'neg': 0.072, 'neu': 0.717, 'pos': 0.212, 'compound': 0.6478}
{'neg': 0.23, 'neu': 0.723, 'pos': 0.047, 'compound': -0.7003}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.0, 'neu': 0.684, 'pos': 0.316, 'compound': 0.7184}
{'neg': 0.175, 'neu': 0.732, 'pos': 0.092, 'compound': -0.3818}
{'neg': 0.117, 'neu': 0.567, 'pos': 0.316, 'compound': 0.6808}
{'neg': 0.242, 'neu': 0.596, 'pos': 0.163, 'compound': -0.4796}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.362, 'neu': 0.638, 'pos': 0.0, 'compound': -0.8689}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.146, 'neu': 0.743, 'pos': 0.111, 'compound': -0.041}
{'neg': 0.231, 'neu': 0.769, 'pos': 0.0, 'compound': -0.5574}
{'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'compound': 0.6513}
{'neg': 0.195, 'neu': 0.805, 'pos': 0.0, 'compound': -0.5255}
{'neg': 0.195, 'neu': 0.649, 'pos': 0.157, 'compound': -0.1779}
{'neg': 0.141, 'neu': 0.754, 'pos': 0.106, 'compound': -0.1779}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.12, 'neu': 0.777, 'pos': 0.104, 'compound': -0.1263}
{'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'compound': 0.4404}
{'neg': 0.246, 'neu': 0.634, 'pos': 0.119, 'compound': -0.34}
{'neg': 0.099, 'neu': 0.824, 'pos': 0.077, 'compound': -0.1556}
{'neg': 0.159, 'neu': 0.664, 'pos': 0.177, 'compound': -0.1531}
{'neg': 0.0, 'neu': 0.867, 'pos': 0.133, 'compound': 0.3182}
{'neg': 0.253, 'neu': 0.655, 'pos': 0.092, 'compound': -0.5719}
{'neg': 0.136, 'neu': 0.758, 'pos': 0.106, 'compound': -0.2023}
{'neg': 0.461, 'neu': 0.427, 'pos': 0.113, 'compound': -0.9083}
{'neg': 0.29, 'neu': 0.502, 'pos': 0.208, 'compound': -0.4767}
{'neg': 0.0, 'neu': 0.785, 'pos': 0.215, 'compound': 0.6249}
{'neg': 0.137, 'neu': 0.683, 'pos': 0.18, 'compound': 0.2833}
{'neg': 0.0, 'neu': 0.878, 'pos': 0.122, 'compound': 0.3034}
{'neg': 0.184, 'neu': 0.714, 'pos': 0.102, 'compound': -0.3818}
{'neg': 0.372, 'neu': 0.628, 'pos': 0.0, 'compound': -0.8767}
{'neg': 0.518, 'neu': 0.482, 'pos': 0.0, 'compound': -0.9332}
{'neg': 0.238, 'neu': 0.607, 'pos': 0.154, 'compound': -0.2023}
{'neg': 0.0, 'neu': 0.792, 'pos': 0.208, 'compound': 0.4939}
{'neg': 0.289, 'neu': 0.711, 'pos': 0.0, 'compound': -0.8074}
{'neg': 0.176, 'neu': 0.824, 'pos': 0.0, 'compound': -0.6908}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
{'neg': 0.313, 'neu': 0.687, 'pos': 0.0, 'compound': -0.8481}
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
df_scores = pd.DataFrame(compound_scores)
print(df_scores)
print( "Mean: " ,df_scores.mean())
         0
0   0.0000
1  -0.9134
2  -0.8957
3  -0.1152
4  -0.4767
..     ...
93 -0.8074
94 -0.6908
95  0.0000
96 -0.8481
97  0.0000

[98 rows x 1 columns]
Mean:  0   -0.157944
dtype: float64
df_scores.plot(kind='hist', bins = 25)
<AxesSubplot:ylabel='Frequency'>
def hiphop():
    j = 0
    for i in music:
        if str(i['artist']['terms']) == 'hip hop':
            #print(str(i['artist']['name'])+ ' is hip hop!')
            j +=1

    print('There are a total of ' + str(j) + ' hip hop artists')
string_tweets = ''''''
for i in key_words['Tweet']:
    string_tweets+=str(i)
string_tweets

'Hillary has called for 550% more Syrian immigrants, but won’t even mention “radical Islamic terrorists.” #Debate… https://t.co/Rf48XkZWbuFive people killed in Washington State by a Middle Eastern immigrant. Many people died this weekend in Ohio from drug overdoses. N.C. riots!During the GOP convention, CNN cut away from the victims of illegal immigrant violence. They don’t want them heard. https://t.co/EHRiLkQDWDCrooked Hillary Clinton wants to flood our country with Syrian immigrants that we know little or nothing about. The danger is massive. NO!New Government data by the Center for Immigration Studies shows more than 3M new legal & illegal immigrants settled..https://t.co/hMFyZc1kAMThe protesters in New Mexico were thugs who were flying the Mexican flag. The rally inside was big and beautiful, but outside, criminals!Just met with courageous family of Sarah Root in Nebraska. Sarah was horribly killed by illegal immigrant, but leaves behind amazing legacy.Everybody is talking about the protesters burning the American flags and proudly waving Mexican flags. I want America First - so do voters!Do you believe that Hillary Clinton now wants Obamacare for illegal immigrants? She should spend more time taking care of our great Vets!"@WaltSeher: @realDonaldTrump @morg25016893 @eventbrite yup 200 Polish immigrants were hired by his contractor not Trump"RT @seanhannity: Watch: Donald Trump OWNS A Heckler Who Said Illegal Immigrants Are The Backbone Of America https://t.co/cRAOzIP0pHIllegal immigrant children, non-Mexicans surge across border at record rate https://t.co/V6TP55dRACJamiel Shaw was incredible on @foxandfriends this morning. His son, who was viciously killed by an illegal immigrant, is so proud of pop!"@josemen31: @realDonaldTrump this Mexican here loves you man!! Keep doing your thing #mexicolovestrump" Great!"@American1st: @ofccadjust @AnnCoulter GW Bush was open borders like @JebBush. TERRORISTS CAN COME ACROSS MEXICAN BORDER AT WILL!"Notice that illegal immigrants will be given ObamaCare and free college tuition but nothing has been mentioned about our VETERANS #DemDebate"@YoungYoung54: @JeriHyatt @megynkelly @JebBush So true. Jeb Bush is crazy, who cares that he speaks Mexican, this is America, English !!"How crazy - 7.5% of all births in U.S. are to illegal immigrants, over 300,000 babies per year. This must stop. Unaffordable and not right!Again, illegal immigrant is charged with the fatal bludgeoning of a wonderful and loved 64 year old woman. Get them out and build a WALL!"@gpavlik7 1/2 of new California driver’s licenses go to undocumented immigrants. Read the Sac\' Bee, July 17th. Go get\'em, Trump!""@amit_ @realdonaldtrump I agree 100%. McCain is fighting for illegal immigrant but never did anything for our Vets."We will soon be at a point with our incompetent politicians where we will be treating illegal immigrants better than our veterans.It\'s a national embarrassment that an illegal immigrant can walk across the border and receive free health care and one of our Veterans.....Via @AP March,2013: Jeb said “he was open to…pathway for citizenship for illegal immigrants” http://t.co/zeEKCFXroE Lying on campaign trail!"@danforc as a legal immigrant I\'m so glad someone standing up for us, the millions who do things by the book to earn our place here" Thx"@LeeEllmauerJr: LEGAL Latino Immigrants talk to me in factories & warehouses. Want to know why OBAMA to give AMNESTY? They did it RIGHT!"I absolutely support Kate’s Law—in honor of the beautiful Kate Steinle who was gunned down in SF by an illegal immigrant.The joke around town is that I freed El Chapo from the Mexican prison because the timing was so good w/ my statements on border security.El Chapo and the Mexican drug cartels use the border unimpeded like it was a vacuum cleaner, sucking drugs and death right into the U.S.The U.S. will invite El Chapo, the Mexican drug lord who just escaped prison, to become a U.S. citizen because our "leaders" can\'t say no!Now that the Mexican drug lord escaped from prison, everyone is saying that most of the cocaine etc. coming into the U.S. comes over border!Can you envision Jeb Bush or Hillary Clinton negotiating with \'El Chapo\', the Mexican drug lord who escaped from prison? ....Legal immigrants want border security. It is common sense. We must build a wall! Let\'s Make America Great Again! http://t.co/I5CybmR0MF"@WayneDupreeShow: Aren\'t U angry how the media has turned DonaldTrump SLAM against "illegal immigration" into him hating "all immigrantsVia @DailyCaller by @samsondunn: “Pastor To Hispanic Congregation Speaks Out On Trump Immigrant Crime Statement” http://t.co/rfWcQ7wcjf"@DanScavino Illegal Immigrant Deported 6 Times Charged in Felony Hit & Run of Family. @realDonaldTrump is not wrong. #Trump2016"Thx to all the people who called to say they are cutting their @Macys credit card as a protest against illegal immigrants pouring into USI said simply that the Mexican leaders and negotiators are smarter than ours and that the Mexican gov\'t is pushing their hard core to U.S.Flashback – Jeb Bush says illegal immigrants breaking our laws is an “act of love” http://t.co/p8yFzVuw8w He will never secure the border.Rick Perry failed at the border. Now he is critical of me. He needs a new pair of glasses to see the crimes committed by illegal immigrants."@futureicon: @GOP Trump is correct Hear about a young woman who was shot to death in San Francisco by a Mexican who\'d been deported 5 times"@VeneziaMatthew: Trump is the only real candidate. He is only saying what we all know. Much crime comes from illegal immigrants. Fact!""@nanaelaine7: I can\'t wait for your inauguration!! The beginning of the end to these criminal immigrants. MAKE AMERICA GREAT AGAIN" Thanks.What about the undocumented immigrant with a record who killed the beautiful young women (in front of her father) in San Fran. Get smart!Mexican leaders and negotiators are much tougher and smarter than those of the U.S. Mexico is killing us on jobs and trade. WAKE UP!"@babyylissa: Obama calls immigrants gang bangers&criminals but Trump gets attacked for calling SOME illegals from SOME countries bad people"@Highlander6700: @realDonaldTrump @Macys: Seems 1 or 2 lines of Mr. Trump\'s comments about immigrants are continuously taken out of context"@RealNinjetta @ErinSiegal @AppSame @Univision http://t.co/QNOuFlufaS My many MEXICAN friends fly to visit Mexico because UNSAFE border"Via @THESHARKTANK1: "Donald Trump\'s Controversial Mexican Comments Are Accurate" http://t.co/nYL2QQMwKZI love the Mexican people, but Mexico is not our friend. They\'re killing us at the border and they\'re killing us on jobs and trade. FIGHT!"@TheHolyBreadcat: @realDonaldTrump Vote for Trump, he\'s making America to where we won\'t worry about illegal immigrant problems.""@imprimis310: @NBC is the bigot. @realDonaldTrump and @SenTedCruz only speaking the truth about ILLEGAL immigrants""@KEEMSTARx: Mexican criminals coming into USA? YES Did Trump say we need to stop them? YES Did he say Mexicans are good? YES Racism? NO".@Univision cares far more about Mexico than it does about the U.S. Are they controlled by the Mexican government?Mexican gov doesn\'t want me talking about terrible border situation & horrible trade deals. Forcing Univision to get me to stop- no way!I like Mexico and love the spirit of Mexican people, but we must protect our borders from people, from all over, pouring into the U.S.Our border is being breached daily by criminals. We must build a wall & deduct costs from Mexican foreign aid! http://t.co/jEgR6jSQ5JThe border is wide open for cartels & terrorists. Secure our border now. Build a massive wall & deduct the costs from Mexican foreign aid!I hope the Mexican judge is more honest than the Mexican businessmen who used the court system to avoid paying me the money they owe me.The Mexican legal system is corrupt, as is much of Mexico. Pay me the money that is owed me now - and stop sending criminals over our border"@seankesser: @realDonaldTrump People with bachelor\'s degrees can\'t find jobs in #US. And Obama wants to bring in more immigrants."Via @Newsmax_Media: “@RepMattSalmon: Obama \'Didn\'t Lift a Finger\' to Help Free Marine in Mexican Prison” http://t.co/Ia5PT3IKYCThey finally let our Marine out of a Mexican prison, no thanks to Obama. Way too long. Such an event should never be allowed to happen again"@Real_Mr_Sciales: @realDonaldTrump pretty much saved a U.S. Marine from a Mexican prison on his own... Where was Obama on this one?" ThanksCrazy - Election officials saying that there is nothing stopping illegal immigrants from voting. This is very bad (unfair) for Republicans!Via @BreitbartNews by @j_strong: “Obama Administration Quietly Prepares ‘Surge of Millions’ of New Immigrant Ids” http://t.co/SIOY6r3REcHas everyone forgotten our marine who now sits in a Mexican prison because we have a president too incompetent or too lazy to make a call?USMC Sgt. Tahmooressi has now been held in Mexican jail for over 150 days. When will Obama call for his release? #FreeOurMarineWe have got to get our Marine out of that disgusting Mexican jail. Would be so easy if we had a real leader. One tough phone call & he\'s outOur government now imports illegal immigrants and deadly diseases. Our leaders are inept.Watch – Obama will not fix the illegal immigrant loophole. Instead he will sign another executive action giving more amnesty.Obama spoke to the Mexican president last week & did not mention UMC Sgt. Tahmooressi. Sad!“Trump: Illegal Immigrants Are Getting Treated Better than Vets” http://t.co/rYy1nnSRDp via @nro by @AndrewE_JohnsonMexican leadership has been laughing at us for many years but now it’s no longer laughter—it’s disbelief..."@BackOnTrackUSA:We should be placing tariffs on Mexican goods coming into this country to reimburse the American taxpayer&secure the borderMexico is allowing many thousands to go thru their country & to our very stupid open door. The Mexicans are laughing at us as buses pass by.USMC Sgt. Tahmooressi sacrificed for our country. While Obama is welcoming illegals, our Marine is locked in a Mexican jail. #FreeOurMarineOur gov’t should immediately stop sending $’s to Mexico, no friend, until they release Marine & stop allowing immigrant inflow into U.S."@chargermike41: @BackOnTrackUSA wtf. Free to the immigrants? But the rest of us that have to bust out asses just to get by have to pay?"Your tax dollars well spent. Over 1.295M ObamaCare enrollees will also be illegal immigrants http://t.co/VE85kBl3VT Are you surprised?"@TAGIII: @realDonaldTrump @mfinale1 Explain why BHO rescues a deserter and leaves a real soldier rotting in a Mexican jail?"Another cover-up. Obama won’t disclose how many illegal immigrants he has released into our country http://t.co/h8WhM3htvF No surprise.It would be nice if our commander-in-chief was as concerned for our Veterans health as he is for illegal immigrants becoming citizens.30,000 illegal immigrants with CRIMINAL RECORDS were released last year by our wonderful, though highly incompetent, government. So stupid!According to @pewresearch, illegal immigrants favor Dems 8:1 http://t.co/ZN4rOIFVzA @GOP pushing amnesty. Do they have death wishGreat read by @VDHanson: “Mexico\'s Hypocrisy Is Evident In Its Own Strict Policy Toward Immigrants” http://t.co/OfmzjKk6x7Now AP is banning the term "illegal immigrants" What should we call them? \'Americans\'?! This country\'s political press is amazing!According to @pewresearch, 2/3 of Mexican LEGAL immigrants do not pursue citizenship because of ‘no interest’ http://t.co/Vfias8bxlo.@GOP need to face reality – not one of the illegal immigrants granted amnesty will vote Republican.Major Mexican cartel boss El Diego was just arrested with weapons provided to him through Fast and Furious http://t.co/rFLwJBxy Media??"The illegal immigrant crime problem is far more serious and threatening than most people understand. Along our (cont) http://t.co/UAAIAKdSObamaCare gives free insurance to illegal immigrants. Yet @BarackObama is cutting our troops healthcare. (cont) http://t.co/SHQuYovwCanada\'s legal immigration plan starts with a simple and smart question: How will any immigrant applying fo… (cont) http://t.co/aHYaJt5b@BarackObama sold guns to the Mexican drug cartels. They were used in the murders of Americans . Where is the outrage?It seems @BarackObama had our tax dollars buy guns for Mexican drug lords that were used to kill Americans. We need answers now.Why was @BarackObama selling guns to Mexican drug dealers?Fast and Furious put semi-automatics in the hands of Mexican drug lords that killed Americans - @BarackObama should answer all questions.@BarackObama has sold guns to Mexican drug lords while his DOJ erodes our 2nd Amendment rights.'
from nltk.tokenize import word_tokenize, sent_tokenize
from nltk.corpus import stopwords
from string import punctuation
nltk.download('stopwords')
sent = sent_tokenize(string_tweets)
#print(sent)
[nltk_data] Downloading package stopwords to /home/jovyan/nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
words = []
for s in sent:
    for w in word_tokenize(s):
        words.append(w)
no_words = ["``", "''","’","//t.co/", "“", "”"]
myStopWords = list(punctuation) + stopwords.words('english')+no_words

wordsNoStop = []
for i in words:
    if i not in myStopWords:
        wordsNoStop.append(i)
#print(words)
print(wordsNoStop)

['Hillary', 'called', '550', 'Syrian', 'immigrants', 'even', 'mention', 'radical', 'Islamic', 'terrorists.', 'Debate…', 'https', '//t.co/Rf48XkZWbuFive', 'people', 'killed', 'Washington', 'State', 'Middle', 'Eastern', 'immigrant', 'Many', 'people', 'died', 'weekend', 'Ohio', 'drug', 'overdoses', 'N.C.', 'riots', 'During', 'GOP', 'convention', 'CNN', 'cut', 'away', 'victims', 'illegal', 'immigrant', 'violence', 'They', 'want', 'heard', 'https', '//t.co/EHRiLkQDWDCrooked', 'Hillary', 'Clinton', 'wants', 'flood', 'country', 'Syrian', 'immigrants', 'know', 'little', 'nothing', 'The', 'danger', 'massive', 'NO', 'New', 'Government', 'data', 'Center', 'Immigration', 'Studies', 'shows', '3M', 'new', 'legal', 'illegal', 'immigrants', 'settled', '..', 'https', '//t.co/hMFyZc1kAMThe', 'protesters', 'New', 'Mexico', 'thugs', 'flying', 'Mexican', 'flag', 'The', 'rally', 'inside', 'big', 'beautiful', 'outside', 'criminals', 'Just', 'met', 'courageous', 'family', 'Sarah', 'Root', 'Nebraska', 'Sarah', 'horribly', 'killed', 'illegal', 'immigrant', 'leaves', 'behind', 'amazing', 'legacy.Everybody', 'talking', 'protesters', 'burning', 'American', 'flags', 'proudly', 'waving', 'Mexican', 'flags', 'I', 'want', 'America', 'First', 'voters', 'Do', 'believe', 'Hillary', 'Clinton', 'wants', 'Obamacare', 'illegal', 'immigrants', 'She', 'spend', 'time', 'taking', 'care', 'great', 'Vets', 'WaltSeher', 'realDonaldTrump', 'morg25016893', 'eventbrite', 'yup', '200', 'Polish', 'immigrants', 'hired', 'contractor', 'Trump', 'RT', 'seanhannity', 'Watch', 'Donald', 'Trump', 'OWNS', 'A', 'Heckler', 'Who', 'Said', 'Illegal', 'Immigrants', 'Are', 'The', 'Backbone', 'Of', 'America', 'https', '//t.co/cRAOzIP0pHIllegal', 'immigrant', 'children', 'non-Mexicans', 'surge', 'across', 'border', 'record', 'rate', 'https', '//t.co/V6TP55dRACJamiel', 'Shaw', 'incredible', 'foxandfriends', 'morning', 'His', 'son', 'viciously', 'killed', 'illegal', 'immigrant', 'proud', 'pop', 'josemen31', 'realDonaldTrump', 'Mexican', 'loves', 'man', 'Keep', 'thing', 'mexicolovestrump', 'Great', 'American1st', 'ofccadjust', 'AnnCoulter', 'GW', 'Bush', 'open', 'borders', 'like', 'JebBush', 'TERRORISTS', 'CAN', 'COME', 'ACROSS', 'MEXICAN', 'BORDER', 'AT', 'WILL', 'Notice', 'illegal', 'immigrants', 'given', 'ObamaCare', 'free', 'college', 'tuition', 'nothing', 'mentioned', 'VETERANS', 'DemDebate', 'YoungYoung54', 'JeriHyatt', 'megynkelly', 'JebBush', 'So', 'true', 'Jeb', 'Bush', 'crazy', 'cares', 'speaks', 'Mexican', 'America', 'English', 'How', 'crazy', '7.5', 'births', 'U.S.', 'illegal', 'immigrants', '300,000', 'babies', 'per', 'year', 'This', 'must', 'stop', 'Unaffordable', 'right', 'Again', 'illegal', 'immigrant', 'charged', 'fatal', 'bludgeoning', 'wonderful', 'loved', '64', 'year', 'old', 'woman', 'Get', 'build', 'WALL', 'gpavlik7', '1/2', 'new', 'California', 'driver', 'licenses', 'go', 'undocumented', 'immigrants', 'Read', 'Sac', 'Bee', 'July', '17th', 'Go', "get'em", 'Trump', 'amit_', 'realdonaldtrump', 'I', 'agree', '100', 'McCain', 'fighting', 'illegal', 'immigrant', 'never', 'anything', 'Vets', 'We', 'soon', 'point', 'incompetent', 'politicians', 'treating', 'illegal', 'immigrants', 'better', 'veterans.It', "'s", 'national', 'embarrassment', 'illegal', 'immigrant', 'walk', 'across', 'border', 'receive', 'free', 'health', 'care', 'one', 'Veterans', '.....', 'Via', 'AP', 'March,2013', 'Jeb', 'said', 'open', 'to…pathway', 'citizenship', 'illegal', 'immigrants', 'http', '//t.co/zeEKCFXroE', 'Lying', 'campaign', 'trail', 'danforc', 'legal', 'immigrant', 'I', "'m", 'glad', 'someone', 'standing', 'us', 'millions', 'things', 'book', 'earn', 'place', 'Thx', 'LeeEllmauerJr', 'LEGAL', 'Latino', 'Immigrants', 'talk', 'factories', 'warehouses', 'Want', 'know', 'OBAMA', 'give', 'AMNESTY', 'They', 'RIGHT', 'I', 'absolutely', 'support', 'Kate', 'Law—in', 'honor', 'beautiful', 'Kate', 'Steinle', 'gunned', 'SF', 'illegal', 'immigrant.The', 'joke', 'around', 'town', 'I', 'freed', 'El', 'Chapo', 'Mexican', 'prison', 'timing', 'good', 'w/', 'statements', 'border', 'security.El', 'Chapo', 'Mexican', 'drug', 'cartels', 'use', 'border', 'unimpeded', 'like', 'vacuum', 'cleaner', 'sucking', 'drugs', 'death', 'right', 'U.S.The', 'U.S.', 'invite', 'El', 'Chapo', 'Mexican', 'drug', 'lord', 'escaped', 'prison', 'become', 'U.S.', 'citizen', 'leaders', 'ca', "n't", 'say', 'Now', 'Mexican', 'drug', 'lord', 'escaped', 'prison', 'everyone', 'saying', 'cocaine', 'etc', 'coming', 'U.S.', 'comes', 'border', 'Can', 'envision', 'Jeb', 'Bush', 'Hillary', 'Clinton', 'negotiating', "'El", 'Chapo', 'Mexican', 'drug', 'lord', 'escaped', 'prison', '....', 'Legal', 'immigrants', 'want', 'border', 'security', 'It', 'common', 'sense', 'We', 'must', 'build', 'wall', 'Let', "'s", 'Make', 'America', 'Great', 'Again', 'http', '//t.co/I5CybmR0MF', 'WayneDupreeShow', 'Are', "n't", 'U', 'angry', 'media', 'turned', 'DonaldTrump', 'SLAM', 'illegal', 'immigration', 'hating', 'immigrantsVia', 'DailyCaller', 'samsondunn', 'Pastor', 'To', 'Hispanic', 'Congregation', 'Speaks', 'Out', 'On', 'Trump', 'Immigrant', 'Crime', 'Statement', 'http', '//t.co/rfWcQ7wcjf', 'DanScavino', 'Illegal', 'Immigrant', 'Deported', '6', 'Times', 'Charged', 'Felony', 'Hit', 'Run', 'Family', 'realDonaldTrump', 'wrong', 'Trump2016', 'Thx', 'people', 'called', 'say', 'cutting', 'Macys', 'credit', 'card', 'protest', 'illegal', 'immigrants', 'pouring', 'USI', 'said', 'simply', 'Mexican', 'leaders', 'negotiators', 'smarter', 'Mexican', "gov't", 'pushing', 'hard', 'core', 'U.S.Flashback', '–', 'Jeb', 'Bush', 'says', 'illegal', 'immigrants', 'breaking', 'laws', 'act', 'love', 'http', '//t.co/p8yFzVuw8w', 'He', 'never', 'secure', 'border.Rick', 'Perry', 'failed', 'border', 'Now', 'critical', 'He', 'needs', 'new', 'pair', 'glasses', 'see', 'crimes', 'committed', 'illegal', 'immigrants', 'futureicon', 'GOP', 'Trump', 'correct', 'Hear', 'young', 'woman', 'shot', 'death', 'San', 'Francisco', 'Mexican', "'d", 'deported', '5', 'times', 'VeneziaMatthew', 'Trump', 'real', 'candidate', 'He', 'saying', 'know', 'Much', 'crime', 'comes', 'illegal', 'immigrants', 'Fact', 'nanaelaine7', 'I', 'ca', "n't", 'wait', 'inauguration', 'The', 'beginning', 'end', 'criminal', 'immigrants', 'MAKE', 'AMERICA', 'GREAT', 'AGAIN', 'Thanks.What', 'undocumented', 'immigrant', 'record', 'killed', 'beautiful', 'young', 'women', 'front', 'father', 'San', 'Fran', 'Get', 'smart', 'Mexican', 'leaders', 'negotiators', 'much', 'tougher', 'smarter', 'U.S.', 'Mexico', 'killing', 'us', 'jobs', 'trade', 'WAKE', 'UP', 'babyylissa', 'Obama', 'calls', 'immigrants', 'gang', 'bangers', 'criminals', 'Trump', 'gets', 'attacked', 'calling', 'SOME', 'illegals', 'SOME', 'countries', 'bad', 'people', 'Highlander6700', 'realDonaldTrump', 'Macys', 'Seems', '1', '2', 'lines', 'Mr.', 'Trump', "'s", 'comments', 'immigrants', 'continuously', 'taken', 'context', 'RealNinjetta', 'ErinSiegal', 'AppSame', 'Univision', 'http', '//t.co/QNOuFlufaS', 'My', 'many', 'MEXICAN', 'friends', 'fly', 'visit', 'Mexico', 'UNSAFE', 'border', 'Via', 'THESHARKTANK1', 'Donald', 'Trump', "'s", 'Controversial', 'Mexican', 'Comments', 'Are', 'Accurate', 'http', '//t.co/nYL2QQMwKZI', 'love', 'Mexican', 'people', 'Mexico', 'friend', 'They', "'re", 'killing', 'us', 'border', "'re", 'killing', 'us', 'jobs', 'trade', 'FIGHT', 'TheHolyBreadcat', 'realDonaldTrump', 'Vote', 'Trump', "'s", 'making', 'America', 'wo', "n't", 'worry', 'illegal', 'immigrant', 'problems', 'imprimis310', 'NBC', 'bigot', 'realDonaldTrump', 'SenTedCruz', 'speaking', 'truth', 'ILLEGAL', 'immigrants', 'KEEMSTARx', 'Mexican', 'criminals', 'coming', 'USA', 'YES', 'Did', 'Trump', 'say', 'need', 'stop', 'YES', 'Did', 'say', 'Mexicans', 'good', 'YES', 'Racism', 'NO', 'Univision', 'cares', 'far', 'Mexico', 'U.S.', 'Are', 'controlled', 'Mexican', 'government', 'Mexican', 'gov', "n't", 'want', 'talking', 'terrible', 'border', 'situation', 'horrible', 'trade', 'deals', 'Forcing', 'Univision', 'get', 'stop-', 'way', 'I', 'like', 'Mexico', 'love', 'spirit', 'Mexican', 'people', 'must', 'protect', 'borders', 'people', 'pouring', 'U.S.Our', 'border', 'breached', 'daily', 'criminals', 'We', 'must', 'build', 'wall', 'deduct', 'costs', 'Mexican', 'foreign', 'aid', 'http', '//t.co/jEgR6jSQ5JThe', 'border', 'wide', 'open', 'cartels', 'terrorists', 'Secure', 'border', 'Build', 'massive', 'wall', 'deduct', 'costs', 'Mexican', 'foreign', 'aid', 'I', 'hope', 'Mexican', 'judge', 'honest', 'Mexican', 'businessmen', 'used', 'court', 'system', 'avoid', 'paying', 'money', 'owe', 'me.The', 'Mexican', 'legal', 'system', 'corrupt', 'much', 'Mexico', 'Pay', 'money', 'owed', 'stop', 'sending', 'criminals', 'border', 'seankesser', 'realDonaldTrump', 'People', 'bachelor', "'s", 'degrees', 'ca', "n't", 'find', 'jobs', 'US', 'And', 'Obama', 'wants', 'bring', 'immigrants', 'Via', 'Newsmax_Media', 'RepMattSalmon', 'Obama', "'Did", "n't", 'Lift', 'Finger', 'Help', 'Free', 'Marine', 'Mexican', 'Prison', 'http', '//t.co/Ia5PT3IKYCThey', 'finally', 'let', 'Marine', 'Mexican', 'prison', 'thanks', 'Obama', 'Way', 'long', 'Such', 'event', 'never', 'allowed', 'happen', 'Real_Mr_Sciales', 'realDonaldTrump', 'pretty', 'much', 'saved', 'U.S.', 'Marine', 'Mexican', 'prison', '...', 'Where', 'Obama', 'one', 'ThanksCrazy', 'Election', 'officials', 'saying', 'nothing', 'stopping', 'illegal', 'immigrants', 'voting', 'This', 'bad', 'unfair', 'Republicans', 'Via', 'BreitbartNews', 'j_strong', 'Obama', 'Administration', 'Quietly', 'Prepares', '‘', 'Surge', 'Millions', 'New', 'Immigrant', 'Ids', 'http', '//t.co/SIOY6r3REcHas', 'everyone', 'forgotten', 'marine', 'sits', 'Mexican', 'prison', 'president', 'incompetent', 'lazy', 'make', 'call', 'USMC', 'Sgt', 'Tahmooressi', 'held', 'Mexican', 'jail', '150', 'days', 'When', 'Obama', 'call', 'release', 'FreeOurMarineWe', 'got', 'get', 'Marine', 'disgusting', 'Mexican', 'jail', 'Would', 'easy', 'real', 'leader', 'One', 'tough', 'phone', 'call', "'s", 'outOur', 'government', 'imports', 'illegal', 'immigrants', 'deadly', 'diseases', 'Our', 'leaders', 'inept.Watch', '–', 'Obama', 'fix', 'illegal', 'immigrant', 'loophole', 'Instead', 'sign', 'another', 'executive', 'action', 'giving', 'amnesty.Obama', 'spoke', 'Mexican', 'president', 'last', 'week', 'mention', 'UMC', 'Sgt', 'Tahmooressi', 'Sad', 'Trump', 'Illegal', 'Immigrants', 'Are', 'Getting', 'Treated', 'Better', 'Vets', 'http', '//t.co/rYy1nnSRDp', 'via', 'nro', 'AndrewE_JohnsonMexican', 'leadership', 'laughing', 'us', 'many', 'years', 'longer', 'laughter—it', 'disbelief', '...', 'BackOnTrackUSA', 'We', 'placing', 'tariffs', 'Mexican', 'goods', 'coming', 'country', 'reimburse', 'American', 'taxpayer', 'secure', 'borderMexico', 'allowing', 'many', 'thousands', 'go', 'thru', 'country', 'stupid', 'open', 'door', 'The', 'Mexicans', 'laughing', 'us', 'buses', 'pass', 'by.USMC', 'Sgt', 'Tahmooressi', 'sacrificed', 'country', 'While', 'Obama', 'welcoming', 'illegals', 'Marine', 'locked', 'Mexican', 'jail', 'FreeOurMarineOur', 'gov', 'immediately', 'stop', 'sending', 'Mexico', 'friend', 'release', 'Marine', 'stop', 'allowing', 'immigrant', 'inflow', 'U.S.', 'chargermike41', 'BackOnTrackUSA', 'wtf', 'Free', 'immigrants', 'But', 'rest', 'us', 'bust', 'asses', 'get', 'pay', 'Your', 'tax', 'dollars', 'well', 'spent', 'Over', '1.295M', 'ObamaCare', 'enrollees', 'also', 'illegal', 'immigrants', 'http', '//t.co/VE85kBl3VT', 'Are', 'surprised', 'TAGIII', 'realDonaldTrump', 'mfinale1', 'Explain', 'BHO', 'rescues', 'deserter', 'leaves', 'real', 'soldier', 'rotting', 'Mexican', 'jail', 'Another', 'cover-up', 'Obama', 'disclose', 'many', 'illegal', 'immigrants', 'released', 'country', 'http', '//t.co/h8WhM3htvF', 'No', 'surprise.It', 'would', 'nice', 'commander-in-chief', 'concerned', 'Veterans', 'health', 'illegal', 'immigrants', 'becoming', 'citizens.30,000', 'illegal', 'immigrants', 'CRIMINAL', 'RECORDS', 'released', 'last', 'year', 'wonderful', 'though', 'highly', 'incompetent', 'government', 'So', 'stupid', 'According', 'pewresearch', 'illegal', 'immigrants', 'favor', 'Dems', '8:1', 'http', '//t.co/ZN4rOIFVzA', 'GOP', 'pushing', 'amnesty', 'Do', 'death', 'wishGreat', 'read', 'VDHanson', 'Mexico', "'s", 'Hypocrisy', 'Is', 'Evident', 'In', 'Its', 'Own', 'Strict', 'Policy', 'Toward', 'Immigrants', 'http', '//t.co/OfmzjKk6x7Now', 'AP', 'banning', 'term', 'illegal', 'immigrants', 'What', 'call', "'Americans", 'This', 'country', "'s", 'political', 'press', 'amazing', 'According', 'pewresearch', '2/3', 'Mexican', 'LEGAL', 'immigrants', 'pursue', 'citizenship', '‘', 'interest', 'http', '//t.co/Vfias8bxlo', 'GOP', 'need', 'face', 'reality', '–', 'one', 'illegal', 'immigrants', 'granted', 'amnesty', 'vote', 'Republican.Major', 'Mexican', 'cartel', 'boss', 'El', 'Diego', 'arrested', 'weapons', 'provided', 'Fast', 'Furious', 'http', '//t.co/rFLwJBxy', 'Media', 'The', 'illegal', 'immigrant', 'crime', 'problem', 'far', 'serious', 'threatening', 'people', 'understand', 'Along', 'cont', 'http', '//t.co/UAAIAKdSObamaCare', 'gives', 'free', 'insurance', 'illegal', 'immigrants', 'Yet', 'BarackObama', 'cutting', 'troops', 'healthcare', 'cont', 'http', '//t.co/SHQuYovwCanada', "'s", 'legal', 'immigration', 'plan', 'starts', 'simple', 'smart', 'question', 'How', 'immigrant', 'applying', 'fo…', 'cont', 'http', '//t.co/aHYaJt5b', 'BarackObama', 'sold', 'guns', 'Mexican', 'drug', 'cartels', 'They', 'used', 'murders', 'Americans', 'Where', 'outrage', 'It', 'seems', 'BarackObama', 'tax', 'dollars', 'buy', 'guns', 'Mexican', 'drug', 'lords', 'used', 'kill', 'Americans', 'We', 'need', 'answers', 'now.Why', 'BarackObama', 'selling', 'guns', 'Mexican', 'drug', 'dealers', 'Fast', 'Furious', 'put', 'semi-automatics', 'hands', 'Mexican', 'drug', 'lords', 'killed', 'Americans', 'BarackObama', 'answer', 'questions', 'BarackObama', 'sold', 'guns', 'Mexican', 'drug', 'lords', 'DOJ', 'erodes', '2nd', 'Amendment', 'rights']
from nltk.collocations import *
from nltk.probability import FreqDist
freq = FreqDist(wordsNoStop)

for i in sorted(freq, key=freq.get, reverse=True):
    print(i,freq[i])

Mexican 41
immigrants 32
illegal 31
http 19
immigrant 15
border 14
Trump 12
drug 10
's 10
Obama 10
Mexico 9
realDonaldTrump 9
people 8
I 8
U.S. 8
us 7
prison 7
n't 7
country 6
The 6
Are 6
Marine 6
BarackObama 6
https 5
killed 5
criminals 5
America 5
stop 5
We 5
Hillary 4
GOP 4
They 4
want 4
legal 4
Immigrants 4
Bush 4
open 4
Jeb 4
must 4
Via 4
Chapo 4
leaders 4
say 4
many 4
call 4
jail 4
guns 4
Clinton 3
wants 3
know 3
nothing 3
New 3
new 3
beautiful 3
Vets 3
Illegal 3
like 3
free 3
year 3
This 3
build 3
never 3
incompetent 3
one 3
El 3
cartels 3
death 3
lord 3
escaped 3
ca 3
saying 3
coming 3
wall 3
Immigrant 3
– 3
love 3
He 3
real 3
much 3
killing 3
jobs 3
trade 3
Univision 3
YES 3
need 3
government 3
get 3
used 3
Sgt 3
Tahmooressi 3
cont 3
Americans 3
lords 3
called 2
Syrian 2
mention 2
massive 2
NO 2
protesters 2
Sarah 2
leaves 2
amazing 2
talking 2
American 2
flags 2
Do 2
care 2
Donald 2
across 2
record 2
Great 2
borders 2
JebBush 2
MEXICAN 2
ObamaCare 2
So 2
crazy 2
cares 2
How 2
right 2
Again 2
wonderful 2
woman 2
Get 2
go 2
undocumented 2
health 2
Veterans 2
AP 2
said 2
citizenship 2
Thx 2
LEGAL 2
Kate 2
good 2
Now 2
everyone 2
comes 2
It 2
immigration 2
cutting 2
Macys 2
pouring 2
negotiators 2
smarter 2
pushing 2
secure 2
young 2
San 2
crime 2
smart 2
SOME 2
illegals 2
bad 2
friend 2
're 2
Did 2
Mexicans 2
far 2
gov 2
deduct 2
costs 2
foreign 2
aid 2
system 2
money 2
sending 2
Free 2
... 2
Where 2
‘ 2
president 2
release 2
last 2
laughing 2
BackOnTrackUSA 2
allowing 2
stupid 2
tax 2
dollars 2
released 2
According 2
pewresearch 2
amnesty 2
Fast 2
Furious 2
sold 2
550 1
even 1
radical 1
Islamic 1
terrorists. 1
Debate… 1
//t.co/Rf48XkZWbuFive 1
Washington 1
State 1
Middle 1
Eastern 1
Many 1
died 1
weekend 1
Ohio 1
overdoses 1
N.C. 1
riots 1
During 1
convention 1
CNN 1
cut 1
away 1
victims 1
violence 1
heard 1
//t.co/EHRiLkQDWDCrooked 1
flood 1
little 1
danger 1
Government 1
data 1
Center 1
Immigration 1
Studies 1
shows 1
3M 1
settled 1
.. 1
//t.co/hMFyZc1kAMThe 1
thugs 1
flying 1
flag 1
rally 1
inside 1
big 1
outside 1
Just 1
met 1
courageous 1
family 1
Root 1
Nebraska 1
horribly 1
behind 1
legacy.Everybody 1
burning 1
proudly 1
waving 1
First 1
voters 1
believe 1
Obamacare 1
She 1
spend 1
time 1
taking 1
great 1
WaltSeher 1
morg25016893 1
eventbrite 1
yup 1
200 1
Polish 1
hired 1
contractor 1
RT 1
seanhannity 1
Watch 1
OWNS 1
A 1
Heckler 1
Who 1
Said 1
Backbone 1
Of 1
//t.co/cRAOzIP0pHIllegal 1
children 1
non-Mexicans 1
surge 1
rate 1
//t.co/V6TP55dRACJamiel 1
Shaw 1
incredible 1
foxandfriends 1
morning 1
His 1
son 1
viciously 1
proud 1
pop 1
josemen31 1
loves 1
man 1
Keep 1
thing 1
mexicolovestrump 1
American1st 1
ofccadjust 1
AnnCoulter 1
GW 1
TERRORISTS 1
CAN 1
COME 1
ACROSS 1
BORDER 1
AT 1
WILL 1
Notice 1
given 1
college 1
tuition 1
mentioned 1
VETERANS 1
DemDebate 1
YoungYoung54 1
JeriHyatt 1
megynkelly 1
true 1
speaks 1
English 1
7.5 1
births 1
300,000 1
babies 1
per 1
Unaffordable 1
charged 1
fatal 1
bludgeoning 1
loved 1
64 1
old 1
WALL 1
gpavlik7 1
1/2 1
California 1
driver 1
licenses 1
Read 1
Sac 1
Bee 1
July 1
17th 1
Go 1
get'em 1
amit_ 1
realdonaldtrump 1
agree 1
100 1
McCain 1
fighting 1
anything 1
soon 1
point 1
politicians 1
treating 1
better 1
veterans.It 1
national 1
embarrassment 1
walk 1
receive 1
..... 1
March,2013 1
to…pathway 1
//t.co/zeEKCFXroE 1
Lying 1
campaign 1
trail 1
danforc 1
'm 1
glad 1
someone 1
standing 1
millions 1
things 1
book 1
earn 1
place 1
LeeEllmauerJr 1
Latino 1
talk 1
factories 1
warehouses 1
Want 1
OBAMA 1
give 1
AMNESTY 1
RIGHT 1
absolutely 1
support 1
Law—in 1
honor 1
Steinle 1
gunned 1
SF 1
immigrant.The 1
joke 1
around 1
town 1
freed 1
timing 1
w/ 1
statements 1
security.El 1
use 1
unimpeded 1
vacuum 1
cleaner 1
sucking 1
drugs 1
U.S.The 1
invite 1
become 1
citizen 1
cocaine 1
etc 1
Can 1
envision 1
negotiating 1
'El 1
.... 1
Legal 1
security 1
common 1
sense 1
Let 1
Make 1
//t.co/I5CybmR0MF 1
WayneDupreeShow 1
U 1
angry 1
media 1
turned 1
DonaldTrump 1
SLAM 1
hating 1
immigrantsVia 1
DailyCaller 1
samsondunn 1
Pastor 1
To 1
Hispanic 1
Congregation 1
Speaks 1
Out 1
On 1
Crime 1
Statement 1
//t.co/rfWcQ7wcjf 1
DanScavino 1
Deported 1
6 1
Times 1
Charged 1
Felony 1
Hit 1
Run 1
Family 1
wrong 1
Trump2016 1
credit 1
card 1
protest 1
USI 1
simply 1
gov't 1
hard 1
core 1
U.S.Flashback 1
says 1
breaking 1
laws 1
act 1
//t.co/p8yFzVuw8w 1
border.Rick 1
Perry 1
failed 1
critical 1
needs 1
pair 1
glasses 1
see 1
crimes 1
committed 1
futureicon 1
correct 1
Hear 1
shot 1
Francisco 1
'd 1
deported 1
5 1
times 1
VeneziaMatthew 1
candidate 1
Much 1
Fact 1
nanaelaine7 1
wait 1
inauguration 1
beginning 1
end 1
criminal 1
MAKE 1
AMERICA 1
GREAT 1
AGAIN 1
Thanks.What 1
women 1
front 1
father 1
Fran 1
tougher 1
WAKE 1
UP 1
babyylissa 1
calls 1
gang 1
bangers 1
gets 1
attacked 1
calling 1
countries 1
Highlander6700 1
Seems 1
1 1
2 1
lines 1
Mr. 1
comments 1
continuously 1
taken 1
context 1
RealNinjetta 1
ErinSiegal 1
AppSame 1
//t.co/QNOuFlufaS 1
My 1
friends 1
fly 1
visit 1
UNSAFE 1
THESHARKTANK1 1
Controversial 1
Comments 1
Accurate 1
//t.co/nYL2QQMwKZI 1
FIGHT 1
TheHolyBreadcat 1
Vote 1
making 1
wo 1
worry 1
problems 1
imprimis310 1
NBC 1
bigot 1
SenTedCruz 1
speaking 1
truth 1
ILLEGAL 1
KEEMSTARx 1
USA 1
Racism 1
controlled 1
terrible 1
situation 1
horrible 1
deals 1
Forcing 1
stop- 1
way 1
spirit 1
protect 1
U.S.Our 1
breached 1
daily 1
//t.co/jEgR6jSQ5JThe 1
wide 1
terrorists 1
Secure 1
Build 1
hope 1
judge 1
honest 1
businessmen 1
court 1
avoid 1
paying 1
owe 1
me.The 1
corrupt 1
Pay 1
owed 1
seankesser 1
People 1
bachelor 1
degrees 1
find 1
US 1
And 1
bring 1
Newsmax_Media 1
RepMattSalmon 1
'Did 1
Lift 1
Finger 1
Help 1
Prison 1
//t.co/Ia5PT3IKYCThey 1
finally 1
let 1
thanks 1
Way 1
long 1
Such 1
event 1
allowed 1
happen 1
Real_Mr_Sciales 1
pretty 1
saved 1
ThanksCrazy 1
Election 1
officials 1
stopping 1
voting 1
unfair 1
Republicans 1
BreitbartNews 1
j_strong 1
Administration 1
Quietly 1
Prepares 1
Surge 1
Millions 1
Ids 1
//t.co/SIOY6r3REcHas 1
forgotten 1
marine 1
sits 1
lazy 1
make 1
USMC 1
held 1
150 1
days 1
When 1
FreeOurMarineWe 1
got 1
disgusting 1
Would 1
easy 1
leader 1
One 1
tough 1
phone 1
outOur 1
imports 1
deadly 1
diseases 1
Our 1
inept.Watch 1
fix 1
loophole 1
Instead 1
sign 1
another 1
executive 1
action 1
giving 1
amnesty.Obama 1
spoke 1
week 1
UMC 1
Sad 1
Getting 1
Treated 1
Better 1
//t.co/rYy1nnSRDp 1
via 1
nro 1
AndrewE_JohnsonMexican 1
leadership 1
years 1
longer 1
laughter—it 1
disbelief 1
placing 1
tariffs 1
goods 1
reimburse 1
taxpayer 1
borderMexico 1
thousands 1
thru 1
door 1
buses 1
pass 1
by.USMC 1
sacrificed 1
While 1
welcoming 1
locked 1
FreeOurMarineOur 1
immediately 1
inflow 1
chargermike41 1
wtf 1
But 1
rest 1
bust 1
asses 1
pay 1
Your 1
well 1
spent 1
Over 1
1.295M 1
enrollees 1
also 1
//t.co/VE85kBl3VT 1
surprised 1
TAGIII 1
mfinale1 1
Explain 1
BHO 1
rescues 1
deserter 1
soldier 1
rotting 1
Another 1
cover-up 1
disclose 1
//t.co/h8WhM3htvF 1
No 1
surprise.It 1
would 1
nice 1
commander-in-chief 1
concerned 1
becoming 1
citizens.30,000 1
CRIMINAL 1
RECORDS 1
though 1
highly 1
favor 1
Dems 1
8:1 1
//t.co/ZN4rOIFVzA 1
wishGreat 1
read 1
VDHanson 1
Hypocrisy 1
Is 1
Evident 1
In 1
Its 1
Own 1
Strict 1
Policy 1
Toward 1
//t.co/OfmzjKk6x7Now 1
banning 1
term 1
What 1
'Americans 1
political 1
press 1
2/3 1
pursue 1
interest 1
//t.co/Vfias8bxlo 1
face 1
reality 1
granted 1
vote 1
Republican.Major 1
cartel 1
boss 1
Diego 1
arrested 1
weapons 1
provided 1
//t.co/rFLwJBxy 1
Media 1
problem 1
serious 1
threatening 1
understand 1
Along 1
//t.co/UAAIAKdSObamaCare 1
gives 1
insurance 1
Yet 1
troops 1
healthcare 1
//t.co/SHQuYovwCanada 1
plan 1
starts 1
simple 1
question 1
applying 1
fo… 1
//t.co/aHYaJt5b 1
murders 1
outrage 1
seems 1
buy 1
kill 1
answers 1
now.Why 1
selling 1
dealers 1
put 1
semi-automatics 1
hands 1
answer 1
questions 1
DOJ 1
erodes 1
2nd 1
Amendment 1
rights 1
freq
FreqDist({'Mexican': 41, 'immigrants': 32, 'illegal': 31, 'http': 19, 'immigrant': 15, 'border': 14, 'Trump': 12, 'drug': 10, "'s": 10, 'Obama': 10, ...})
from nltk.stem.lancaster import LancasterStemmer
from nltk.stem.porter import PorterStemmer

stemmed_words = [LancasterStemmer().stem(w) for w in words]
stemmed_words

['hil',
 'has',
 'cal',
 'for',
 '550',
 '%',
 'mor',
 'syr',
 'immigr',
 ',',
 'but',
 'won',
 '’',
 't',
 'ev',
 'ment',
 '“',
 'rad',
 'islam',
 'terrorists.',
 '”',
 '#',
 'debate…',
 'https',
 ':',
 '//t.co/rf48xkzwbufive',
 'peopl',
 'kil',
 'in',
 'washington',
 'stat',
 'by',
 'a',
 'middl',
 'eastern',
 'immigr',
 '.',
 'many',
 'peopl',
 'died',
 'thi',
 'weekend',
 'in',
 'ohio',
 'from',
 'drug',
 'overdos',
 '.',
 'n.c.',
 'riot',
 '!',
 'dur',
 'the',
 'gop',
 'conv',
 ',',
 'cnn',
 'cut',
 'away',
 'from',
 'the',
 'victim',
 'of',
 'illeg',
 'immigr',
 'viol',
 '.',
 'they',
 'don',
 '’',
 't',
 'want',
 'them',
 'heard',
 '.',
 'https',
 ':',
 '//t.co/ehrilkqdwdcrooked',
 'hil',
 'clinton',
 'want',
 'to',
 'flood',
 'our',
 'country',
 'with',
 'syr',
 'immigr',
 'that',
 'we',
 'know',
 'littl',
 'or',
 'noth',
 'about',
 '.',
 'the',
 'dang',
 'is',
 'mass',
 '.',
 'no',
 '!',
 'new',
 'govern',
 'dat',
 'by',
 'the',
 'cent',
 'for',
 'immigr',
 'study',
 'show',
 'mor',
 'than',
 '3m',
 'new',
 'leg',
 '&',
 'illeg',
 'immigr',
 'settl',
 '..',
 'https',
 ':',
 '//t.co/hmfyzc1kamthe',
 'protest',
 'in',
 'new',
 'mexico',
 'wer',
 'thug',
 'who',
 'wer',
 'fly',
 'the',
 'mex',
 'flag',
 '.',
 'the',
 'ral',
 'insid',
 'was',
 'big',
 'and',
 'beauty',
 ',',
 'but',
 'outsid',
 ',',
 'crimin',
 '!',
 'just',
 'met',
 'with',
 'cour',
 'famy',
 'of',
 'sarah',
 'root',
 'in',
 'nebrask',
 '.',
 'sarah',
 'was',
 'horr',
 'kil',
 'by',
 'illeg',
 'immigr',
 ',',
 'but',
 'leav',
 'behind',
 'amaz',
 'legacy.everybody',
 'is',
 'talk',
 'about',
 'the',
 'protest',
 'burn',
 'the',
 'am',
 'flag',
 'and',
 'proud',
 'wav',
 'mex',
 'flag',
 '.',
 'i',
 'want',
 'americ',
 'first',
 '-',
 'so',
 'do',
 'vot',
 '!',
 'do',
 'you',
 'believ',
 'that',
 'hil',
 'clinton',
 'now',
 'want',
 'obamac',
 'for',
 'illeg',
 'immigr',
 '?',
 'she',
 'should',
 'spend',
 'mor',
 'tim',
 'tak',
 'car',
 'of',
 'our',
 'gre',
 'vet',
 '!',
 '``',
 '@',
 'waltseh',
 ':',
 '@',
 'realdonaldtrump',
 '@',
 'morg25016893',
 '@',
 'eventbrit',
 'yup',
 '200',
 'pol',
 'immigr',
 'wer',
 'hir',
 'by',
 'his',
 'contract',
 'not',
 'trump',
 "''",
 'rt',
 '@',
 'seanhan',
 ':',
 'watch',
 ':',
 'donald',
 'trump',
 'own',
 'a',
 'heckl',
 'who',
 'said',
 'illeg',
 'immigr',
 'ar',
 'the',
 'backbon',
 'of',
 'americ',
 'https',
 ':',
 '//t.co/craozip0phillegal',
 'immigr',
 'childr',
 ',',
 'non-mexicans',
 'surg',
 'across',
 'bord',
 'at',
 'record',
 'rat',
 'https',
 ':',
 '//t.co/v6tp55dracjamiel',
 'shaw',
 'was',
 'incred',
 'on',
 '@',
 'foxandfriend',
 'thi',
 'morn',
 '.',
 'his',
 'son',
 ',',
 'who',
 'was',
 'vicy',
 'kil',
 'by',
 'an',
 'illeg',
 'immigr',
 ',',
 'is',
 'so',
 'proud',
 'of',
 'pop',
 '!',
 '``',
 '@',
 'josemen31',
 ':',
 '@',
 'realdonaldtrump',
 'thi',
 'mex',
 'her',
 'lov',
 'you',
 'man',
 '!',
 '!',
 'keep',
 'doing',
 'yo',
 'thing',
 '#',
 'mexicolovestrump',
 "''",
 'gre',
 '!',
 '``',
 '@',
 'american1st',
 ':',
 '@',
 'ofccadjust',
 '@',
 'anncoult',
 'gw',
 'bush',
 'was',
 'op',
 'bord',
 'lik',
 '@',
 'jebbush',
 '.',
 'ter',
 'can',
 'com',
 'across',
 'mex',
 'bord',
 'at',
 'wil',
 '!',
 '``',
 'not',
 'that',
 'illeg',
 'immigr',
 'wil',
 'be',
 'giv',
 'obamac',
 'and',
 'fre',
 'colleg',
 'tuit',
 'but',
 'noth',
 'has',
 'been',
 'ment',
 'about',
 'our',
 'vet',
 '#',
 'demdeb',
 "''",
 '@',
 'youngyoung54',
 ':',
 '@',
 'jerihyat',
 '@',
 'megynkel',
 '@',
 'jebbush',
 'so',
 'tru',
 '.',
 'jeb',
 'bush',
 'is',
 'crazy',
 ',',
 'who',
 'car',
 'that',
 'he',
 'speak',
 'mex',
 ',',
 'thi',
 'is',
 'americ',
 ',',
 'engl',
 '!',
 '!',
 '``',
 'how',
 'crazy',
 '-',
 '7.5',
 '%',
 'of',
 'al',
 'birth',
 'in',
 'u.s.',
 'ar',
 'to',
 'illeg',
 'immigr',
 ',',
 'ov',
 '300,000',
 'baby',
 'per',
 'year',
 '.',
 'thi',
 'must',
 'stop',
 '.',
 'unafford',
 'and',
 'not',
 'right',
 '!',
 'again',
 ',',
 'illeg',
 'immigr',
 'is',
 'charg',
 'with',
 'the',
 'fat',
 'bludgeon',
 'of',
 'a',
 'wond',
 'and',
 'lov',
 '64',
 'year',
 'old',
 'wom',
 '.',
 'get',
 'them',
 'out',
 'and',
 'build',
 'a',
 'wal',
 '!',
 '``',
 '@',
 'gpavlik7',
 '1/2',
 'of',
 'new',
 'californ',
 'driv',
 '’',
 's',
 'licens',
 'go',
 'to',
 'undocu',
 'immigr',
 '.',
 'read',
 'the',
 'sac',
 "'",
 'bee',
 ',',
 'july',
 '17th',
 '.',
 'go',
 "get'em",
 ',',
 'trump',
 '!',
 '``',
 '``',
 '@',
 'amit_',
 '@',
 'realdonaldtrump',
 'i',
 'agr',
 '100',
 '%',
 '.',
 'mccain',
 'is',
 'fight',
 'for',
 'illeg',
 'immigr',
 'but',
 'nev',
 'did',
 'anyth',
 'for',
 'our',
 'vet',
 '.',
 '``',
 'we',
 'wil',
 'soon',
 'be',
 'at',
 'a',
 'point',
 'with',
 'our',
 'incompet',
 'polit',
 'wher',
 'we',
 'wil',
 'be',
 'tre',
 'illeg',
 'immigr',
 'bet',
 'than',
 'our',
 'veterans.it',
 "'s",
 'a',
 'nat',
 'embarrass',
 'that',
 'an',
 'illeg',
 'immigr',
 'can',
 'walk',
 'across',
 'the',
 'bord',
 'and',
 'receiv',
 'fre',
 'heal',
 'car',
 'and',
 'on',
 'of',
 'our',
 'vet',
 '.....',
 'via',
 '@',
 'ap',
 'march,2013',
 ':',
 'jeb',
 'said',
 '“',
 'he',
 'was',
 'op',
 'to…pathway',
 'for',
 'cit',
 'for',
 'illeg',
 'immigr',
 '”',
 'http',
 ':',
 '//t.co/zeekcfxroe',
 'lying',
 'on',
 'campaign',
 'trail',
 '!',
 '``',
 '@',
 'danforc',
 'as',
 'a',
 'leg',
 'immigr',
 'i',
 "'m",
 'so',
 'glad',
 'someon',
 'stand',
 'up',
 'for',
 'us',
 ',',
 'the',
 'mil',
 'who',
 'do',
 'thing',
 'by',
 'the',
 'book',
 'to',
 'earn',
 'our',
 'plac',
 'her',
 "''",
 'thx',
 "''",
 '@',
 'leeellmauerjr',
 ':',
 'leg',
 'latino',
 'immigr',
 'talk',
 'to',
 'me',
 'in',
 'fact',
 '&',
 'wareh',
 '.',
 'want',
 'to',
 'know',
 'why',
 'obam',
 'to',
 'giv',
 'amnesty',
 '?',
 'they',
 'did',
 'it',
 'right',
 '!',
 '``',
 'i',
 'absolv',
 'support',
 'kat',
 '’',
 's',
 'law—in',
 'hon',
 'of',
 'the',
 'beauty',
 'kat',
 'steinl',
 'who',
 'was',
 'gun',
 'down',
 'in',
 'sf',
 'by',
 'an',
 'illeg',
 'immigrant.the',
 'jok',
 'around',
 'town',
 'is',
 'that',
 'i',
 'free',
 'el',
 'chapo',
 'from',
 'the',
 'mex',
 'prison',
 'becaus',
 'the',
 'tim',
 'was',
 'so',
 'good',
 'w/',
 'my',
 'stat',
 'on',
 'bord',
 'security.el',
 'chapo',
 'and',
 'the',
 'mex',
 'drug',
 'cartel',
 'us',
 'the',
 'bord',
 'unimp',
 'lik',
 'it',
 'was',
 'a',
 'vacu',
 'cle',
 ',',
 'suck',
 'drug',
 'and',
 'dea',
 'right',
 'into',
 'the',
 'u.s.the',
 'u.s.',
 'wil',
 'invit',
 'el',
 'chapo',
 ',',
 'the',
 'mex',
 'drug',
 'lord',
 'who',
 'just',
 'escap',
 'prison',
 ',',
 'to',
 'becom',
 'a',
 'u.s.',
 'cit',
 'becaus',
 'our',
 '``',
 'lead',
 "''",
 'ca',
 "n't",
 'say',
 'no',
 '!',
 'now',
 'that',
 'the',
 'mex',
 'drug',
 'lord',
 'escap',
 'from',
 'prison',
 ',',
 'everyon',
 'is',
 'say',
 'that',
 'most',
 'of',
 'the',
 'cocain',
 'etc',
 '.',
 'com',
 'into',
 'the',
 'u.s.',
 'com',
 'ov',
 'bord',
 '!',
 'can',
 'you',
 'envid',
 'jeb',
 'bush',
 'or',
 'hil',
 'clinton',
 'negoty',
 'with',
 "'el",
 'chapo',
 "'",
 ',',
 'the',
 'mex',
 'drug',
 'lord',
 'who',
 'escap',
 'from',
 'prison',
 '?',
 '....',
 'leg',
 'immigr',
 'want',
 'bord',
 'sec',
 '.',
 'it',
 'is',
 'common',
 'sens',
 '.',
 'we',
 'must',
 'build',
 'a',
 'wal',
 '!',
 'let',
 "'s",
 'mak',
 'americ',
 'gre',
 'again',
 '!',
 'http',
 ':',
 '//t.co/i5cybmr0mf',
 "''",
 '@',
 'waynedupreeshow',
 ':',
 'ar',
 "n't",
 'u',
 'angry',
 'how',
 'the',
 'med',
 'has',
 'turn',
 'donaldtrump',
 'slam',
 'against',
 '``',
 'illeg',
 'immigr',
 "''",
 'into',
 'him',
 'hat',
 '``',
 'al',
 'immigrantsv',
 '@',
 'dailycal',
 'by',
 '@',
 'samsondun',
 ':',
 '“',
 'past',
 'to',
 'hisp',
 'congreg',
 'speak',
 'out',
 'on',
 'trump',
 'immigr',
 'crim',
 'stat',
 '”',
 'http',
 ':',
 '//t.co/rfwcq7wcjf',
 "''",
 '@',
 'danscavino',
 'illeg',
 'immigr',
 'deport',
 '6',
 'tim',
 'charg',
 'in',
 'felony',
 'hit',
 '&',
 'run',
 'of',
 'famy',
 '.',
 '@',
 'realdonaldtrump',
 'is',
 'not',
 'wrong',
 '.',
 '#',
 'trump2016',
 "''",
 'thx',
 'to',
 'al',
 'the',
 'peopl',
 'who',
 'cal',
 'to',
 'say',
 'they',
 'ar',
 'cut',
 'their',
 '@',
 'macy',
 'credit',
 'card',
 'as',
 'a',
 'protest',
 'against',
 'illeg',
 'immigr',
 'pour',
 'into',
 'us',
 'said',
 'simply',
 'that',
 'the',
 'mex',
 'lead',
 'and',
 'negoty',
 'ar',
 'smart',
 'than',
 'our',
 'and',
 'that',
 'the',
 'mex',
 "gov't",
 'is',
 'push',
 'their',
 'hard',
 'cor',
 'to',
 'u.s.flashback',
 '–',
 'jeb',
 'bush',
 'say',
 'illeg',
 'immigr',
 'break',
 'our',
 'law',
 'is',
 'an',
 '“',
 'act',
 'of',
 'lov',
 '”',
 'http',
 ':',
 '//t.co/p8yfzvuw8w',
 'he',
 'wil',
 'nev',
 'sec',
 'the',
 'border.rick',
 'perry',
 'fail',
 'at',
 'the',
 'bord',
 '.',
 ...]
myStopWords = list(punctuation) + stopwords.words('english')+ no_words

wordsNoStop = []
for i in stemmed_words:
    if i not in myStopWords:
        wordsNoStop.append(i)
#print(words)
print(wordsNoStop)

['hil', 'cal', '550', 'mor', 'syr', 'immigr', 'ev', 'ment', 'rad', 'islam', 'terrorists.', 'debate…', 'https', '//t.co/rf48xkzwbufive', 'peopl', 'kil', 'washington', 'stat', 'middl', 'eastern', 'immigr', 'many', 'peopl', 'died', 'thi', 'weekend', 'ohio', 'drug', 'overdos', 'n.c.', 'riot', 'dur', 'gop', 'conv', 'cnn', 'cut', 'away', 'victim', 'illeg', 'immigr', 'viol', 'want', 'heard', 'https', '//t.co/ehrilkqdwdcrooked', 'hil', 'clinton', 'want', 'flood', 'country', 'syr', 'immigr', 'know', 'littl', 'noth', 'dang', 'mass', 'new', 'govern', 'dat', 'cent', 'immigr', 'study', 'show', 'mor', '3m', 'new', 'leg', 'illeg', 'immigr', 'settl', '..', 'https', '//t.co/hmfyzc1kamthe', 'protest', 'new', 'mexico', 'wer', 'thug', 'wer', 'fly', 'mex', 'flag', 'ral', 'insid', 'big', 'beauty', 'outsid', 'crimin', 'met', 'cour', 'famy', 'sarah', 'root', 'nebrask', 'sarah', 'horr', 'kil', 'illeg', 'immigr', 'leav', 'behind', 'amaz', 'legacy.everybody', 'talk', 'protest', 'burn', 'flag', 'proud', 'wav', 'mex', 'flag', 'want', 'americ', 'first', 'vot', 'believ', 'hil', 'clinton', 'want', 'obamac', 'illeg', 'immigr', 'spend', 'mor', 'tim', 'tak', 'car', 'gre', 'vet', 'waltseh', 'realdonaldtrump', 'morg25016893', 'eventbrit', 'yup', '200', 'pol', 'immigr', 'wer', 'hir', 'contract', 'trump', 'rt', 'seanhan', 'watch', 'donald', 'trump', 'heckl', 'said', 'illeg', 'immigr', 'ar', 'backbon', 'americ', 'https', '//t.co/craozip0phillegal', 'immigr', 'childr', 'non-mexicans', 'surg', 'across', 'bord', 'record', 'rat', 'https', '//t.co/v6tp55dracjamiel', 'shaw', 'incred', 'foxandfriend', 'thi', 'morn', 'son', 'vicy', 'kil', 'illeg', 'immigr', 'proud', 'pop', 'josemen31', 'realdonaldtrump', 'thi', 'mex', 'lov', 'man', 'keep', 'yo', 'thing', 'mexicolovestrump', 'gre', 'american1st', 'ofccadjust', 'anncoult', 'gw', 'bush', 'op', 'bord', 'lik', 'jebbush', 'ter', 'com', 'across', 'mex', 'bord', 'wil', 'illeg', 'immigr', 'wil', 'giv', 'obamac', 'fre', 'colleg', 'tuit', 'noth', 'ment', 'vet', 'demdeb', 'youngyoung54', 'jerihyat', 'megynkel', 'jebbush', 'tru', 'jeb', 'bush', 'crazy', 'car', 'speak', 'mex', 'thi', 'americ', 'engl', 'crazy', '7.5', 'al', 'birth', 'u.s.', 'ar', 'illeg', 'immigr', 'ov', '300,000', 'baby', 'per', 'year', 'thi', 'must', 'stop', 'unafford', 'right', 'illeg', 'immigr', 'charg', 'fat', 'bludgeon', 'wond', 'lov', '64', 'year', 'old', 'wom', 'get', 'build', 'wal', 'gpavlik7', '1/2', 'new', 'californ', 'driv', 'licens', 'go', 'undocu', 'immigr', 'read', 'sac', 'bee', 'july', '17th', 'go', "get'em", 'trump', 'amit_', 'realdonaldtrump', 'agr', '100', 'mccain', 'fight', 'illeg', 'immigr', 'nev', 'anyth', 'vet', 'wil', 'soon', 'point', 'incompet', 'polit', 'wher', 'wil', 'tre', 'illeg', 'immigr', 'bet', 'veterans.it', "'s", 'nat', 'embarrass', 'illeg', 'immigr', 'walk', 'across', 'bord', 'receiv', 'fre', 'heal', 'car', 'vet', '.....', 'via', 'ap', 'march,2013', 'jeb', 'said', 'op', 'to…pathway', 'cit', 'illeg', 'immigr', 'http', '//t.co/zeekcfxroe', 'lying', 'campaign', 'trail', 'danforc', 'leg', 'immigr', "'m", 'glad', 'someon', 'stand', 'us', 'mil', 'thing', 'book', 'earn', 'plac', 'thx', 'leeellmauerjr', 'leg', 'latino', 'immigr', 'talk', 'fact', 'wareh', 'want', 'know', 'obam', 'giv', 'amnesty', 'right', 'absolv', 'support', 'kat', 'law—in', 'hon', 'beauty', 'kat', 'steinl', 'gun', 'sf', 'illeg', 'immigrant.the', 'jok', 'around', 'town', 'free', 'el', 'chapo', 'mex', 'prison', 'becaus', 'tim', 'good', 'w/', 'stat', 'bord', 'security.el', 'chapo', 'mex', 'drug', 'cartel', 'us', 'bord', 'unimp', 'lik', 'vacu', 'cle', 'suck', 'drug', 'dea', 'right', 'u.s.the', 'u.s.', 'wil', 'invit', 'el', 'chapo', 'mex', 'drug', 'lord', 'escap', 'prison', 'becom', 'u.s.', 'cit', 'becaus', 'lead', 'ca', "n't", 'say', 'mex', 'drug', 'lord', 'escap', 'prison', 'everyon', 'say', 'cocain', 'etc', 'com', 'u.s.', 'com', 'ov', 'bord', 'envid', 'jeb', 'bush', 'hil', 'clinton', 'negoty', "'el", 'chapo', 'mex', 'drug', 'lord', 'escap', 'prison', '....', 'leg', 'immigr', 'want', 'bord', 'sec', 'common', 'sens', 'must', 'build', 'wal', 'let', "'s", 'mak', 'americ', 'gre', 'http', '//t.co/i5cybmr0mf', 'waynedupreeshow', 'ar', "n't", 'u', 'angry', 'med', 'turn', 'donaldtrump', 'slam', 'illeg', 'immigr', 'hat', 'al', 'immigrantsv', 'dailycal', 'samsondun', 'past', 'hisp', 'congreg', 'speak', 'trump', 'immigr', 'crim', 'stat', 'http', '//t.co/rfwcq7wcjf', 'danscavino', 'illeg', 'immigr', 'deport', '6', 'tim', 'charg', 'felony', 'hit', 'run', 'famy', 'realdonaldtrump', 'wrong', 'trump2016', 'thx', 'al', 'peopl', 'cal', 'say', 'ar', 'cut', 'macy', 'credit', 'card', 'protest', 'illeg', 'immigr', 'pour', 'us', 'said', 'simply', 'mex', 'lead', 'negoty', 'ar', 'smart', 'mex', "gov't", 'push', 'hard', 'cor', 'u.s.flashback', '–', 'jeb', 'bush', 'say', 'illeg', 'immigr', 'break', 'law', 'act', 'lov', 'http', '//t.co/p8yfzvuw8w', 'wil', 'nev', 'sec', 'border.rick', 'perry', 'fail', 'bord', 'crit', 'nee', 'new', 'pair', 'glass', 'see', 'crim', 'commit', 'illeg', 'immigr', 'futureicon', 'gop', 'trump', 'correct', 'hear', 'young', 'wom', 'shot', 'dea', 'san', 'francisco', 'mex', "'d", 'deport', '5', 'tim', 'veneziamatthew', 'trump', 'real', 'candid', 'say', 'al', 'know', 'much', 'crim', 'com', 'illeg', 'immigr', 'fact', 'nanaelaine7', 'ca', "n't", 'wait', 'yo', 'inaug', 'begin', 'end', 'thes', 'crimin', 'immigr', 'mak', 'americ', 'gre', 'thanks.what', 'undocu', 'immigr', 'record', 'kil', 'beauty', 'young', 'wom', 'front', 'fath', 'san', 'fran', 'get', 'smart', 'mex', 'lead', 'negoty', 'ar', 'much', 'tough', 'smart', 'thos', 'u.s.', 'mexico', 'kil', 'us', 'job', 'trad', 'wak', 'babyyliss', 'obam', 'cal', 'immigr', 'gang', 'bang', 'crimin', 'trump', 'get', 'attack', 'cal', 'som', 'illeg', 'som', 'country', 'bad', 'peopl', 'highlander6700', 'realdonaldtrump', 'macy', 'seem', '1', '2', 'lin', 'mr.', 'trump', "'s", 'com', 'immigr', 'ar', 'continu', 'tak', 'context', 'realninjett', 'erinsieg', 'appsam', 'univid', 'http', '//t.co/qnouflufas', 'many', 'mex', 'friend', 'fly', 'visit', 'mexico', 'becaus', 'unsaf', 'bord', 'via', 'thesharktank1', 'donald', 'trump', "'s", 'controvers', 'mex', 'com', 'ar', 'acc', 'http', '//t.co/nyl2qqmwkzi', 'lov', 'mex', 'peopl', 'mexico', 'friend', "'re", 'kil', 'us', 'bord', "'re", 'kil', 'us', 'job', 'trad', 'fight', 'theholybreadc', 'realdonaldtrump', 'vot', 'trump', "'s", 'mak', 'americ', 'wher', 'wo', "n't", 'worry', 'illeg', 'immigr', 'problem', 'imprimis310', 'nbc', 'bigot', 'realdonaldtrump', 'sentedcruz', 'speak', 'tru', 'illeg', 'immigr', 'keemstarx', 'mex', 'crimin', 'com', 'us', 'ye', 'trump', 'say', 'nee', 'stop', 'ye', 'say', 'mex', 'ar', 'good', 'ye', 'rac', 'univid', 'car', 'far', 'mor', 'mexico', 'doe', 'u.s.', 'ar', 'control', 'mex', 'govern', 'mex', 'gov', 'doe', "n't", 'want', 'talk', 'terr', 'bord', 'situ', 'horr', 'trad', 'deal', 'forc', 'univid', 'get', 'stop-', 'way', 'lik', 'mexico', 'lov', 'spirit', 'mex', 'peopl', 'must', 'protect', 'bord', 'peopl', 'al', 'ov', 'pour', 'u.s.our', 'bord', 'breach', 'dai', 'crimin', 'must', 'build', 'wal', 'deduc', 'cost', 'mex', 'foreign', 'aid', 'http', '//t.co/jegr6jsq5jthe', 'bord', 'wid', 'op', 'cartel', 'ter', 'sec', 'bord', 'build', 'mass', 'wal', 'deduc', 'cost', 'mex', 'foreign', 'aid', 'hop', 'mex', 'judg', 'mor', 'honest', 'mex', 'businessm', 'us', 'court', 'system', 'avoid', 'pay', 'money', 'ow', 'me.th', 'mex', 'leg', 'system', 'corrupt', 'much', 'mexico', 'pay', 'money', 'ow', 'stop', 'send', 'crimin', 'ov', 'bord', 'seankess', 'realdonaldtrump', 'peopl', 'bachel', "'s", 'degr', 'ca', "n't", 'find', 'job', 'us', 'obam', 'want', 'bring', 'mor', 'immigr', 'via', 'newsmax_media', 'repmattsalmon', 'obam', "'did", "n't", 'lift', 'fing', 'help', 'fre', 'marin', 'mex', 'prison', 'http', '//t.co/ia5pt3ikycthey', 'fin', 'let', 'marin', 'mex', 'prison', 'thank', 'obam', 'way', 'long', 'ev', 'nev', 'allow', 'hap', 'real_mr_sciales', 'realdonaldtrump', 'pretty', 'much', 'sav', 'u.s.', 'marin', 'mex', 'prison', '...', 'wher', 'obam', 'thi', 'thankscrazy', 'elect', 'say', 'ther', 'noth', 'stop', 'illeg', 'immigr', 'vot', 'thi', 'bad', 'unfair', 'republ', 'via', 'breitbartnew', 'j_strong', 'obam', 'admin', 'quiet', 'prep', '‘', 'surg', 'mil', 'new', 'immigr', 'id', 'http', '//t.co/sioy6r3rechas', 'everyon', 'forgot', 'marin', 'sit', 'mex', 'prison', 'becaus', 'hav', 'presid', 'incompet', 'lazy', 'mak', 'cal', 'usmc', 'sgt', 'tahmooress', 'held', 'mex', 'jail', 'ov', '150', 'day', 'wil', 'obam', 'cal', 'releas', 'freeourmarinew', 'hav', 'got', 'get', 'marin', 'disgust', 'mex', 'jail', 'would', 'easy', 'real', 'lead', 'tough', 'phon', 'cal', "'s", 'outo', 'govern', 'import', 'illeg', 'immigr', 'dead', 'diseas', 'lead', 'ar', 'inept.watch', '–', 'obam', 'wil', 'fix', 'illeg', 'immigr', 'loophol', 'instead', 'wil', 'sign', 'anoth', 'execut', 'act', 'giv', 'mor', 'amnesty.obama', 'spok', 'mex', 'presid', 'last', 'week', 'ment', 'umc', 'sgt', 'tahmooress', 'sad', 'trump', 'illeg', 'immigr', 'ar', 'get', 'tre', 'bet', 'vet', 'http', '//t.co/ryy1nnsrdp', 'via', 'nro', 'andrewe_johnsonmexican', 'lead', 'laugh', 'us', 'many', 'year', 'long', 'laughter—it', 'disbeliev', '...', 'backontrackus', 'plac', 'tariff', 'mex', 'good', 'com', 'thi', 'country', 'reimburs', 'taxpay', 'sec', 'bordermexico', 'allow', 'many', 'thousand', 'go', 'thru', 'country', 'stupid', 'op', 'door', 'mex', 'ar', 'laugh', 'us', 'bus', 'pass', 'by.usmc', 'sgt', 'tahmooress', 'sacr', 'country', 'whil', 'obam', 'welcom', 'illeg', 'marin', 'lock', 'mex', 'jail', 'freeourmarineo', 'gov', 'immedy', 'stop', 'send', 'mexico', 'friend', 'releas', 'marin', 'stop', 'allow', 'immigr', 'inflow', 'u.s.', 'chargermike41', 'backontrackus', 'wtf', 'fre', 'immigr', 'rest', 'us', 'hav', 'bust', 'ass', 'get', 'hav', 'pay', 'yo', 'tax', 'doll', 'wel', 'spent', 'ov', '1.295m', 'obamac', 'enrol', 'wil', 'also', 'illeg', 'immigr', 'http', '//t.co/ve85kbl3vt', 'ar', 'surpr', 'tagii', 'realdonaldtrump', 'mfinale1', 'explain', 'bho', 'rescu', 'desert', 'leav', 'real', 'soldy', 'rot', 'mex', 'jail', 'anoth', 'cover-up', 'obam', 'disclos', 'many', 'illeg', 'immigr', 'releas', 'country', 'http', '//t.co/h8whm3htvf', 'surprise.it', 'would', 'nic', 'commander-in-chief', 'concern', 'vet', 'heal', 'illeg', 'immigr', 'becom', 'citizens.30,000', 'illeg', 'immigr', 'crimin', 'record', 'wer', 'releas', 'last', 'year', 'wond', 'though', 'high', 'incompet', 'govern', 'stupid', 'accord', 'pewresearch', 'illeg', 'immigr', 'fav', 'dem', '8:1', 'http', '//t.co/zn4roifvza', 'gop', 'push', 'amnesty', 'hav', 'dea', 'wishgr', 'read', 'vdhanson', 'mexico', "'s", 'hypocrisy', 'evid', 'strict', 'policy', 'toward', 'immigr', 'http', '//t.co/ofmzjkk6x7now', 'ap', 'ban', 'term', 'illeg', 'immigr', 'cal', "'americans", 'thi', 'country', "'s", 'polit', 'press', 'amaz', 'accord', 'pewresearch', '2/3', 'mex', 'leg', 'immigr', 'pursu', 'cit', 'becaus', '‘', 'interest', 'http', '//t.co/vfias8bxlo', 'gop', 'nee', 'fac', 'real', '–', 'illeg', 'immigr', 'grant', 'amnesty', 'wil', 'vot', 'republican.major', 'mex', 'cartel', 'boss', 'el', 'diego', 'arrest', 'weapon', 'provid', 'fast', 'fury', 'http', '//t.co/rflwjbxy', 'med', 'illeg', 'immigr', 'crim', 'problem', 'far', 'mor', 'sery', 'threatening', 'peopl', 'understand', 'along', 'cont', 'http', '//t.co/uaaiakdsobamacare', 'giv', 'fre', 'ins', 'illeg', 'immigr', 'yet', 'barackobam', 'cut', 'troop', 'healthc', 'cont', 'http', '//t.co/shquyovwcanada', "'s", 'leg', 'immigr', 'plan', 'start', 'simpl', 'smart', 'quest', 'wil', 'immigr', 'apply', 'fo…', 'cont', 'http', '//t.co/ahyajt5b', 'barackobam', 'sold', 'gun', 'mex', 'drug', 'cartel', 'wer', 'us', 'murd', 'wher', 'seem', 'barackobam', 'tax', 'doll', 'buy', 'gun', 'mex', 'drug', 'lord', 'wer', 'us', 'kil', 'nee', 'answ', 'now.why', 'barackobam', 'sel', 'gun', 'mex', 'drug', 'deal', 'fast', 'fury', 'put', 'semi-automatics', 'hand', 'mex', 'drug', 'lord', 'kil', 'barackobam', 'answ', 'al', 'quest', 'barackobam', 'sold', 'gun', 'mex', 'drug', 'lord', 'whil', 'doj', 'erod', '2nd', 'amend', 'right']
from nltk.collocations import *
from nltk.probability import FreqDist
freq = FreqDist(wordsNoStop)

for i in sorted(freq, key=freq.get, reverse=True):
    print(i,freq[i])

immigr 57
mex 45
illeg 37
http 19
bord 17
ar 14
us 14
trump 12
wil 12
drug 11
obam 11
realdonaldtrump 10
's 10
peopl 9
kil 9
thi 9
mexico 9
cal 8
mor 8
want 8
com 8
u.s. 8
prison 8
say 8
country 7
leg 7
crimin 7
get 7
n't 7
marin 7
new 6
wer 6
americ 6
vet 6
al 6
ov 6
stop 6
lord 6
lead 6
barackobam 6
https 5
many 5
lov 5
fre 5
via 5
gun 5
becaus 5
hav 5
hil 4
gop 4
govern 4
vot 4
tim 4
car 4
gre 4
bush 4
op 4
giv 4
jeb 4
year 4
must 4
right 4
build 4
wal 4
wher 4
chapo 4
cartel 4
sec 4
mak 4
crim 4
smart 4
nee 4
real 4
much 4
jail 4
releas 4
ment 3
stat 3
cut 3
clinton 3
know 3
noth 3
protest 3
flag 3
beauty 3
talk 3
obamac 3
said 3
across 3
record 3
yo 3
lik 3
speak 3
wom 3
go 3
nev 3
incompet 3
cit 3
amnesty 3
el 3
good 3
dea 3
escap 3
ca 3
negoty 3
– 3
job 3
trad 3
univid 3
friend 3
ye 3
pay 3
allow 3
sgt 3
tahmooress 3
cont 3
syr 2
ev 2
mass 2
fly 2
famy 2
sarah 2
horr 2
leav 2
amaz 2
proud 2
tak 2
donald 2
surg 2
thing 2
jebbush 2
ter 2
tru 2
crazy 2
charg 2
wond 2
undocu 2
read 2
fight 2
polit 2
tre 2
bet 2
heal 2
ap 2
mil 2
plac 2
thx 2
fact 2
kat 2
becom 2
everyon 2
let 2
med 2
deport 2
macy 2
pour 2
push 2
act 2
young 2
san 2
tough 2
som 2
bad 2
seem 2
're 2
problem 2
far 2
doe 2
gov 2
deal 2
way 2
deduc 2
cost 2
foreign 2
aid 2
system 2
money 2
ow 2
send 2
long 2
... 2
‘ 2
presid 2
would 2
anoth 2
last 2
laugh 2
backontrackus 2
stupid 2
whil 2
tax 2
doll 2
accord 2
pewresearch 2
fast 2
fury 2
quest 2
sold 2
answ 2
550 1
rad 1
islam 1
terrorists. 1
debate… 1
//t.co/rf48xkzwbufive 1
washington 1
middl 1
eastern 1
died 1
weekend 1
ohio 1
overdos 1
n.c. 1
riot 1
dur 1
conv 1
cnn 1
away 1
victim 1
viol 1
heard 1
//t.co/ehrilkqdwdcrooked 1
flood 1
littl 1
dang 1
dat 1
cent 1
study 1
show 1
3m 1
settl 1
.. 1
//t.co/hmfyzc1kamthe 1
thug 1
ral 1
insid 1
big 1
outsid 1
met 1
cour 1
root 1
nebrask 1
behind 1
legacy.everybody 1
burn 1
wav 1
first 1
believ 1
spend 1
waltseh 1
morg25016893 1
eventbrit 1
yup 1
200 1
pol 1
hir 1
contract 1
rt 1
seanhan 1
watch 1
heckl 1
backbon 1
//t.co/craozip0phillegal 1
childr 1
non-mexicans 1
rat 1
//t.co/v6tp55dracjamiel 1
shaw 1
incred 1
foxandfriend 1
morn 1
son 1
vicy 1
pop 1
josemen31 1
man 1
keep 1
mexicolovestrump 1
american1st 1
ofccadjust 1
anncoult 1
gw 1
colleg 1
tuit 1
demdeb 1
youngyoung54 1
jerihyat 1
megynkel 1
engl 1
7.5 1
birth 1
300,000 1
baby 1
per 1
unafford 1
fat 1
bludgeon 1
64 1
old 1
gpavlik7 1
1/2 1
californ 1
driv 1
licens 1
sac 1
bee 1
july 1
17th 1
get'em 1
amit_ 1
agr 1
100 1
mccain 1
anyth 1
soon 1
point 1
veterans.it 1
nat 1
embarrass 1
walk 1
receiv 1
..... 1
march,2013 1
to…pathway 1
//t.co/zeekcfxroe 1
lying 1
campaign 1
trail 1
danforc 1
'm 1
glad 1
someon 1
stand 1
book 1
earn 1
leeellmauerjr 1
latino 1
wareh 1
absolv 1
support 1
law—in 1
hon 1
steinl 1
sf 1
immigrant.the 1
jok 1
around 1
town 1
free 1
w/ 1
security.el 1
unimp 1
vacu 1
cle 1
suck 1
u.s.the 1
invit 1
cocain 1
etc 1
envid 1
'el 1
.... 1
common 1
sens 1
//t.co/i5cybmr0mf 1
waynedupreeshow 1
u 1
angry 1
turn 1
donaldtrump 1
slam 1
hat 1
immigrantsv 1
dailycal 1
samsondun 1
past 1
hisp 1
congreg 1
//t.co/rfwcq7wcjf 1
danscavino 1
6 1
felony 1
hit 1
run 1
wrong 1
trump2016 1
credit 1
card 1
simply 1
gov't 1
hard 1
cor 1
u.s.flashback 1
break 1
law 1
//t.co/p8yfzvuw8w 1
border.rick 1
perry 1
fail 1
crit 1
pair 1
glass 1
see 1
commit 1
futureicon 1
correct 1
hear 1
shot 1
francisco 1
'd 1
5 1
veneziamatthew 1
candid 1
nanaelaine7 1
wait 1
inaug 1
begin 1
end 1
thes 1
thanks.what 1
front 1
fath 1
fran 1
thos 1
wak 1
babyyliss 1
gang 1
bang 1
attack 1
highlander6700 1
1 1
2 1
lin 1
mr. 1
continu 1
context 1
realninjett 1
erinsieg 1
appsam 1
//t.co/qnouflufas 1
visit 1
unsaf 1
thesharktank1 1
controvers 1
acc 1
//t.co/nyl2qqmwkzi 1
theholybreadc 1
wo 1
worry 1
imprimis310 1
nbc 1
bigot 1
sentedcruz 1
keemstarx 1
rac 1
control 1
terr 1
situ 1
forc 1
stop- 1
spirit 1
protect 1
u.s.our 1
breach 1
dai 1
//t.co/jegr6jsq5jthe 1
wid 1
hop 1
judg 1
honest 1
businessm 1
court 1
avoid 1
me.th 1
corrupt 1
seankess 1
bachel 1
degr 1
find 1
bring 1
newsmax_media 1
repmattsalmon 1
'did 1
lift 1
fing 1
help 1
//t.co/ia5pt3ikycthey 1
fin 1
thank 1
hap 1
real_mr_sciales 1
pretty 1
sav 1
thankscrazy 1
elect 1
ther 1
unfair 1
republ 1
breitbartnew 1
j_strong 1
admin 1
quiet 1
prep 1
id 1
//t.co/sioy6r3rechas 1
forgot 1
sit 1
lazy 1
usmc 1
held 1
150 1
day 1
freeourmarinew 1
got 1
disgust 1
easy 1
phon 1
outo 1
import 1
dead 1
diseas 1
inept.watch 1
fix 1
loophol 1
instead 1
sign 1
execut 1
amnesty.obama 1
spok 1
week 1
umc 1
sad 1
//t.co/ryy1nnsrdp 1
nro 1
andrewe_johnsonmexican 1
laughter—it 1
disbeliev 1
tariff 1
reimburs 1
taxpay 1
bordermexico 1
thousand 1
thru 1
door 1
bus 1
pass 1
by.usmc 1
sacr 1
welcom 1
lock 1
freeourmarineo 1
immedy 1
inflow 1
chargermike41 1
wtf 1
rest 1
bust 1
ass 1
wel 1
spent 1
1.295m 1
enrol 1
also 1
//t.co/ve85kbl3vt 1
surpr 1
tagii 1
mfinale1 1
explain 1
bho 1
rescu 1
desert 1
soldy 1
rot 1
cover-up 1
disclos 1
//t.co/h8whm3htvf 1
surprise.it 1
nic 1
commander-in-chief 1
concern 1
citizens.30,000 1
though 1
high 1
fav 1
dem 1
8:1 1
//t.co/zn4roifvza 1
wishgr 1
vdhanson 1
hypocrisy 1
evid 1
strict 1
policy 1
toward 1
//t.co/ofmzjkk6x7now 1
ban 1
term 1
'americans 1
press 1
2/3 1
pursu 1
interest 1
//t.co/vfias8bxlo 1
fac 1
grant 1
republican.major 1
boss 1
diego 1
arrest 1
weapon 1
provid 1
//t.co/rflwjbxy 1
sery 1
threatening 1
understand 1
along 1
//t.co/uaaiakdsobamacare 1
ins 1
yet 1
troop 1
healthc 1
//t.co/shquyovwcanada 1
plan 1
start 1
simpl 1
apply 1
fo… 1
//t.co/ahyajt5b 1
murd 1
buy 1
now.why 1
sel 1
put 1
semi-automatics 1
hand 1
doj 1
erod 1
2nd 1
amend 1
freq
FreqDist({'immigr': 57, 'mex': 45, 'illeg': 37, 'http': 19, 'bord': 17, 'ar': 14, 'us': 14, 'trump': 12, 'wil': 12, 'drug': 11, ...})
sortspeechcount = {k: v for k, v in sorted(freq.items(), key=lambda item: -item[1])}
sortspeechcount

{'immigr': 57,
 'mex': 45,
 'illeg': 37,
 'http': 19,
 'bord': 17,
 'ar': 14,
 'us': 14,
 'trump': 12,
 'wil': 12,
 'drug': 11,
 'obam': 11,
 'realdonaldtrump': 10,
 "'s": 10,
 'peopl': 9,
 'kil': 9,
 'thi': 9,
 'mexico': 9,
 'cal': 8,
 'mor': 8,
 'want': 8,
 'com': 8,
 'u.s.': 8,
 'prison': 8,
 'say': 8,
 'country': 7,
 'leg': 7,
 'crimin': 7,
 'get': 7,
 "n't": 7,
 'marin': 7,
 'new': 6,
 'wer': 6,
 'americ': 6,
 'vet': 6,
 'al': 6,
 'ov': 6,
 'stop': 6,
 'lord': 6,
 'lead': 6,
 'barackobam': 6,
 'https': 5,
 'many': 5,
 'lov': 5,
 'fre': 5,
 'via': 5,
 'gun': 5,
 'becaus': 5,
 'hav': 5,
 'hil': 4,
 'gop': 4,
 'govern': 4,
 'vot': 4,
 'tim': 4,
 'car': 4,
 'gre': 4,
 'bush': 4,
 'op': 4,
 'giv': 4,
 'jeb': 4,
 'year': 4,
 'must': 4,
 'right': 4,
 'build': 4,
 'wal': 4,
 'wher': 4,
 'chapo': 4,
 'cartel': 4,
 'sec': 4,
 'mak': 4,
 'crim': 4,
 'smart': 4,
 'nee': 4,
 'real': 4,
 'much': 4,
 'jail': 4,
 'releas': 4,
 'ment': 3,
 'stat': 3,
 'cut': 3,
 'clinton': 3,
 'know': 3,
 'noth': 3,
 'protest': 3,
 'flag': 3,
 'beauty': 3,
 'talk': 3,
 'obamac': 3,
 'said': 3,
 'across': 3,
 'record': 3,
 'yo': 3,
 'lik': 3,
 'speak': 3,
 'wom': 3,
 'go': 3,
 'nev': 3,
 'incompet': 3,
 'cit': 3,
 'amnesty': 3,
 'el': 3,
 'good': 3,
 'dea': 3,
 'escap': 3,
 'ca': 3,
 'negoty': 3,
 '–': 3,
 'job': 3,
 'trad': 3,
 'univid': 3,
 'friend': 3,
 'ye': 3,
 'pay': 3,
 'allow': 3,
 'sgt': 3,
 'tahmooress': 3,
 'cont': 3,
 'syr': 2,
 'ev': 2,
 'mass': 2,
 'fly': 2,
 'famy': 2,
 'sarah': 2,
 'horr': 2,
 'leav': 2,
 'amaz': 2,
 'proud': 2,
 'tak': 2,
 'donald': 2,
 'surg': 2,
 'thing': 2,
 'jebbush': 2,
 'ter': 2,
 'tru': 2,
 'crazy': 2,
 'charg': 2,
 'wond': 2,
 'undocu': 2,
 'read': 2,
 'fight': 2,
 'polit': 2,
 'tre': 2,
 'bet': 2,
 'heal': 2,
 'ap': 2,
 'mil': 2,
 'plac': 2,
 'thx': 2,
 'fact': 2,
 'kat': 2,
 'becom': 2,
 'everyon': 2,
 'let': 2,
 'med': 2,
 'deport': 2,
 'macy': 2,
 'pour': 2,
 'push': 2,
 'act': 2,
 'young': 2,
 'san': 2,
 'tough': 2,
 'som': 2,
 'bad': 2,
 'seem': 2,
 "'re": 2,
 'problem': 2,
 'far': 2,
 'doe': 2,
 'gov': 2,
 'deal': 2,
 'way': 2,
 'deduc': 2,
 'cost': 2,
 'foreign': 2,
 'aid': 2,
 'system': 2,
 'money': 2,
 'ow': 2,
 'send': 2,
 'long': 2,
 '...': 2,
 '‘': 2,
 'presid': 2,
 'would': 2,
 'anoth': 2,
 'last': 2,
 'laugh': 2,
 'backontrackus': 2,
 'stupid': 2,
 'whil': 2,
 'tax': 2,
 'doll': 2,
 'accord': 2,
 'pewresearch': 2,
 'fast': 2,
 'fury': 2,
 'quest': 2,
 'sold': 2,
 'answ': 2,
 '550': 1,
 'rad': 1,
 'islam': 1,
 'terrorists.': 1,
 'debate…': 1,
 '//t.co/rf48xkzwbufive': 1,
 'washington': 1,
 'middl': 1,
 'eastern': 1,
 'died': 1,
 'weekend': 1,
 'ohio': 1,
 'overdos': 1,
 'n.c.': 1,
 'riot': 1,
 'dur': 1,
 'conv': 1,
 'cnn': 1,
 'away': 1,
 'victim': 1,
 'viol': 1,
 'heard': 1,
 '//t.co/ehrilkqdwdcrooked': 1,
 'flood': 1,
 'littl': 1,
 'dang': 1,
 'dat': 1,
 'cent': 1,
 'study': 1,
 'show': 1,
 '3m': 1,
 'settl': 1,
 '..': 1,
 '//t.co/hmfyzc1kamthe': 1,
 'thug': 1,
 'ral': 1,
 'insid': 1,
 'big': 1,
 'outsid': 1,
 'met': 1,
 'cour': 1,
 'root': 1,
 'nebrask': 1,
 'behind': 1,
 'legacy.everybody': 1,
 'burn': 1,
 'wav': 1,
 'first': 1,
 'believ': 1,
 'spend': 1,
 'waltseh': 1,
 'morg25016893': 1,
 'eventbrit': 1,
 'yup': 1,
 '200': 1,
 'pol': 1,
 'hir': 1,
 'contract': 1,
 'rt': 1,
 'seanhan': 1,
 'watch': 1,
 'heckl': 1,
 'backbon': 1,
 '//t.co/craozip0phillegal': 1,
 'childr': 1,
 'non-mexicans': 1,
 'rat': 1,
 '//t.co/v6tp55dracjamiel': 1,
 'shaw': 1,
 'incred': 1,
 'foxandfriend': 1,
 'morn': 1,
 'son': 1,
 'vicy': 1,
 'pop': 1,
 'josemen31': 1,
 'man': 1,
 'keep': 1,
 'mexicolovestrump': 1,
 'american1st': 1,
 'ofccadjust': 1,
 'anncoult': 1,
 'gw': 1,
 'colleg': 1,
 'tuit': 1,
 'demdeb': 1,
 'youngyoung54': 1,
 'jerihyat': 1,
 'megynkel': 1,
 'engl': 1,
 '7.5': 1,
 'birth': 1,
 '300,000': 1,
 'baby': 1,
 'per': 1,
 'unafford': 1,
 'fat': 1,
 'bludgeon': 1,
 '64': 1,
 'old': 1,
 'gpavlik7': 1,
 '1/2': 1,
 'californ': 1,
 'driv': 1,
 'licens': 1,
 'sac': 1,
 'bee': 1,
 'july': 1,
 '17th': 1,
 "get'em": 1,
 'amit_': 1,
 'agr': 1,
 '100': 1,
 'mccain': 1,
 'anyth': 1,
 'soon': 1,
 'point': 1,
 'veterans.it': 1,
 'nat': 1,
 'embarrass': 1,
 'walk': 1,
 'receiv': 1,
 '.....': 1,
 'march,2013': 1,
 'to…pathway': 1,
 '//t.co/zeekcfxroe': 1,
 'lying': 1,
 'campaign': 1,
 'trail': 1,
 'danforc': 1,
 "'m": 1,
 'glad': 1,
 'someon': 1,
 'stand': 1,
 'book': 1,
 'earn': 1,
 'leeellmauerjr': 1,
 'latino': 1,
 'wareh': 1,
 'absolv': 1,
 'support': 1,
 'law—in': 1,
 'hon': 1,
 'steinl': 1,
 'sf': 1,
 'immigrant.the': 1,
 'jok': 1,
 'around': 1,
 'town': 1,
 'free': 1,
 'w/': 1,
 'security.el': 1,
 'unimp': 1,
 'vacu': 1,
 'cle': 1,
 'suck': 1,
 'u.s.the': 1,
 'invit': 1,
 'cocain': 1,
 'etc': 1,
 'envid': 1,
 "'el": 1,
 '....': 1,
 'common': 1,
 'sens': 1,
 '//t.co/i5cybmr0mf': 1,
 'waynedupreeshow': 1,
 'u': 1,
 'angry': 1,
 'turn': 1,
 'donaldtrump': 1,
 'slam': 1,
 'hat': 1,
 'immigrantsv': 1,
 'dailycal': 1,
 'samsondun': 1,
 'past': 1,
 'hisp': 1,
 'congreg': 1,
 '//t.co/rfwcq7wcjf': 1,
 'danscavino': 1,
 '6': 1,
 'felony': 1,
 'hit': 1,
 'run': 1,
 'wrong': 1,
 'trump2016': 1,
 'credit': 1,
 'card': 1,
 'simply': 1,
 "gov't": 1,
 'hard': 1,
 'cor': 1,
 'u.s.flashback': 1,
 'break': 1,
 'law': 1,
 '//t.co/p8yfzvuw8w': 1,
 'border.rick': 1,
 'perry': 1,
 'fail': 1,
 'crit': 1,
 'pair': 1,
 'glass': 1,
 'see': 1,
 'commit': 1,
 'futureicon': 1,
 'correct': 1,
 'hear': 1,
 'shot': 1,
 'francisco': 1,
 "'d": 1,
 '5': 1,
 'veneziamatthew': 1,
 'candid': 1,
 'nanaelaine7': 1,
 'wait': 1,
 'inaug': 1,
 'begin': 1,
 'end': 1,
 'thes': 1,
 'thanks.what': 1,
 'front': 1,
 'fath': 1,
 'fran': 1,
 'thos': 1,
 'wak': 1,
 'babyyliss': 1,
 'gang': 1,
 'bang': 1,
 'attack': 1,
 'highlander6700': 1,
 '1': 1,
 '2': 1,
 'lin': 1,
 'mr.': 1,
 'continu': 1,
 'context': 1,
 'realninjett': 1,
 'erinsieg': 1,
 'appsam': 1,
 '//t.co/qnouflufas': 1,
 'visit': 1,
 'unsaf': 1,
 'thesharktank1': 1,
 'controvers': 1,
 'acc': 1,
 '//t.co/nyl2qqmwkzi': 1,
 'theholybreadc': 1,
 'wo': 1,
 'worry': 1,
 'imprimis310': 1,
 'nbc': 1,
 'bigot': 1,
 'sentedcruz': 1,
 'keemstarx': 1,
 'rac': 1,
 'control': 1,
 'terr': 1,
 'situ': 1,
 'forc': 1,
 'stop-': 1,
 'spirit': 1,
 'protect': 1,
 'u.s.our': 1,
 'breach': 1,
 'dai': 1,
 '//t.co/jegr6jsq5jthe': 1,
 'wid': 1,
 'hop': 1,
 'judg': 1,
 'honest': 1,
 'businessm': 1,
 'court': 1,
 'avoid': 1,
 'me.th': 1,
 'corrupt': 1,
 'seankess': 1,
 'bachel': 1,
 'degr': 1,
 'find': 1,
 'bring': 1,
 'newsmax_media': 1,
 'repmattsalmon': 1,
 "'did": 1,
 'lift': 1,
 'fing': 1,
 'help': 1,
 '//t.co/ia5pt3ikycthey': 1,
 'fin': 1,
 'thank': 1,
 'hap': 1,
 'real_mr_sciales': 1,
 'pretty': 1,
 'sav': 1,
 'thankscrazy': 1,
 'elect': 1,
 'ther': 1,
 'unfair': 1,
 'republ': 1,
 'breitbartnew': 1,
 'j_strong': 1,
 'admin': 1,
 'quiet': 1,
 'prep': 1,
 'id': 1,
 '//t.co/sioy6r3rechas': 1,
 'forgot': 1,
 'sit': 1,
 'lazy': 1,
 'usmc': 1,
 'held': 1,
 '150': 1,
 'day': 1,
 'freeourmarinew': 1,
 'got': 1,
 'disgust': 1,
 'easy': 1,
 'phon': 1,
 'outo': 1,
 'import': 1,
 'dead': 1,
 'diseas': 1,
 'inept.watch': 1,
 'fix': 1,
 'loophol': 1,
 'instead': 1,
 'sign': 1,
 'execut': 1,
 'amnesty.obama': 1,
 'spok': 1,
 'week': 1,
 'umc': 1,
 'sad': 1,
 '//t.co/ryy1nnsrdp': 1,
 'nro': 1,
 'andrewe_johnsonmexican': 1,
 'laughter—it': 1,
 'disbeliev': 1,
 'tariff': 1,
 'reimburs': 1,
 'taxpay': 1,
 'bordermexico': 1,
 'thousand': 1,
 'thru': 1,
 'door': 1,
 'bus': 1,
 'pass': 1,
 'by.usmc': 1,
 'sacr': 1,
 'welcom': 1,
 'lock': 1,
 'freeourmarineo': 1,
 'immedy': 1,
 'inflow': 1,
 'chargermike41': 1,
 'wtf': 1,
 'rest': 1,
 'bust': 1,
 'ass': 1,
 'wel': 1,
 'spent': 1,
 '1.295m': 1,
 'enrol': 1,
 'also': 1,
 '//t.co/ve85kbl3vt': 1,
 'surpr': 1,
 'tagii': 1,
 'mfinale1': 1,
 'explain': 1,
 'bho': 1,
 'rescu': 1,
 'desert': 1,
 'soldy': 1,
 'rot': 1,
 'cover-up': 1,
 'disclos': 1,
 '//t.co/h8whm3htvf': 1,
 'surprise.it': 1,
 'nic': 1,
 'commander-in-chief': 1,
 'concern': 1,
 'citizens.30,000': 1,
 'though': 1,
 'high': 1,
 'fav': 1,
 'dem': 1,
 '8:1': 1,
 '//t.co/zn4roifvza': 1,
 'wishgr': 1,
 'vdhanson': 1,
 'hypocrisy': 1,
 'evid': 1,
 'strict': 1,
 'policy': 1,
 'toward': 1,
 '//t.co/ofmzjkk6x7now': 1,
 'ban': 1,
 'term': 1,
 "'americans": 1,
 'press': 1,
 '2/3': 1,
 'pursu': 1,
 'interest': 1,
 '//t.co/vfias8bxlo': 1,
 'fac': 1,
 'grant': 1,
 'republican.major': 1,
 'boss': 1,
 'diego': 1,
 'arrest': 1,
 'weapon': 1,
 'provid': 1,
 '//t.co/rflwjbxy': 1,
 'sery': 1,
 'threatening': 1,
 'understand': 1,
 'along': 1,
 '//t.co/uaaiakdsobamacare': 1,
 'ins': 1,
 'yet': 1,
 'troop': 1,
 'healthc': 1,
 '//t.co/shquyovwcanada': 1,
 'plan': 1,
 'start': 1,
 'simpl': 1,
 'apply': 1,
 'fo…': 1,
 '//t.co/ahyajt5b': 1,
 'murd': 1,
 'buy': 1,
 'now.why': 1,
 'sel': 1,
 'put': 1,
 'semi-automatics': 1,
 'hand': 1,
 'doj': 1,
 'erod': 1,
 '2nd': 1,
 'amend': 1}
barcolors = []
for i in frequentwords:
    # could be:
    # if i == 'i' or i == 'have' or i == 'dream'
    # or could be:
    if i in ['kil','drug','illeg']:
        barcolors.append('red')
    else:
        barcolors.append('grey')
barcolors

['grey',
 'grey',
 'red',
 'grey',
 'grey',
 'grey',
 'grey',
 'grey',
 'grey',
 'red',
 'grey',
 'grey',
 'grey',
 'grey',
 'red',
 'grey',
 'grey',
 'grey',
 'grey',
 'grey']
plt.figure(figsize=(12,5))
plt.barh(frequentwords,frequentvals,color=barcolors)
<BarContainer object of 20 artists>

insert explanation

mig174_df = pd.read_csv('mig174.csv')
/opt/conda/lib/python3.9/site-packages/IPython/core/interactiveshell.py:3441: DtypeWarning: Columns (14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,40,43,49,52,60,61,62,63,64,65,66,340,341,342,343,346,347,349,350,351,352,355,356,359,360,361,362,365,366,369,370,371,372,375,376,379,380,381,382,385,386,389,390,391,392,395,396,399,400,401,402,405,406,409,410,411,412,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,485,486,487,488,491,492,493,494,499,502,503,505,506,507,508,516,517,518,519,520,521,522,523,524,525,526,527,528,530,531,532,552,553,554,555,559,560,561) have mixed types.Specify dtype option on import or set low_memory=False.
  exec(code_obj, self.user_global_ns, self.user_ns)
house174_df = pd.read_csv('house174.csv')
/opt/conda/lib/python3.9/site-packages/IPython/core/interactiveshell.py:3441: DtypeWarning: Columns (12,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,46,47,50,51,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,84,85,88,89,93,97,101,102,103,104,105,115,116,117,127,128,129,131,132,133,134,137,138,140,141,142,143,146,147,150,151,152,153,156,157,160,161,162,163,166,167,170,171,172,173,176,177,180,181,182,183,186,187,190,191,192,193,196,197,200,201,202,203,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,276,277,278,279,284,288,289,292,296,297,300,304,305,308,312,313,316,321,322,325,330,331,334,339,340,343,348,349,356,357,365,366,374,375,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,410,411,413,416,417,418,419,422,423,426,427,430,431,434,435,438,439,440,441,442,443,444,445,446,447,454,455,462,463,470,471,478,479,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547) have mixed types.Specify dtype option on import or set low_memory=False.
  exec(code_obj, self.user_global_ns, self.user_ns)
HOUSE174_df = house174_df[house174_df != 9999]
MIG174_df = mig174_df[mig174_df.age != 9999]
ax = MIG174_df["age"].plot(kind="box",figsize=(12,6))
ax.set_title('Box Plot of Age', fontsize = 14)
#ax.set_ylabel('age')
MIG174_df["age"].describe()
count    9049.000000
mean       46.511769
std        14.937821
min        17.000000
25%        35.000000
50%        44.000000
75%        57.000000
max        98.000000
Name: age, dtype: float64
a = MIG174_df.groupby('sex')['country'].count().plot(kind='bar',figsize=(12,6))
a.set_title('Sex Difference of Migrants',fontsize=14)
a.set_xlabel('Sex',fontsize=14)
a.set_ylabel('Migrant Count',fontsize=14)
plt.legend(['1: Male  2: Female'],fontsize=12)
<matplotlib.legend.Legend at 0x7f42a92fb850>

This bar graph is showing the sex difference on those that are migrating. Males are the ones mostly migrating and there has been research to explain why this is so.

HOUSE174_df = house174_df[house174_df != 9999]
MIG174_df.loc[MIG174_df['ldowage'] == ' ','ldowage'] = '0'
/opt/conda/lib/python3.9/site-packages/pandas/core/indexing.py:1817: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self._setitem_single_column(loc, value, pi)
MIG174_df.loc[MIG174_df['ldowage'] == ' ','ldowage']
Series([], Name: ldowage, dtype: object)
MIG174_df[['ldowage']] = MIG174_df[['ldowage']].astype(float)
/opt/conda/lib/python3.9/site-packages/pandas/core/frame.py:3641: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self[k1] = value[k2]
df3 = MIG174_df.loc[(MIG174_df['ldowage'] <100000) & (MIG174_df['ldowage']>=1000) & (MIG174_df['ldowage'] != 9999), 'ldowage']
a = df3.plot(kind='hist',bins=150,figsize=(12,6))
a.set_title('Income in Mexico BEFORE Migration',fontsize=14)
a.set_xlabel('Wages',fontsize=14)
a.set_ylabel('Immigrant Count',fontsize=14)
Text(0, 0.5, 'Immigrant Count')
MIG174_df.loc[MIG174_df['hhincome'] == ' ','hhincome'] = '0'
MIG174_df.loc[MIG174_df['hhincome'] == ' ','hhincome']
Series([], Name: hhincome, dtype: object)
MIG174_df[['hhincome']] = MIG174_df[['hhincome']].astype(float)
df4 = MIG174_df.loc[(MIG174_df['hhincome'] <100000) & (MIG174_df['hhincome']>=1000) & (MIG174_df['hhincome'] != 9999), 'hhincome']
a = df4.plot(kind='hist',bins=150,figsize=(12,6))
a.set_title('Income in U.S. AFTER Migration',fontsize=14)
a.set_xlabel('Wages',fontsize=14)
a.set_ylabel('Immigrant Count',fontsize=14)
Text(0, 0.5, 'Immigrant Count')
MIG174_df.loc[MIG174_df['age']<=19, 'age_group'] = '0-19'
MIG174_df.loc[MIG174_df['age'].between(20,29), 'age_group'] = '20-29'
MIG174_df.loc[MIG174_df['age'].between(30,39), 'age_group'] = '30-39'
MIG174_df.loc[MIG174_df['age'].between(40,49), 'age_group'] = '40-49'
MIG174_df.loc[MIG174_df['age'].between(50,59), 'age_group'] = '50-59'
MIG174_df.loc[MIG174_df['age'].between(60,69), 'age_group'] = '60-69'
MIG174_df.loc[MIG174_df['age'].between(70,79), 'age_group'] = '70-79'
MIG174_df.loc[MIG174_df['age'].between(80,89), 'age_group'] = '80-89'
MIG174_df.loc[MIG174_df['age'].between(90,99), 'age_group'] = '90-99'
/opt/conda/lib/python3.9/site-packages/pandas/core/indexing.py:1684: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self.obj[key] = infer_fill_value(value)
ax = MIG174_df.loc[MIG174_df['sex'] == 2].groupby('age_group')['sex'].count().plot(kind='bar', edgecolor = 'black', figsize=(12,6))
ax.set_title('Ages of Female Immigrants',fontsize=14)
ax.set_xlabel('Ages',fontsize=14)
ax.set_ylabel('Immigrant Count',fontsize=14)
Text(0, 0.5, 'Immigrant Count')
ax = MIG174_df.loc[MIG174_df['sex'] == 1].groupby('age_group')['sex'].count().plot(kind='bar', edgecolor = 'black', figsize=(12,6))
ax.set_title('Ages of Male Immigrants',fontsize=14)
ax.set_xlabel('Ages',fontsize=14)
ax.set_ylabel('Immigrant Count',fontsize=14)
Text(0, 0.5, 'Immigrant Count')
MIG174_df.loc[MIG174_df['hhincome']<=10000, 'income_group'] = '0-10000'
MIG174_df.loc[MIG174_df['hhincome'].between(10000,19999), 'income_group'] = '10000-19999'
MIG174_df.loc[MIG174_df['hhincome'].between(20000,29999),'income_group'] = '20000-29999'
MIG174_df.loc[MIG174_df['hhincome'].between(30000,39999), 'income_group'] = '30000-39999'
MIG174_df.loc[MIG174_df['hhincome'].between(40000,49999), 'income_group'] = '40000-49999'
MIG174_df.loc[MIG174_df['hhincome'].between(50000,59999), 'income_group'] = '50000-59999'
MIG174_df.loc[MIG174_df['hhincome'].between(60000,69999), 'income_group'] = '60000-69999'
MIG174_df.loc[MIG174_df['hhincome'].between(70000,79999), 'income_group'] = '70000-79999'
MIG174_df.loc[MIG174_df['hhincome'].between(80000,89999), 'income_group'] = '80000-89999'
MIG174_df.loc[MIG174_df['hhincome'].between(90000,100000), 'income_group'] = '90000-100000'
cx = MIG174_df.loc[MIG174_df['sex'] == 2].groupby('income_group')['sex'].count().plot(kind='barh', edgecolor = 'black', figsize=(12,6))
cx.set_title('Income of Female Immigrants AFTER Migration',fontsize=14)
cx.set_xlabel('Immigrant Count',fontsize=10)
#cx.set_ylabel('Immigrant Count',fontsize=14)
Text(0.5, 0, 'Immigrant Count')
ax = MIG174_df.loc[MIG174_df['sex'] == 1].groupby('income_group')['sex'].count().plot(kind='barh', edgecolor = 'black', figsize=(12,6))
ax.set_title('Income of Male Immigrants AFTER Migration',fontsize=14)
ax.set_xlabel('Immigrant Count',fontsize=10)
#ax.set_ylabel('Immigrant Count',fontsize=14)
Text(0.5, 0, 'Immigrant Count')
MIG174_df['income_diff'] = MIG174_df['hhincome'] - MIG174_df['ldowage']
/tmp/ipykernel_2105/597311161.py:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  MIG174_df['income_diff'] = MIG174_df['hhincome'] - MIG174_df['ldowage']
df5 = MIG174_df.loc[(MIG174_df['income_diff'] <50000) & (MIG174_df['income_diff']>=-25000) & (MIG174_df['income_diff'] != 9999) & (MIG174_df['income_diff'] != -9999), 'income_diff']
dx = df5.plot(kind='hist',figsize=(12,6),bins=150)
dx.set_title('Income Change After Immigration',fontsize=14)
print('Mean: ',MIG174_df.loc[(MIG174_df['income_diff'] <50000) & (MIG174_df['income_diff']>=-25000) & (MIG174_df['income_diff'] != 9999) & (MIG174_df['income_diff'] != -9999), 'income_diff'].mean())
print('Median: ',MIG174_df.loc[(MIG174_df['income_diff'] <50000) & (MIG174_df['income_diff']>=-25000) & (MIG174_df['income_diff'] != 9999) & (MIG174_df['income_diff'] != -9999), 'income_diff'].median())
#print('Mode: ',MIG174_df.loc[(MIG174_df['income_diff'] < 50000) & (MIG174_df['income_diff']>=-25000) & (MIG174_df['income_diff'] != 9999) & (MIG174_df['income_diff'] != -9999), 'income_diff'].mode())
Mean:  129.51943800133677
Median:  -100.0
MIG174_df.loc[MIG174_df['uswage1']<=100, 'wage_group'] = '0-100'
MIG174_df.loc[MIG174_df['uswage1'].between(101,499), 'wage_group'] = '101-499'
MIG174_df.loc[MIG174_df['uswage1'].between(500,999), 'wage_group'] = '500-999'
MIG174_df.loc[MIG174_df['uswage1'].between(1000,1999), 'wage_group'] = '1000-1999'
MIG174_df.loc[MIG174_df['uswage1'].between(2000,2999),'wage_group'] = '2000-2999'
MIG174_df.loc[MIG174_df['uswage1'].between(3000,3999), 'wage_group'] = '3000-3999'
MIG174_df.loc[MIG174_df['uswage1'].between(4000,4999), 'wage_group'] = '4000-4999'
MIG174_df.loc[MIG174_df['uswage1'].between(5000,5999), 'wage_group'] = '5000-5999'
MIG174_df.loc[MIG174_df['uswage1'].between(6000,6999), 'wage_group'] = '6000-6999'
MIG174_df.loc[MIG174_df['uswage1'].between(7000,7999), 'wage_group'] = '7000-7999'
MIG174_df.loc[MIG174_df['uswage1'].between(8000,8999), 'wage_group'] = '8000-8999'
MIG174_df.loc[MIG174_df['uswage1'].between(9000,9999), 'wage_group'] = '9000-9999'
MIG174_df.loc[MIG174_df['uswage1'].between(10000,19999), 'wage_group'] = '10000-19999'
MIG174_df.loc[MIG174_df['uswage1'].between(20000,29999), 'wage_group'] = '20000-29999'
MIG174_df.loc[MIG174_df['uswage1'].between(30000,39999), 'wage_group'] = '30000-39999'
MIG174_df.loc[MIG174_df['uswage1'].between(40000,49999), 'wage_group'] = '40000-49999'
MIG174_df.loc[MIG174_df['uswage1'].between(50000,59999), 'wage_group'] = '50000-59999'
MIG174_df.loc[MIG174_df['uswage1'].between(60000,69999), 'wage_group'] = '60000-69999'
MIG174_df.loc[MIG174_df['uswage1'].between(70000,79999), 'wage_group'] = '70000-79999'
MIG174_df.loc[MIG174_df['uswage1'].between(80000,89999), 'wage_group'] = '80000-89999'
MIG174_df.loc[MIG174_df['uswage1'].between(90000,100000), 'wage_group'] = '90000-100000'
wage_df = [MIG174_df['uswage1'], MIG174_df['uswagel'], MIG174_df['wage_group']]
headers = ['uswage1', 'uswagel','wage_group']
Wage_df = pd.concat(wage_df,axis = 1, keys= headers)
print(Wage_df)
      uswage1  uswagel wage_group
0      9999.0  9999.00  9000-9999
1         0.3     0.37      0-100
2         1.0     1.00      0-100
3         3.0     3.00      0-100
4      9999.0  9999.00  9000-9999
...       ...      ...        ...
9047      3.0     3.00      0-100
9048     70.0    70.00      0-100
9049     26.0    50.00      0-100
9050      8.0  9999.00      0-100
9051   9999.0     7.00  9000-9999

[9049 rows x 3 columns]
Wage_df.loc[(Wage_df['uswagel'] != 9999) & (Wage_df['uswagel'] != 8888) & (Wage_df['uswage1'] != 9999) & (Wage_df['uswage1'] != 8888), ['uswage1','uswagel','wage_group']]
uswage1 uswagel wage_group
1 0.30 0.37 0-100
2 1.00 1.00 0-100
3 3.00 3.00 0-100
6 2.25 6.00 0-100
7 0.80 2.50 0-100
... ... ... ...
9038 1.50 1.50 0-100
9043 50.00 80.00 0-100
9047 3.00 3.00 0-100
9048 70.00 70.00 0-100
9049 26.00 50.00 0-100

5071 rows × 3 columns

sns.lmplot(data=Wage_df, x="uswage1", y="uswagel",
           hue="wage_group");
plt.ylim(0,10000)
(0.0, 10000.0)