What is Trump yelling about?

Setup

In [1]:
import twitter
In [2]:
# Define your api_key/secret and access_token_key/secret here

api = twitter.Api(consumer_key=api_key,
                      consumer_secret=api_secret,
                      access_token_key=access_token_key,
                      access_token_secret=access_token_secret)
In [3]:
api.VerifyCredentials()
Out[3]:
User(ID=1961548171, ScreenName=kmarwahaha)

Scrape last ~3200 tweets

In [4]:
def get_statuses(prev_statuses = None, screen_name = "realDonaldTrump", count=200):
    max_id = prev_statuses[-1].id-1 if prev_statuses else None
    return api.GetUserTimeline(screen_name=screen_name, max_id=max_id, count=count)
In [5]:
n = 16
temp = get_statuses()
all_statuses = temp
for _ in range(n):
    temp = get_statuses(temp)
    all_statuses += temp
In [6]:
# Earliest tweet scraped
all_statuses[-1]
Out[6]:
Status(ID=888478670502932480, ScreenName=realDonaldTrump, Created=Fri Jul 21 19:19:56 +0000 2017, Text='Manufacturers’ record-high optimism reported in the 1st qtr has carried into the 2nd qtr of 2017 via @ShopFloorNAM:… https://t.co/G6QSAqjUeY')

Parse date

In [7]:
#https://stackoverflow.com/questions/3682748/converting-unix-timestamp-string-to-readable-date-in-python
import datetime
def readable_date(unix_time):
    return datetime.datetime.fromtimestamp(int(unix_time)).strftime('%Y.%m.%d')
In [8]:
text_and_date = [(status.text, readable_date(status.created_at_in_seconds)) for status in all_statuses]
In [9]:
# Most recent tweet
text_and_date[0]
Out[9]:
('Congratulations to Josh Hawley on your big Senate Primary win in Missouri. I look forward to working with you towar… https://t.co/gGWY572ROS',
 '2018.08.07')

Analyze

In [10]:
def trim_results(text_and_date, filterx):
    return list(filter(
        lambda y: len(y[1]) > 0,
        [(date, 
            " ".join(filter(filterx, 
                            map(lambda x: x.replace('-', ' ').replace(u'\u2026', '').strip(), 
                                text.strip().split())
            ))
        ) for (text, date) in text_and_date]
    ))

Approach 1: Find words that are uppercase, capitalized, hashtag'd, or end in "!"

In [11]:
filter1 = lambda x: x != u'&' and (len(x) > 0 and x[0].upper() == x[0] 
                   or x.upper() == x or u'#' == x[0] or u'!' == x[-1])
In [12]:
trimmed1 = trim_results(text_and_date, filter1)
In [13]:
trimmed1[:20]
Out[13]:
[('2018.08.07', 'Congratulations Josh Hawley Senate Primary Missouri. I'),
 ('2018.08.07',
  'Congratulations Bill Schuette. You Big November Governor Great St'),
 ('2018.08.07',
  'Congratulations STAR Republican Party, Senator John James. A'),
 ('2018.08.07', '.....Congratulations Troy Balderson Ohio. A race!'),
 ('2018.08.07', 'When I Ohio Troy Balderson, 64 36. That After'),
 ('2018.08.07', 'Today, 236th Purple Heart, Armed Forces'),
 ('2018.08.07',
  'RT @EricTrump: Ohio today! We Troy Balderson Congress. Visit'),
 ('2018.08.07', 'Ohio, Troy Balderson Congress. His Nancy Pelosi, Crime, B'),
 ('2018.08.07', 'The Iran These November'),
 ('2018.08.06', 'California'),
 ('2018.08.06', 'Democrats Open Borders ICE, Country'),
 ('2018.08.06', 'RT @realDonaldTrump: Presidential Approval  Better'),
 ('2018.08.06', 'John James Republican Star Senate Michigan. If'),
 ('2018.08.06', 'Governor Jerry Brown Free Flow North'),
 ('2018.08.06', 'Kris Kobach, Governor Great State Kansas. He'),
 ('2018.08.06', 'Great Economy'),
 ('2018.08.06', '....a Kremlin Donald Trump. Collusion R'),
 ('2018.08.06', '“Collusion Russia Hillary Clinton 100% Russians, Adam'),
 ('2018.08.05',
  'RT @realDonaldTrump: ...Danny O’Connor Nancy Pelosi Maxine Waters – Danny'),
 ('2018.08.05',
  'RT @realDonaldTrump: A Ohio’s 12th Congressional District Troy Balderson! Troy Ohio, O')]

