diff --git a/DataSearch.ipynb b/DataSearch.ipynb index 7919e0d..2cf5744 100644 --- a/DataSearch.ipynb +++ b/DataSearch.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -10,181 +10,792 @@ "output_type": "stream", "text": [ "Manila , Philippines : 14.5995124,120.9842195,100mi\n", - "Sample Tweet: @bessbell Nixon knew the USSR was our enemy and Trump thinks Putin is his friend.\n", - "Nixon opened relations with China… https://t.co/0GnaimQrxh\n", - "\n", - "\n", - "Ebeye , Marshall Islands : 8.7814708,167.7373396,100mi\n", - "No tweets returned while searching for 'trump'\n", - "[]\n", - "\n", - "\n", - "Encountered an error:Error OVER_QUERY_LIMIT\n", - "Query: https://maps.google.com/maps/api/geocode/json?address=Pateros+%28Municipality%29+%2C+Philippines&sensor=false&bounds=®ion=&language=&components=\n", - "Waiting 30 seconds and trying again.\n", - "Pateros (Municipality) , Philippines : 14.5483779,121.070773,100mi\n", - "Sample Tweet: @bessbell Nixon knew the USSR was our enemy and Trump thinks Putin is his friend.\n", - "Nixon opened relations with China… https://t.co/0GnaimQrxh\n", - "\n", - "\n", - "Mumbai , India : 19.0759837,72.8776559,100mi\n", - "Sample Tweet: RT @Piyushmody999: @Swamy39 Lutyens and Left Liberals are interested to Upload fake news like women unsafe in India.\n", - "\n", - "Lots of such Fake sur…\n", - "\n", - "\n", - "Dhaka , Bangladesh : 23.810332,90.4125181,100mi\n", - "Sample Tweet: RT @TarekJubaer: Trump’s Legacy: Damaged Brains https://t.co/28QHIBtcX7\n", - "\n", - "\n", - "Bnei Brak , Israel : 32.084932,34.835226,100mi\n", - "Sample Tweet: RT @DanielBShapiro: Trump’s “intentional and egregious actions to undermine the EU, NATO and the US relationship with both can no longer be…\n", - "\n", - "\n", - "Caloocan , Philippines : 14.7565784,121.0449768,100mi\n", - "Sample Tweet: @SocialPowerOne1 thank you DINESH D'SOUZA for pointing out the difference between #HITLER #Fascism and $trump Fascism\n", - "\n", - "\n", - "Encountered an error:Error OVER_QUERY_LIMIT\n", - "Query: https://maps.google.com/maps/api/geocode/json?address=Levallois-Perret+%2C+France&sensor=false&bounds=®ion=&language=&components=\n", - "Waiting 30 seconds and trying again.\n", - "Levallois-Perret , France : 48.89321700000001,2.287864,100mi\n", - "Sample Tweet: RT @vivien_hoch: To understand how Donald Trump is winning the fight of the century against abortion at the Supreme Court of ...\n", - "\n", - "\n", - "Le Pré-Saint-Gervais , France : 48.885063,2.40557,100mi\n", - "Sample Tweet: RT @vivien_hoch: To understand how Donald Trump is winning the fight of the century against abortion at the Supreme Court of ...\n", - "\n", - "\n", - "Chennai , India : 13.0826802,80.2707184,100mi\n", - "Sample Tweet: @sumanthraman Falling rupee is due to trade war by Trump Govt with other countries!in 2013 rupee dropped from 54 to… https://t.co/eXdRZWZ0XY\n", - "\n", - "\n", - "Vincennes , France : 48.847759,2.4394969,100mi\n", - "Sample Tweet: RT @vivien_hoch: To understand how Donald Trump is winning the fight of the century against abortion at the Supreme Court of ...\n", - "\n", - "\n", - "Saint-Mandé , France : 43.2676808,6.640710899999999,100mi\n", - "Sample Tweet: @sc2Account @krmrn3 @BigMikeLINY @BeverlySearcy @SenSchumer @POTUS Before the race because he was picked for the co… https://t.co/5xmlO4au7K\n", - "\n", - "\n", - "Bally , India : 22.645734,88.34786,100mi\n", - "Sample Tweet: #JusticeKennedy retiring can be for many reasons. His ethics isn't one of them. Another possibility: w/ Lucia v. S… https://t.co/mKv9yxYiRI\n", - "\n", - "\n", - "Kolkata , India : 22.572646,88.36389500000001,100mi\n", - "Sample Tweet: #JusticeKennedy retiring can be for many reasons. His ethics isn't one of them. Another possibility: w/ Lucia v. S… https://t.co/mKv9yxYiRI\n", - "\n", - "\n", - "Saint-Josse-ten-Noode , Belgium : 50.8537715,4.3704657,100mi\n", - "Sample Tweet: RT @BTooMarvelous: @aliasvaughn @MichaelAvenatti So Cohen was basically an collections man for Trump, not even for himself, but hes trying…\n", - "\n", - "\n", - "Kathmandu , Nepal : 27.7172453,85.3239605,100mi\n", - "Sample Tweet: This man sure needs help....\n", - " https://t.co/qHwboMRJPe\n", - "\n", - "\n", - "Subang Jaya , Malaysia : 3.0567333,101.5851192,100mi\n", - "Sample Tweet: Trump And Putin To Hold Talks In Helsinki In Mid-July https://t.co/kVqKhhPeWz\n", - "\n", - "\n", - "Neapoli , Greece : 36.5121752,23.0600381,100mi\n", - "No tweets returned while searching for 'trump'\n", - "[]\n", - "\n", - "\n", - "Montrouge , France : 48.816363,2.317384,100mi\n", - "Sample Tweet: RT @vivien_hoch: To understand how Donald Trump is winning the fight of the century against abortion at the Supreme Court of ...\n", - "\n", - "\n", - "Malé , Maldives : 4.1754959,73.5093474,100mi\n", - "No tweets returned while searching for 'trump'\n", - "[]\n", - "\n", - "\n", - "Malabon , Philippines : 14.6680747,120.9658454,100mi\n", - "Sample Tweet: @SocialPowerOne1 thank you DINESH D'SOUZA for pointing out the difference between #HITLER #Fascism and $trump Fascism\n", - "\n", - "\n", - "Guttenberg, New Jersey , United States : 40.7920454,-74.0037505,100mi\n", - "Sample Tweet: RT @joncoopertweets: “I can’t wait for the vigilante squads to start gunning journalists down on sight.” ~Right-wing provocateur, Trump sup…\n", - "\n", - "\n", - "Pasig , Philippines : 14.5763768,121.0851097,100mi\n", - "Sample Tweet: @jonathansviewon @chuckschumer @DNC @realDonaldTrump Schumer says what ever will get him re-elected, his only agend… https://t.co/QU70cvjYye\n", - "\n", - "\n", - "Paris , France : 48.856614,2.3522219,100mi\n", - "Sample Tweet: RT @vivien_hoch: To understand how Donald Trump is winning the fight of the century against abortion at the Supreme Court of ...\n", - "\n", - "\n", - "Mislata , Spain : 39.4779243,-0.4195876,100mi\n", - "Sample Tweet: RT @focusmm64: @ICarrollJ Born in 1964 but my main philanthropic interest is an has been wome and girls. Never bawled after an election unt…\n", - "\n", - "\n", - "Macau , China : 22.198745,113.543873,100mi\n", - "Sample Tweet: @MSNBC @mitchellreports The Putin-Trump summit will look like a subservient vassal meeting his fuedal lord. And it… https://t.co/43g21hi29c\n", - "\n", - "\n", - "Kallithea , Greece : 37.955893,23.7020975,100mi\n", - "Sample Tweet: RT @ pascalidou: \"The enemies of the people,\" called Trump journalists. Milo Yannopoulos called for violence against journalists as late as yesterday. Hay…\n", - "\n", - "\n", - "Nea Smyrni , Greece : 37.9444167,23.7127056,100mi\n", - "Sample Tweet: RT @ pascalidou: \"The enemies of the people,\" called Trump journalists. Milo Yannopoulos called for violence against journalists as late as yesterday. Hay…\n", - "\n", - "\n", - "Howrah , India : 22.5957689,88.26363940000002,100mi\n", - "Sample Tweet: #JusticeKennedy retiring can be for many reasons. His ethics isn't one of them. Another possibility: w/ Lucia v. S… https://t.co/mKv9yxYiRI\n", - "\n", - "\n", - "Pasay , Philippines : 14.5377516,121.0013794,100mi\n", + "14.5995124,120.9842195,100mi\n", "Sample Tweet: @jonathansviewon @chuckschumer @DNC @realDonaldTrump Schumer says what ever will get him re-elected, his only agend… https://t.co/QU70cvjYye\n", "\n", - "\n", - "San Juan , Philippines : 14.5994146,121.0368893,100mi\n", - "Sample Tweet: @jonathansviewon @chuckschumer @DNC @realDonaldTrump Schumer says what ever will get him re-elected, his only agend… https://t.co/QU70cvjYye\n", - "\n", - "\n", - "Colombo , Sri Lanka : 6.9270786,79.861243,100mi\n", - "Sample Tweet: : Breaking ..! The former demonstration against the President of the United States Senate against President Donald Trump ... Hutus: //T.co/Si 1 Vtgau 7 Han\n", - "\n", - "\n", - "L'Hospitalet de Llobregat , Spain : 41.3661865,2.1164942,100mi\n", - "there was an error translating sample tweet: El populismo del Papa frente al proteccionismo de Trump | Demos (2018-06-21) #YouTube\n", - "📢 #ÚltimaHora https://t.co/pB0K3L0kI1\n", - "\n", - "\n", - "Union City, New Jersey , United States : 40.7795455,-74.02375119999999,100mi\n", - "Sample Tweet: RT @Amy_Siskind: Crickets from Republicans about Trump's threats at the media, including referring to them as the \"enemy of the people\" two…\n", - "\n", - "\n", - "Cairo , Egypt : 30.0444196,31.2357116,100mi\n", - "Sample Tweet: ! https://t.co/ChJJFcfz3S\n", - "\n", - "\n", - "Makati , Philippines : 14.554729,121.0244452,100mi\n", - "Sample Tweet: @jonathansviewon @chuckschumer @DNC @realDonaldTrump Schumer says what ever will get him re-elected, his only agend… https://t.co/QU70cvjYye\n", - "\n", - "\n", - "West New York, New Jersey , United States : 40.7878788,-74.0143064,100mi\n", - "Sample Tweet: RT @Jamierodr10: Comey, you didn't help President Trump get elected! 63 million patriots wanted our country back! You have disgraced the FB…\n", - "\n", - "\n", - "Saint-Gilles , Belgium : 50.8301436,4.340218399999999,100mi\n", - "Sample Tweet: RT @Fuctupmind: Donald Trump, helping children that were wrongfully separated from their parents, since 1992. https://t.co/gMzPvXkktB\n", - "\n", - "\n", - "Bandung , Indonesia : -6.9174639,107.6191228,100mi\n", - "Sample Tweet: RT @2011teacher: #Corruption. -- We’ve Found $16.1 Million in Political and Taxpayer Spending at #Trump Properties https://t.co/H7d0nhZpEU…\n", - "\n", - "\n", - "Monaco , Monaco : 43.73841760000001,7.424615799999999,100mi\n", - "Sample Tweet: @imeva99 @foxandfriends @AlanDersh Just like we pay for all his trips to Mar a largo. Those have cost tax payers an… https://t.co/LKHPRrbqbJ\n", - "\n", "\n" ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
followersfriends_countgeohashtagsstatuses_counttext
019652349None[]12340@jonathansviewon @chuckschumer @DNC @realDonal...
121053365None[]2887@bessbell Nixon knew the USSR was our enemy an...
25991406None[]15435RT @RinChupeco: White people, journalists who ...
321053365None[]2887@bessbell This is a difficult call. We're not ...
45282None[]2583It makes me laugh some trump supporters think ...
531793612None[{'text': 'prolife', 'indices': [0, 8]}, {'tex...49175#prolife #philippines, if you have friends/rel...
6715201None[]583President Trump:\\nTaph taph taph! https://t.co...
7914941None[]44400Trump signs \"religious liberty\" executive orde...
812582313None[]8233RT @RinChupeco: White people, journalists who ...
99252475None[]18389RT @RinChupeco: White people, journalists who ...
1023591883None[]18104@USAHotLips Since I cut my finger & had to...
1134694021None[]171838RT @bgaltman: Thank you Mr. Trump. You just co...
127702936None[]12993RT @RinChupeco: White people, journalists who ...
13887873None[]77826Holy shit, Donald Trump is sabotaging the EU a...
14162456None[]9713I do, I do, I do... LOVE my UK Lookalikes! S...
1558724208None[]5654RT @bgaltman: Thank you Mr. Trump. You just co...
1655884053None[]635727RT @RinChupeco: White people, journalists who ...
17502333None[]7487RT @RinChupeco: White people, journalists who ...
1814421864None[]14970RT @bgaltman: Thank you Mr. Trump. You just co...
1913081919None[]11688RT @bgaltman: Thank you Mr. Trump. You just co...
201493None[]140@evela_23 @usabasketball @xaviermunford These ...
2119652349None[]12340@PoliticalShort Absolutely not, there is no va...
2276573None[]1113@HandNik In what way. You literally just have ...
2351424558None[{'text': 'GOP', 'indices': [18, 22]}]171129RT @RockCliffOne: #GOP the party of pedophiles...
2411081117None[{'text': 'GOP', 'indices': [0, 4]}]23885#GOP the party of pedophiles, tools, trolls, t...
25261895None[]11522@RepAdamSchiff They are ENABLERS. They are no ...
26308734None[]28950RT @manilabulletin: Melania Trump makes second...
27544375212None[]499345Melania Trump makes second border visit to see...
2810714None[]6043Retweeted CONCEPT (ConceptGrp):\\n\\nTrump to me...
2949427None[]461@TrumpSC Happy birthday Trump! I started playi...
.....................
70165927None[]25300RT @RinChupeco: White people, journalists who ...
71281508None[]8298RT @RinChupeco: White people, journalists who ...
725554901None[]239526RT @RinChupeco: White people, journalists who ...
7357633129None[]424327RT @RinChupeco: White people, journalists who ...
74326494None[]20078RT @RinChupeco: White people, journalists who ...
75922839None[]5639Trump talked about those killed by “criminal i...
761063211689None[]26674RT @shouting4God: Meet the 2018 woman who vote...
775181116None[]4978Trump is the real dark state! https://t.co/hXA...
782899882None[{'text': 'ALDUBAlwaysHopeful', 'indices': [87...174800RT @okatibaraxirhb: [TRUMP Day 6/29/2018] Day ...
79381None[{'text': 'ALDUBAlwaysHopeful', 'indices': [67...19654[TRUMP Day 6/29/2018] Day 5: \"SEIREI no MORIBI...
804439None[]1471Wollt ihr nicht wissen, wie ein Weltmeistersch...
8118892None[]3000Офис спецпрокурора Мюллера расследует приглаше...
82481415None[{'text': 'DealbreakerIn5Words', 'indices': [0...15571#DealbreakerIn5Words I am a Trump supporter (o...
83239172None[]73475@anison Agree with that. It's a narrative the...
84160554None[]2186@JakobDWebster @CanadianKansan I’d imagine a l...
851769538None[]187867Trump-Putin meeting to follow NATO gathering a...
86836614None[]116171RT @RinChupeco: White people, journalists who ...
8746674529None[]34718RT @RinChupeco: White people, journalists who ...
88544375212None[]499345Trump to tout economic policies at Foxconn gro...
893817927None[]71071Trump-Putin summit gagawin sa Finland sa July ...
90552None[]50RT @RinChupeco: White people, journalists who ...
91165185None[]1347Why is @mostlybree such a Trump fan? — Idunno....
92580None[]825Trump to meet Putin in July\\n\\nhttps://t.co/HL...
93544375212None[]499345Melania Trump heading back toward the US-Mexic...
9424651706None[]23764RT @BnVPodcast: Lo más chocante de Gremlins 2 ...
954550None[]41Lo más chocante de Gremlins 2 es su clon de Do...
9627812335None[]5518RT @RinChupeco: White people, journalists who ...
9773036387None[]118540RT @RinChupeco: White people, journalists who ...
9842674995None[]2417RT @RinChupeco: White people, journalists who ...
99151303None[]19732RT @RinChupeco: White people, journalists who ...
\n", + "

100 rows × 6 columns

\n", + "
" + ], + "text/plain": [ + " followers friends_count geo \\\n", + "0 1965 2349 None \n", + "1 2105 3365 None \n", + "2 599 1406 None \n", + "3 2105 3365 None \n", + "4 52 82 None \n", + "5 3179 3612 None \n", + "6 715 201 None \n", + "7 914 941 None \n", + "8 1258 2313 None \n", + "9 925 2475 None \n", + "10 2359 1883 None \n", + "11 3469 4021 None \n", + "12 770 2936 None \n", + "13 887 873 None \n", + "14 162 456 None \n", + "15 5872 4208 None \n", + "16 5588 4053 None \n", + "17 502 333 None \n", + "18 1442 1864 None \n", + "19 1308 1919 None \n", + "20 149 3 None \n", + "21 1965 2349 None \n", + "22 76 573 None \n", + "23 5142 4558 None \n", + "24 1108 1117 None \n", + "25 261 895 None \n", + "26 308 734 None \n", + "27 544375 212 None \n", + "28 107 14 None \n", + "29 49 427 None \n", + ".. ... ... ... \n", + "70 165 927 None \n", + "71 281 508 None \n", + "72 5554 901 None \n", + "73 5763 3129 None \n", + "74 326 494 None \n", + "75 922 839 None \n", + "76 10632 11689 None \n", + "77 518 1116 None \n", + "78 2899 882 None \n", + "79 38 1 None \n", + "80 44 39 None \n", + "81 188 92 None \n", + "82 481 415 None \n", + "83 239 172 None \n", + "84 160 554 None \n", + "85 1769 538 None \n", + "86 836 614 None \n", + "87 4667 4529 None \n", + "88 544375 212 None \n", + "89 3817 927 None \n", + "90 5 52 None \n", + "91 165 185 None \n", + "92 58 0 None \n", + "93 544375 212 None \n", + "94 2465 1706 None \n", + "95 45 50 None \n", + "96 2781 2335 None \n", + "97 7303 6387 None \n", + "98 4267 4995 None \n", + "99 151 303 None \n", + "\n", + " hashtags statuses_count \\\n", + "0 [] 12340 \n", + "1 [] 2887 \n", + "2 [] 15435 \n", + "3 [] 2887 \n", + "4 [] 2583 \n", + "5 [{'text': 'prolife', 'indices': [0, 8]}, {'tex... 49175 \n", + "6 [] 583 \n", + "7 [] 44400 \n", + "8 [] 8233 \n", + "9 [] 18389 \n", + "10 [] 18104 \n", + "11 [] 171838 \n", + "12 [] 12993 \n", + "13 [] 77826 \n", + "14 [] 9713 \n", + "15 [] 5654 \n", + "16 [] 635727 \n", + "17 [] 7487 \n", + "18 [] 14970 \n", + "19 [] 11688 \n", + "20 [] 140 \n", + "21 [] 12340 \n", + "22 [] 1113 \n", + "23 [{'text': 'GOP', 'indices': [18, 22]}] 171129 \n", + "24 [{'text': 'GOP', 'indices': [0, 4]}] 23885 \n", + "25 [] 11522 \n", + "26 [] 28950 \n", + "27 [] 499345 \n", + "28 [] 6043 \n", + "29 [] 461 \n", + ".. ... ... \n", + "70 [] 25300 \n", + "71 [] 8298 \n", + "72 [] 239526 \n", + "73 [] 424327 \n", + "74 [] 20078 \n", + "75 [] 5639 \n", + "76 [] 26674 \n", + "77 [] 4978 \n", + "78 [{'text': 'ALDUBAlwaysHopeful', 'indices': [87... 174800 \n", + "79 [{'text': 'ALDUBAlwaysHopeful', 'indices': [67... 19654 \n", + "80 [] 1471 \n", + "81 [] 3000 \n", + "82 [{'text': 'DealbreakerIn5Words', 'indices': [0... 15571 \n", + "83 [] 73475 \n", + "84 [] 2186 \n", + "85 [] 187867 \n", + "86 [] 116171 \n", + "87 [] 34718 \n", + "88 [] 499345 \n", + "89 [] 71071 \n", + "90 [] 50 \n", + "91 [] 1347 \n", + "92 [] 825 \n", + "93 [] 499345 \n", + "94 [] 23764 \n", + "95 [] 41 \n", + "96 [] 5518 \n", + "97 [] 118540 \n", + "98 [] 2417 \n", + "99 [] 19732 \n", + "\n", + " text \n", + "0 @jonathansviewon @chuckschumer @DNC @realDonal... \n", + "1 @bessbell Nixon knew the USSR was our enemy an... \n", + "2 RT @RinChupeco: White people, journalists who ... \n", + "3 @bessbell This is a difficult call. We're not ... \n", + "4 It makes me laugh some trump supporters think ... \n", + "5 #prolife #philippines, if you have friends/rel... \n", + "6 President Trump:\\nTaph taph taph! https://t.co... \n", + "7 Trump signs \"religious liberty\" executive orde... \n", + "8 RT @RinChupeco: White people, journalists who ... \n", + "9 RT @RinChupeco: White people, journalists who ... \n", + "10 @USAHotLips Since I cut my finger & had to... \n", + "11 RT @bgaltman: Thank you Mr. Trump. You just co... \n", + "12 RT @RinChupeco: White people, journalists who ... \n", + "13 Holy shit, Donald Trump is sabotaging the EU a... \n", + "14 I do, I do, I do... LOVE my UK Lookalikes! S... \n", + "15 RT @bgaltman: Thank you Mr. Trump. You just co... \n", + "16 RT @RinChupeco: White people, journalists who ... \n", + "17 RT @RinChupeco: White people, journalists who ... \n", + "18 RT @bgaltman: Thank you Mr. Trump. You just co... \n", + "19 RT @bgaltman: Thank you Mr. Trump. You just co... \n", + "20 @evela_23 @usabasketball @xaviermunford These ... \n", + "21 @PoliticalShort Absolutely not, there is no va... \n", + "22 @HandNik In what way. You literally just have ... \n", + "23 RT @RockCliffOne: #GOP the party of pedophiles... \n", + "24 #GOP the party of pedophiles, tools, trolls, t... \n", + "25 @RepAdamSchiff They are ENABLERS. They are no ... \n", + "26 RT @manilabulletin: Melania Trump makes second... \n", + "27 Melania Trump makes second border visit to see... \n", + "28 Retweeted CONCEPT (ConceptGrp):\\n\\nTrump to me... \n", + "29 @TrumpSC Happy birthday Trump! I started playi... \n", + ".. ... \n", + "70 RT @RinChupeco: White people, journalists who ... \n", + "71 RT @RinChupeco: White people, journalists who ... \n", + "72 RT @RinChupeco: White people, journalists who ... \n", + "73 RT @RinChupeco: White people, journalists who ... \n", + "74 RT @RinChupeco: White people, journalists who ... \n", + "75 Trump talked about those killed by “criminal i... \n", + "76 RT @shouting4God: Meet the 2018 woman who vote... \n", + "77 Trump is the real dark state! https://t.co/hXA... \n", + "78 RT @okatibaraxirhb: [TRUMP Day 6/29/2018] Day ... \n", + "79 [TRUMP Day 6/29/2018] Day 5: \"SEIREI no MORIBI... \n", + "80 Wollt ihr nicht wissen, wie ein Weltmeistersch... \n", + "81 Офис спецпрокурора Мюллера расследует приглаше... \n", + "82 #DealbreakerIn5Words I am a Trump supporter (o... \n", + "83 @anison Agree with that. It's a narrative the... \n", + "84 @JakobDWebster @CanadianKansan I’d imagine a l... \n", + "85 Trump-Putin meeting to follow NATO gathering a... \n", + "86 RT @RinChupeco: White people, journalists who ... \n", + "87 RT @RinChupeco: White people, journalists who ... \n", + "88 Trump to tout economic policies at Foxconn gro... \n", + "89 Trump-Putin summit gagawin sa Finland sa July ... \n", + "90 RT @RinChupeco: White people, journalists who ... \n", + "91 Why is @mostlybree such a Trump fan? — Idunno.... \n", + "92 Trump to meet Putin in July\\n\\nhttps://t.co/HL... \n", + "93 Melania Trump heading back toward the US-Mexic... \n", + "94 RT @BnVPodcast: Lo más chocante de Gremlins 2 ... \n", + "95 Lo más chocante de Gremlins 2 es su clon de Do... \n", + "96 RT @RinChupeco: White people, journalists who ... \n", + "97 RT @RinChupeco: White people, journalists who ... \n", + "98 RT @RinChupeco: White people, journalists who ... \n", + "99 RT @RinChupeco: White people, journalists who ... \n", + "\n", + "[100 rows x 6 columns]" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -312,6 +923,7 @@ " while len(desiredTweets) < min(nTweets,maxTweets):\n", " #--- determine whether to grab tweets by geo or not --- ---- --- ----- --\n", " if cityCountry:\n", + " print(coords)\n", " public_tweets = api.search(search_term, count=100, result_type=\"recent\", max_id=oldest_tweet, geocode=coords)\n", " else:\n", " public_tweets = api.search(search_term, count=100, result_type=\"recent\", max_id=oldest_tweet)\n", @@ -329,7 +941,7 @@ " # Append tweet_id to ids list if it doesn't already exist. This allows checking for duplicate tweets\n", " if tweet[\"id\"] not in unique_ids :\n", " unique_ids.append(tweet['id'])\n", - " desiredTweets.append({'text':tweet['text'], 'geo':tweet['geo'], \n", + " desiredTweets.append({'text':tweet['text'], 'geo':tweet['geo'], 'location':tweet['user']['location'],\n", " 'hashtags':tweet['entities']['hashtags'], 'followers':tweet['user']['followers_count'],\n", " 'friends_count':tweet['user']['friends_count'],'statuses_count':tweet['user']['statuses_count']})\n", " \n", @@ -375,6 +987,7 @@ " tweets[city+','+country]=SearchForData(translatedSearch, numTweets, cityCountry, 100)\n", " print('\\n')\n", " time.sleep(4)\n", + " break\n", " return tweets\n", "\n", "tweets = GetTweetsByPopularCities('trump', 100, False)\n", @@ -1888,6 +2501,31 @@ "tweets['Manila,Philippines']" ] }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Rotterdam'" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Setup Tweepy API Authentication\n", + "auth = tweepy.OAuthHandler(consumer_key, consumer_secret)\n", + "auth.set_access_token(access_token, access_token_secret)\n", + "api = tweepy.API(auth, parser=tweepy.parsers.JSONParser())\n", + "tweetsa=api.search(q='trump', geocode='52.132633,5.29126,100km')\n", + "tweetsa['statuses'][0]['user']['location']" + ] + }, { "cell_type": "code", "execution_count": null,