Hmm, this isn't that insightful. Let's see what he's really yelling about.

Approach 2: Just look for YELLING

In [14]:
#https://stackoverflow.com/questions/1265665/python-check-if-a-string-represents-an-int-without-using-try-except
def RepresentsInt(s):
    try: 
        int(s)
        return True
    except ValueError:
        return False
def IsASCII(u):
    try: 
        u.encode()
        return True
    except UnicodeEncodeError:
        return False
In [15]:
filter2 = lambda x: x.upper() == x and not RepresentsInt(x) and u'-' != x and x != u'RT' and len(x) > 3 and IsASCII(x)
In [16]:
trimmed2 = trim_results(text_and_date, filter2)
In [17]:
trimmed2[:20]
Out[17]:
[('2018.08.07', 'STAR'),
 ('2018.08.06', 'ICE,'),
 ('2018.08.06', '100%'),
 ('2018.08.05', 'U.S.,'),
 ('2018.08.05', 'TRUE.'),
 ('2018.08.04', 'P.R.'),
 ('2018.08.04', 'U.S.,'),
 ('2018.08.04', 'HAPPY BIRTHDAY @USCG!'),
 ('2018.08.03', '@WWE'),
 ('2018.08.03', '@DRUDGE_REPORT:'),
 ('2018.08.03', '@DRUDGE_REPORT: +37,000...'),
 ('2018.08.03', '@DRUDGE_REPORT: RECORD 155,965,000 EMPLOYED'),
 ('2018.08.03', '@DRUDGE_REPORT:'),
 ('2018.08.03', '219,000 185,000 ADP”'),
 ('2018.08.03', '✅”US'),
 ('2018.08.03', '[email protected]'),
 ('2018.08.03', '“THE RUSSIA HOAX, ILLICIT SCHEME CLEAR HILLARY CLINTON'),
 ('2018.08.03', 'MAKE AMERICA GREAT AGAIN!'),
 ('2018.08.03', '500,000'),
 ('2018.08.03', 'NASA,')]

That's a bit better.

What's his yelling vocabulary like?

In [18]:
from collections import Counter
In [19]:
trump_yelling = Counter([x[1] for x in trimmed2])
In [20]:
[i for i in trump_yelling.most_common() if i[1] > 2]
Out[20]:
[('U.S.', 76),
 ('#MAGA', 21),
 ('GREAT', 19),
 ('DACA', 19),
 ('MAKE AMERICA GREAT AGAIN!', 13),
 ('@FLOTUS', 12),
 ('NATO', 11),
 ('MAKING AMERICA GREAT AGAIN!', 10),
 ('MS 13', 10),
 ('DACA.', 10),
 ('@POTUS', 9),
 ('A.G.', 7),
 ('🇺🇸🇺🇸🇺🇸', 7),
 ('U.S.,', 6),
 ('[email protected]', 6),
 ('FISA', 6),
 ('2018,', 6),
 ('ISIS', 6),
 ('FEMA', 6),
 ('#UNGA', 6),
 ('ICE,', 5),
 ('FBI.', 5),
 ('CUTS', 5),
 ('@FLOTUS:', 5),
 ('THANK', 5),
 ('D.C.', 5),
 ('2017,', 5),
 ('NEVER', 5),
 ('100%', 4),
 ('VERY', 4),
 ('JOBS, JOBS, JOBS!', 4),
 ('OPEC', 4),
 ('U.S.A.', 4),
 ('CNN.', 4),
 ('@FEMA', 4),
 ('ZERO', 4),
 ('T.V.', 4),
 ('HAPPY BIRTHDAY', 4),
 ('15 0', 4),
 ('#USA🇺🇸', 4),
 ('#SCOTUS', 3),
 ('AMERICA OPEN BUSINESS!', 3),
 ('VOTE', 3),
 ('WITCH HUNT!', 3),
 ('HEROES', 3),
 ('D.C.,', 3),
 ('LIVE #MAGA', 3),
 ('[email protected]', 3),
 ('50%,', 3),
 ('ISIS,', 3),
 ('BORDER WALL', 3),
 ('#WEF18', 3),
 ('V.A.', 3)]

Makes sense. His whole YELLING vocab is below.

In [21]:
sorted(trump_yelling.keys())
Out[21]:
['"20,000📈21,000📈22,000📈 #MAGA',
 '"46%',
 '"@POTUS',
 '"DEPLORABLES."',
 '"NO"',
 '#AMERICA FIRST',
 '#AMERICA FIRST!',
 '#APEC',
 '#APEC2017',
 '#APEC2017 @FLOTUS',
 '#ASEAN50 FAIR TRADE DEALS,',
 '#AZ08.',
 '#BYE BYE',
 '#CHANGETHELAWS',
 '#FAKE NEWS!',
 '#FEMA',
 '#GES2017',
 '#GES2017.',
 '#HELSINKI2018',
 '#ISIS',
 '#LESM',
 '#MAGA',
 '#MAGA @CPAC',
 '#MAGA WINNING,',
 '#MAGA!',
 '#MAGA🇺🇸',
 '#MS13 #MS13',
 '#NATO2018!',
 '#NATOS',
 '#S2155,',
 '#SCOTUS',
 '#SOTU',
 '#UNGA',
 '#USA',
 '#USAF B 1B',
 '#USA🇺🇸',
 '#USMC242',
 '#USVI.',
 '#USVI. @FEMA',
 '#WEF18',
 '$1.4',
 '$1.6',
 '$1.6 $700',
 '$1.6B U.S.A.',
 '$1.7 CASH',
 '$16.3+ 9.2%',
 '$20,000,000',
 '$500 DOWN,',
 '$700 $716',
 '$700,000',
 '$729M',
 '$800',
 '$972,000 GPS. $12,400,000 DNC.',
 "'16. C.M.",
 "'18.",
 '(#HR873.)',
 '($700,000)',
 '(110',
 '(5 10',
 '(@FLOTUS.)',
 '(AAA).',
 '(D VA),',
 '(D.C.) 4:00 P.M.',
 '(DACA)',
 '(DMD),',
 '(H.R. 2142)',
 '(HMX 1)',
 '(SEAL)',
 '(U.S.',
 '(USA)',
 '*NOT*',
 '.....',
 '.....I',
 '....8 U.S.',
 '[email protected]',
 '....“$17',
 '...9',
 '...I',
 '...NFL DOWN. U.S.',
 '...U.S.A.',
 '[email protected] FLAG, ANTHEM, COUNTRY.',
 '[email protected]',
 '[email protected]',
 '[email protected]:',
 '[email protected]',
 '[email protected] #FOSTA #SESTA',
 '[email protected] #TRUMP🇺🇸 @FLOTUS🌺 HOPELESS...YOU HOPE! INSPIRE ALL! #MAGA #USA',
 '[email protected] #USA',
 '[email protected] @FLOTUS',
 '[email protected] @FLOTUS @LVMPD',
 '[email protected] @FLOTUS @UMCSN',
 '[email protected] U.S.',
 '[email protected]:',
 '[email protected]’',
 '[email protected]',
 '[email protected]',
 '1/2%.',
 '1/20 35,000 ISIS 17,500',
 '10,000',
 '100%',
 '100,000 MIGHT SECOND',
 '10:00',
 '10:00 A.M.',
 '10:00 A.M. ENJOY!',
 '10:00.',
 '116%',
 '11:00 A.M.',
 '11:30 A.M.',
 '12,000 10,000',
 '15 0',
 '15%.',
 '15,000',
 '18,589 2016, 25,075',
 '19,000 RESPECTING',
 '1944,',
 '1960, 20,000 185,000',
 '1969”',
 '1973.',
 '1:00 P.M.',
 '2,000',
 '2,000,000',
 '2,500',
 '20,295 @POTUS',
 '200%',
 '2000"',
 '2000....A',
 '2000”',
 '2004"',
 '2008”',
 '2014,',
 '2016/2017',
 '2017,',
 '2017.',
 '2018!',
 '2018,',
 '2018. #MAGA',
 '2020.',
 '2020?',
 '219,000 185,000 ADP”',
 '22,000 18,000',
 '223,000',
 '227 205.',
 '23,000',
 '24,000',
 '24/7 CNN, ABC, NBC, CBS, NYTIMES WAPO,',
 '25%, U.S.',
 '25,000',
 '25,000.',
 '2:00 A.M.',
 '3.9%',
 '3/4:',
 '300,000',
 '31,174',
 '33,000',
 '33,000 $145,000,000',
 '3:00 P.M. N.J.',
 '3:30 P.M.',
 '4.1%,',
 '4.1%, $5.4',
 '4.1%. 2.6%,',
 '4/9/18,',
 '400,000 GREAT WOMEN D.C.',
 '45%,',
 '45.6',
 '49%,',
 '50%,',
 '50,000',
 '500,000',
 '55,000 6,000,000',
 '59%,',
 '6.8%,',
 '60...',
 '69 30,',
 '6:00 A.M.',
 '6:15 A.M. NOW!',
 '7:00 P.M.',
 '7:00 P.M. #MAGA🇺🇸',
 '7:15.',
 '7:45',
 '8:18 A.M.',
 '8:30',
 '8:30.',
 '9,000',
 '93 5 5/31/99.',
 '95.1%',
 '9:00 A.M.',
 '9:00 P.M.',
 '@ABC',
 '@ABC @CNN.',
 '@ABC:',
 '@CBS',
 '@CIA!',
 '@CNBC',
 '@CNN',
 '@CNN @MSNBC',
 '@CNN @NBC.',
 '@CNN!',
 '@CNN, FAKE,',
 '@CNN.',
 '@DRUDGE_REPORT:',
 '@DRUDGE_REPORT: +37,000...',
 '@DRUDGE_REPORT: RECORD 155,965,000 EMPLOYED',
 '@FEMA',
 '@FEMA,',
 '@FLOTUS',
 '@FLOTUS @JBA_NAFW.',
 '@FLOTUS THANK',
 '@FLOTUS THANK GREAT WORK!',
 '@FLOTUS 🇺🇸🇺🇸🇺🇸',
 '@FLOTUS!',
 '@FLOTUS:',
 '@FLOTUS: @JBA_NAFW',
 '@GOP #MAGA 🇺🇸🇺🇸🇺🇸',
 '@GOP:',
 '@GOP: [email protected]:',
 '@JBA_NAFW HISTORIC CUTS',
 '@JPN_PMO',
 '@LOUDOBBS TRUE!',
 '@NASA',
 '@NASCAR',
 '@NFIB:',
 '@NRA.',
 '@NVGOP! #MAGA',
 '@POT',
 '@POTUS',
 '@POTUS #MAGA',
 '@POTUS 863,000',
 '@POTUS @FLOTUS @MELANIATRUMP',
 '@POTUS @FLOTUS @USCG',
 '@POTUS @GES2017.',
 '@POTUS POTUS',
 '@POTUS THANK',
 '@POTUS U.S. #DPRK',
 "@POTUS'",
 "@POTUS' #MAGA",
 '@POTUS.',
 '@TBN.',
 '@UN...',
 '@USCG 24/7/365. THANK',
 '@USCG,',
 '@USCIS U.S.',
 '@USUN GREAT #USA🇺🇸',
 '@VFWHQ',
 '@VP:',
 '@VP: [email protected]',
 '@VP: @POTUS',
 '@VP: TRUMP CUTS,',
 '@VSPPIO',
 '@WEF!',
 '@WSJ @CFPB',
 '@WWE',
 'A.G.',
 'A.G. 33,000',
 'A.G. FISA',
 'A.G.,',
 'A.P.',
 'ABC, NBC,',
 'ADDITIONAL',
 'AGENDA,',
 'ALL TIME',
 'ALL TIME RECORD OPTIMISM!',
 'ALWAYS',
 'AMERICA AMERICA DETERMINED',
 "AMERICA DON'T WORSHIP GOVERNMENT WORSHIP",
 'AMERICA FIRST!',
 'AMERICA NATION',
 'AMERICA OPEN BUSINESS!',
 'AMERICA!',
 'AMERICA, AMERICAN AMERICA',
 'AMERICAN CITIZENS FIRST!',
 'AMERICAN PEOPLE FIRST!',
 'AMERICAN SAILOR BEST',
 'AMERICAN VICTIMS ILLEGAL IMMIGRATION.',
 'AMERICANS FIRST.',
 'AMVETS',
 'ANARCHY',
 'ANGER UNITY $12,000,000?),....',
 'ASAP EVER',
 'ASAP.',
 'AUSTIN BOMBING SUSPECT DEAD.',
 'AWOL',
 'BACK! BILLIONS',
 'BADLY DACA',
 'BAILOUTS BAILOUTS',
 'BASE',
 'BEAT',
 'BEFORE',
 'BENCH',
 'BEST MAKE AMERICA GREAT AGAIN',
 'BETTER',
 'BEWARE!',
 'BILLION',
 'BILLION DOLLARS',
 'BILLION U.S.A., BILL',
 'BOOK MUST READ!',
 'BOOM!',
 'BOOM!!',
 'BOOMING',
 'BOOMING,',
 'BORDER WALL',
 'BOYCOTT YOU! #NFL #MAGA',
 'BRAVE ONCE MORE',
 'BREAKING:',
 'BUILD WALL,',
 'BUST.',
 'CFPB,',
 'CFPB.',
 'CHAIN MIGRATION',
 'CHANGE LAWS!',
 'CHAOS',
 'CHEMICAL',
 'CHIP',
 'CIA!',
 'CIA,',
 'CIA.',
 'CLASSIFIED',
 'CNN,',
 'CNN, ABC, CBS?',
 'CNN.',
 'CNN’S CNN, MOST TRUSTED NAME NEWS.',
 'CNN” CNN.',
 'COLDEST',
 'COLLUSION',
 'COLLUSION OBSTRUCTION.',
 'COLLUSION!',
 'COMMANDER IN CHIEF’S TROPHY!',
 'CONGRATULATIONS U.S. GOLD!',
 'CONGRATULATIONS!',
 'COSTLY',
 'COUNTRY, COMMUNITIES, GREAT AMERICAN WORKERS!',
 'CPAC',
 'CPAC STRAW POLL RESULTS: APPROVE PRESIDENT TRUMP DOING',
 'CRAZY!',
 'CUTS',
 'CUTS JOBS ACT!',
 'CUTS JOBS ACT:',
 'CUTS REFORM!',
 'CUTS U.S.',
 'CUTS,',
 'CUTS, MILLION',
 'D.C.',
 'D.C. @POTUS',
 'D.C. THAT GREAT STATE',
 'D.C.,',
 'DACA',
 'DACA DACA',
 'DACA STRONG WALL',
 'DACA WALL',
 'DACA!',
 'DACA! DACA',
 'DACA)',
 'DACA,',
 'DACA.',
 'DACA.”',
 'DACA: DACA',
 'DEAD',
 'DEATH PENALTY!',
 'DELIVER',
 'DEMS!',
 'DHS, @CBP,',
 'DIGENOVA, U.S.',
 'DNC.',
 'DOJ,',
 'DON’T HAVE STEEL, DON’T HAVE COUNTRY!',
 'DOW, NASDAQ #MAGA',
 'DOWN',
 'DOWN.',
 'DREAMERS INNOVATORS',
 'E.U. U.S.',
 'ENFORCE PROTECT SUPPORT #LESM',
 'EPA.',
 'ESPN',
 'ESPN RECORD',
 'EVER @POTUS',
 'EVER WSJ.',
 'EVER, S.C.:',
 'EVERY SINGLE AFTER,',
 'EVERYONE',
 'EVIDENCE COLLUSION....I',
 'F 35 U.S.',
 'FACE',
 'FAIR FAMILIES STAY AMERICA, GROW AMERI',
 'FAIR STAY GROW',
 'FAIR TRADE!',
 'FAKE',
 'FAKE NEWS',
 'FAKE NEWS!',
 'FAKE!',
 'FANTASTIC USA!',
 'FAST',
 'FBI)',
 'FBI,',
 'FBI.',
 'FEMA',
 'FEMA GREAT',
 'FEMA,',
 'FEMA, P.R.',
 'FEMA.',
 'FIFTH 2017! #DOW24K #MAGA',
 'FILES',
 'FINDINGS:',
 'FIRED,',
 'FISA',
 'FLAG GREAT COUNTRY!',
 'FLORIDA',
 'FLORIDA EVERY SINGLE AFTER,',
 'FLOTUS POTUS HEROES',
 'FOUNDERS FREEDOM FREEDOM GIFT GOD.',
 'FREEDOM',
 'FRONT PAGE',
 'FUTURE',
 'GOAL U.S.',
 'GOOD',
 'GOODLATTE',
 'GOP”',
 'GPS,',
 'GRATEFUL NATION, THANK (HEROES)',
 'GREAT',
 'GREAT (3.0',
 'GREAT 100%! "ISIS CJTF–OIR',
 'GREAT AMERICAN FLAG.',
 'GREAT BLESS TEXAS BLESS USA🇺🇸',
 'GREAT CUTS!',
 'GREAT EVENING',
 'GREAT HONOR BRAVE HEROES @USMC THANK',
 'GREAT MILITARY.',
 'GREAT NATION! #USA🇺🇸',
 'GREAT NYPD,',
 'GREAT U.S.',
 'GREAT U.S. FEMA',
 'GREAT VETERANS',
 'GREAT VETS,',
 'GREAT VETS.',
 'GREAT!',
 'GREAT. WINNING AGAIN!',
 'GUILT SOMETHING!',
 'H.R. 267,',
 'HANDED',
 'HAPPY 100TH BIRTHDAY',
 'HAPPY BIRTHDAY',
 'HAPPY BIRTHDAY @USCG!',
 'HAPPY EASTER!',
 'HAPPY THANKSGIVING!',
 'HAPPY THANKSGIVING, EVER,',
 'HAPPY YEAR! MAKING AMERICA GREAT AGAIN,',
 'HATE',
 'HAVE GREAT LIFE!',
 'HEARS YOUR VOICE YOUR BACK.',
 'HERO',
 'HEROES',
 'HEROES.',
 'HISTORIC',
 'HISTORIC $15,000,000,000',
 'HISTORIC CUTS',
 'HISTORIC RELIEF',
 'HISTORY EVER',
 'HISTORY.',
 'HOME.',
 'HONOR MEDAL VALOR',
 'HOUSE INTELLIGENCE COMMITTEE HAS, AFTER MONTH LONG IN DEPTH INVESTIGATION, FOUND EVIDENCE COLLUSION',
 'HOUSE REPUBLICANS SHOULD PASS STRONG FAIR IMMIGRATION BILL, KNOWN GOODLATTE THEIR AFTERNOON VOTE',
 'I.T.',
 'ICE,',
 'ICE.',
 'IDEA.',
 'IMMEDIATELY',
 'IMPROVE INCREASE LOWER COSTS HEALTHCARE!',
 'INCREDIBLE U.S. 🇺🇸🇰🇷',
 'INSANE IMMIGRATION LAWS NOW!',
 'INTELLIGENCE LEAK A.G.',
 'ISIS',
 'ISIS .....',
 'ISIS ISIS 26,000 13,200',
 'ISIS SHOULD DEATH PENALTY!',
 'ISIS,',
 'JINPING',
 'JINPING JONG',
 'JOBS!',
 'JOBS! E.U. U.S. STOP!',
 'JOBS, JOBS, JOBS',
 'JOBS, JOBS, JOBS!',
 'JOBS, JOBS, JOBS! #MAGA',
 'JUST OUT: 3.9% WITCH HUNT!',
 'KKK,',
 'KOREAN END! GREAT',
 'KORUS!',
 'L.G.',
 'LAST',
 'LAYER',
 'LEAKER LIAR.',
 'LEAKS A.G.',
 'LEAKS NEWS',
 'LEFT',
 'LIED! LIED! LIED!',
 'LIVE',
 'LIVE #MAGA',
 'LIVE #USA🇺🇸',
 'LOST',
 'LOVE',
 'LOVE ALL!',
 'LOVE VEGAS!',
 'LOWER RIPOFF DRUG PRICES!',
 'LOWEST RATE EVER RECORDED!',
 'MAGA',
 'MAGA!',
 'MAGA.',
 'MAGNIFICENT',
 'MAKE AMERICA',
 'MAKE AMERICA GREAT AGAIN',
 'MAKE AMERICA GREAT AGAIN #MAGA🇺🇸',
 'MAKE AMERICA GREAT AGAIN RALLY!',
 'MAKE AMERICA GREAT AGAIN!',
 'MAKE CHANGE!',
 'MAKING AMERICA GREAT AGAIN!',
 'MAKING AMERICA SAFE GREAT AGAIN! #MAGA',
 'MANY TIMES.”',
 'MANY TIMES”',
 'MASSIVE',
 'MASSIVE WALL!',
 'MASTERS',
 'MATCH BLESSINGS',
 'MEETING,',
 'MERIT BASED',
 'MERRY CHRISTMAS!!',
 'MERRY CHRISTMAS!!!',
 'MILLION',
 'MISSION',
 'MORE',
 'MOST DISHONEST CORRUPT MEDIA AWARDS YEAR 5:00',
 'MS 13',
 'MS 13 ASAP!',
 'MS 13 GANGS ICE!',
 'MS 13 MAKE AMERICA SAFE AGAIN!',
 'MS 13!',
 'MS 13.',
 'MSNBC',
 'MUCH',
 'MUCH CNN, U.S.,',
 'MUST MAKE AMERICA GREAT AGAIN!',
 'N.J.,',
 'N.K.',
 'N.Y.',
 'NAFTA',
 'NAFTA,',
 'NASA,',
 'NASCAR',
 'NASCAR 500.',
 'NATION',
 'NATION, GREAT AMERICAN WORKERS!',
 'NATIONAL PUBLIC HEALTH EMERGENCY',
 'NATO',
 'NATO MORE, LESS.',
 'NATO!',
 'NATO,',
 'NATO, MUCH GDP.',
 'NATO.',
 'NATO. U.S.',
 'NCAA',
 'NEVER',
 'NEVER HEROES',
 'NEVER NOW.',
 'NEVER U.S.',
 'NEVER, EVER THREATEN UNITED STATES AGAIN WILL SUFFER CONSEQUENCES LIKE',
 'NEWS',
 'NEWS ALERT:',
 'NEWS ALERT: U.S.',
 'NEWS EXCLUSIVE:',
 'NEWS MANY',
 'NFL!',
 'NORTHCOM SOUTHCOM.',
 'NOT!',
 'NOTHING',
 'NOTHING,',
 'NOW!',
 'NOW! JOKE!',
 'NRA!',
 'NRA,',
 'NYC, U.S.A.!',
 'NYC.',
 'OPEC',
 'OPEN BUSINESS U.S.',
 'OPIOID CRISIS:',
 'OTHER',
 'OWNED',
 'P.M.',
 'P.M.,',
 'P.R.',
 'PARDON',
 'PATRIOT ☑️LOVE',
 'PEOPLE',
 'PEOPLE BELIEVE MAJOR NATIONAL NEWS ORGS FABRICATE STORIES ABOUT FAKE NEWS,',
 'POLITICO',
 "POTUS' 9/29/17",
 "POTUS' ☑️NASDAQ",
 'PROBABLY',
 'PROMISES KEPT!',
 'PROSPERITY, OPPORTUNITY, DOMINANCE,',
 'PROTECT COMRADES,',
 'PROUD',
 'PROUD FARMING LEGACY.',
 'PROUDLY',
 'READ:',
 'REAL PRIDE COUNTRY #USA🇺🇸',
 'REALLY DON’T CARE,',
 'REBUILD',
 'RECORD HIGH 500!',
 'RECORD HIGHS!',
 'REFUS',
 'REGISTER. P.O.',
 'RELATED',
 'REMEMBER PEARL',
 'REPORT BOMBSHELL:',
 'REPUBLICAN LEADERSHIP, WINNING AGAIN RESPECTED',
 'REQUESTED',
 'RESIST.',
 'RESPECT',
 'REST PEACE BILLY GRAHAM!',
 'RESTORE AMERICAN PROSPERITY RECLAIM AMERICA’S DESTINY.',
 'RICK SACCONE,',
 'RIGGED H....',
 'RIGHT DODD FRANK.',
 'RIGHT TIME. TOGETHER',
 'RISES POINTS YEAR FIRST TIME EVER MAKE AMERICA GREAT AGAIN!',
 'RUSH LIMBAUGH',
 'S.C., MS 13',
 'SAFE SAFE',
 'SAFE!',
 'SECOND AMENDMENT WILL NEVER REPEALED!',
 'SECRETLY',
 'SECURITY BASED! AMERICA SAFE',
 'SHUTDOWN',
 'SICK!',
 'SNL,',
 'SOVEREIGN INDEPENDENT',
 'SPECTACULAR!',
 'SPIRIT HEREOS',
 'SPYGATE',
 'SPYING',
 'STAND',
 'STAND COUNTRY',
 'STAR',
 'STEEL BACK VERY',
 'STOP',
 'STRONGER',
 'SUPREME COURT UPHOLDS TRUMP TRAVEL BAN.',
 'T.V.',
 'TAPE!',
 'TAXES AMERICA FIRST. WORKERS, COMMUNIT',
 'TEAMWORK!',
 'TERMINATE',
 'TEXAS: EVERY SINGLE AFTER,',
 'TEXTS BOMBSHELLS!',
 'THANK',
 'THANK 24/7/365',
 'THANK @NFIB! #NFIB75',
 'THANK ASIA! #USA🇺🇸',
 'THANK GREA',
 'THANK GREAT',
 'THANK HEROES',
 'THANK INSPIRE',
 'THANK MAKING AMERICA GREAT AGAIN!',
 'THANK RULE LAW! LESS SAFE!',
 'THANK U.S.',
 'THANK YOU!',
 'THANKS."',
 'THEY LOSE FORTUNE,',
 'TOGETHER, #MAGA🇺🇸',
 'TONIGHT',
 'TONIGHT:',
 'TOTAL BOMB',
 'TOTAL HOAX.',
 'TOTAL WITCH HUNT!!!',
 'TOTALLY UNTRUE',
 'TPP,',
 'TRADE',
 'TREMENDOUS',
 'TRILLION',
 'TRUE.',
 'TRUMP!!',
 'TRUST.',
 'TUNE',
 'TUNE TONIGHT',
 'U.N.',
 'U.S.',
 'U.S. #FEMA GREAT',
 'U.S. #GES2017',
 'U.S. #USA🇺🇸',
 'U.S. $1.50',
 'U.S. 15,000',
 'U.S. 1973.',
 'U.S. 2002. 2004.',
 'U.S. 2004”',
 'U.S. 2015: 2016: 2017: 2018:',
 'U.S. 209,000 4.3%',
 'U.S. 270%',
 'U.S. 9:00 A.M.',
 'U.S. C 130',
 'U.S. CEO,',
 'U.S. CNN!',
 'U.S. COAL PRODUCTION',
 'U.S. CRAZY!',
 'U.S. FEMA',
 'U.S. JOBS',
 'U.S. LOWER PRICES!',
 'U.S. MARKETS FROM ELECTION 11/8/2016}',
 'U.S. STRONG',
 'U.S. U.S. NATO,',
 'U.S. WEAK WEAK',
 'U.S. WIN!',
 'U.S. [@USCG]',
 'U.S.,',
 'U.S.A.',
 'U.S.A. BEST',
 'U.S.A.,',
 'UCLA',
 'UNCONSTITUTIONAL!',
 'UNITY',
 'UNNECESSARY',
 'USA!',
 'USA,',
 'V.A.',
 'VERY',
 'VERY DANGEROUS SOUTHERN BORDER, WALL',
 'VERY EXPENSIVE',
 'VETO 800,000 DACA',
 'VIDEO: @FEMA #USVI',
 'VOTE',
 'W.H.',
 'WALL!',
 'WALL,',
 'WALL.',
 'WATCH LIVE: WBZ)',
 'WEAK',
 'WEEKLY ADDRESS🇺🇸',
 'WELCOME HOME JOSH!',
 'WELCOME HOME!',
 'WHY? #MAGA!',
 'WILL PROTECT SOUTHERN BORDER!',
 'WIN!',
 "WIN. IT'S TIME!",
 'WINNING!',
 'WITCH HUNT',
 'WITCH HUNT!',
 'WITH FLORIDA! 1 800 342 3557 1 800 FL HELP 1',
 'WOMEN BLUE.',
 'WONDERFUL MAGNIFICENT',
 'WORKERS FAMILIES',
 'WORKING TOGETHER,',
 'WORST',
 'WOUNDED WARRIORS',
 'WOW!',
 'WOW, CANNOT',
 'YEAR LONG.',
 'YOU!',
 "YOU'RE FIRED.",
 'YOU:',
 'ZERO',
 'ZTE,',
 'ZTE, U.S.',
 '“1000',
 '“90%',
 '“ABC',
 '“ANTI TRUMP AGENT CLINTON EMAIL PROBE”',
 '“BET',
 '“FBI',
 '“FBI STOP ELECTI',
 '“FX” @FLOTUS THANK GREAT',
 '“GOP',
 '“ICE $43M',
 '“MS 13',
 '“OBAMA KEPT THEM CAGES, WRAPPED THEM FOIL”',
 '“OUT,”',
 '“SHADOW BANNING”',
 '“SPIED TRUMP CAMPAIGN WITH EMBEDDED INFORMANT.”',
 '“SPYGATE.”',
 '“THE RUSSIA HOAX, ILLICIT SCHEME CLEAR HILLARY CLINTON',
 '“U.S.',
 '“WHAT HAPPENED” KNOW!',
 '“WHERE WORLD BARACK OBAMA?”',
 '”DEPLORABLES” MASSIVE (304 227)',
 '✅”US',
 'ありがとうございます',
 'トランプ大統領による、初の、歴史的な日本訪問は、間違いなく、日米同盟の揺るぎない絆を世界に示すことができました。 本当にありがとう、ドナルド。そして、アジア歴訪の大成功をお祈りしています。',
 'フロリダに到着し、早速トランプ大統領との首脳会談に臨みました。今日は、大半を北朝鮮問題に費やし、非常に重要な点で認識を一致させることができました。 「日本のために最善となるようベストを尽くす」 トランプ大統領は、来る米朝首脳会談で拉致問題を取り上げ',
 '🇺🇸🇬🇧',
 '🇺🇸🇮🇹',
 '🇺🇸🇰🇷#UNGA',
 '🇺🇸🇵🇷',
 '🇺🇸🇺🇸🇺🇸',
 '🔥@TPUSA']

Saving and cleanup

In [22]:
%store all_statuses > all_statuses.txt
%store text_and_date > text_and_date.txt
%store trimmed1 > trimmed1.txt
%store trimmed2 > trimmed2.txt
%store trump_yelling > trump_yelling.txt
Writing 'all_statuses' (list) to file 'all_statuses.txt'.
Writing 'text_and_date' (list) to file 'text_and_date.txt'.
Writing 'trimmed1' (list) to file 'trimmed1.txt'.
Writing 'trimmed2' (list) to file 'trimmed2.txt'.
Writing 'trump_yelling' (Counter) to file 'trump_yelling.txt'.
In [23]:
%store -r