diff --git a/DataSearch.ipynb b/DataSearch.ipynb index aa97c50..7919e0d 100644 --- a/DataSearch.ipynb +++ b/DataSearch.ipynb @@ -2,834 +2,189 @@ "cells": [ { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "paris,france : 48.856614,2.3522219,100mi\n", - "1012484233435197440\n", - "1012474867160158208\n", - "1012457303126274048\n", - "1012454239795404801\n", - "1012444953312681987\n", - "1012444792800841728\n", - "1012440166181597187\n", - "1012438181004955650\n", - "1012437558943539200\n", - "1012432731282853888\n", - "1012430250431655936\n", - "1012428795662491648\n", - "1012427695035240453\n", - "1012426950575566848\n", - "1012426260407037958\n", - "1012425312079052800\n", - "1012421417042931712\n", - "1012418076766326784\n", - "1012412787728027651\n", - "1012405264472035328\n", - "1012404319579246592\n", - "1012402597028876288\n", - "1012400598275239943\n", - "1012398085417439233\n", - "1012395065568841731\n", - "1012393565660635136\n", - "1012393527530094592\n", - "1012391091788795904\n", - "1012387939781836800\n", - "1012387795535564801\n", - "1012385848678068231\n", - "1012385754130124800\n", - "1012385700501704704\n", - "1012384324333768704\n", - "1012383552976162817\n", - "1012383103061577728\n", - "1012382970467045376\n", - "1012382832130338817\n", - "1012382650315755520\n", - "1012382541247057920\n", - "1012382311101419526\n", - "1012382302020734976\n", - "1012382290947837953\n", - "1012382139042627585\n", - "1012378272167055361\n", - "1012378017535086592\n", - "1012373852029095937\n", - "1012369875099160576\n", - "1012369612686675969\n", - "1012369044853477377\n", - "1012365828229091328\n", - "1012361572776382465\n", - "1012360767713304578\n", - "1012354082395381760\n", - "1012346279773573121\n", - "1012336583738052608\n", - "1012321327615791105\n", - "1012318430446440449\n", - "1012315086617235456\n", - "1012313361265184768\n", - "1012308317618819072\n", - "1012307842030764032\n", - "1012304939803176960\n", - "1012299401132494853\n", - "1012298998181449728\n", - "1012297264814002176\n", - "1012273779081465856\n", - "1012271955372855296\n", - "1012268483151892480\n", - "1012262894669647873\n", - "1012262477466390529\n", - "1012257892815208448\n", - "1012255844321415168\n", - "1012255430456823808\n", - "1012242813621325826\n", - "1012242154738110464\n", - "1012240373861814272\n", - "1012216741966090241\n", - "1012215501697769476\n", - "1012149352121421824\n", - "1012131903804264448\n", - "1012125623718903809\n", - "1012112252848177153\n", - "1012102949739384837\n", - "1012101894943182848\n", - "1012101664776605696\n", - "1012101047140147200\n", - "1012100904395395072\n", - "1012100625734172673\n", - "1012100583522816000\n", - "1012100367209902081\n", - "1012099280377655301\n", - "1012098437108690944\n", - "1012097807925284870\n", - "1012097635434618883\n", - "1012096336982929408\n", - "1012091866693734400\n", - "1012091665690054656\n", - "1012089748956024833\n", - "1012088487170985984\n", - "Sample Tweet: RT @kurosaek: So it's spaghetti but as there are chopsticks it became \"japanese food\"? you clearly deserve death https: ...\n" + "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", + "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
0181149None[]15674RT @kurosaek: Donc c’est des spaghettis mais c...
1203200None[]4693RT @kurosaek: Donc c’est des spaghettis mais c...
27192None[]4950RT @kurosaek: Donc c’est des spaghettis mais c...
34127497None[]33782@samialairbien Les baguettes qui s’effondrent ...
4191341None[]27332RT @kurosaek: Donc c’est des spaghettis mais c...
5448256None[]35342RT @kurosaek: Donc c’est des spaghettis mais c...
6376854None[]18326@KimJongUnique Ils les prennent avec des bague...
7872646None[]89760RT @kurosaek: Donc c’est des spaghettis mais c...
8493396None[]23200RT @kurosaek: Donc c’est des spaghettis mais c...
9393362None[]4462RT @kurosaek: Donc c’est des spaghettis mais c...
101520None[]217J'ai nettoyé mes baguettes pcq j'aime bien man...
11542203None[]62297RT @kurosaek: Donc c’est des spaghettis mais c...
121113None[]402RT @kurosaek: Donc c’est des spaghettis mais c...
1354191None[]916RT @kurosaek: Donc c’est des spaghettis mais c...
14233372None[]10648RT @kurosaek: Donc c’est des spaghettis mais c...
1514499None[]2846RT @kurosaek: Donc c’est des spaghettis mais c...
16534277None[]48081RT @kurosaek: Donc c’est des spaghettis mais c...
172212286None[]128998RT @kurosaek: Donc c’est des spaghettis mais c...
18489380None[]22334RT @kurosaek: Donc c’est des spaghettis mais c...
19306119None[]9119RT @kurosaek: Donc c’est des spaghettis mais c...
20100395None[]2574RT @kurosaek: Donc c’est des spaghettis mais c...
219592None[]3117RT @kurosaek: Donc c’est des spaghettis mais c...
2293161None[]5903RT @kurosaek: Donc c’est des spaghettis mais c...
2326151040None[]94672RT @kurosaek: Donc c’est des spaghettis mais c...
24257775None[]160493RT @kurosaek: Donc c’est des spaghettis mais c...
251649116None[]90031RT @kurosaek: Donc c’est des spaghettis mais c...
26374287None[]56583RT @kurosaek: Donc c’est des spaghettis mais c...
271016752None[]137147RT @kurosaek: Donc c’est des spaghettis mais c...
28351430None[]7033RT @kurosaek: Donc c’est des spaghettis mais c...
2987429None[]1529RT @kurosaek: Donc c’est des spaghettis mais c...
.....................
702994200None[]131768Ça commence comme ça et après ça va sortir les...
712656521None[]223798RT @kurosaek: Donc c’est des spaghettis mais c...
72150120None[]12441RT @kurosaek: Donc c’est des spaghettis mais c...
73829114None[]26596RT @kurosaek: Donc c’est des spaghettis mais c...
742231909None[]74291RT @kurosaek: Donc c’est des spaghettis mais c...
755561827None[]57805RT @kurosaek: Donc c’est des spaghettis mais c...
7650213None[]10932RT @kurosaek: Donc c’est des spaghettis mais c...
77128259None[]10119RT @kurosaek: Donc c’est des spaghettis mais c...
7810666None[]16043RT @kurosaek: Donc c’est des spaghettis mais c...
797742None[]8704Où l'on mange avec des baguettes 😱😱😱😱😱😱😱😱 http...
8014242189None[]53616RT @kurosaek: Donc c’est des spaghettis mais c...
811398315None[]245350RT @kurosaek: Donc c’est des spaghettis mais c...
8244135None[]1096RT @kurosaek: Donc c’est des spaghettis mais c...
83477254None[]7249RT @kurosaek: Donc c’est des spaghettis mais c...
84366293None[]87353RT @kurosaek: Donc c’est des spaghettis mais c...
85203178None[]15771RT @kurosaek: Donc c’est des spaghettis mais c...
8670186None[]110069RT @kurosaek: Donc c’est des spaghettis mais c...
8713441712None[]81695RT @kurosaek: Donc c’est des spaghettis mais c...
882380None[]2513RT @kurosaek: Donc c’est des spaghettis mais c...
8930601317None[]143918RT @kurosaek: Donc c’est des spaghettis mais c...
90897320None[]55352RT @kurosaek: Donc c’est des spaghettis mais c...
91472104None[]33683RT @kurosaek: Donc c’est des spaghettis mais c...
922734None[]3713RT @kurosaek: Donc c’est des spaghettis mais c...
9363112731None[]97912RT @kurosaek: Donc c’est des spaghettis mais c...
941625710None[]47048RT @kurosaek: Donc c’est des spaghettis mais c...
951117422None[]159747RT @kurosaek: Donc c’est des spaghettis mais c...
9617899None[]228RT @kurosaek: Donc c’est des spaghettis mais c...
9742291006None[]19884RT @kurosaek: Donc c’est des spaghettis mais c...
9868093None[]21097RT @kurosaek: Donc c’est des spaghettis mais c...
991735737None[]101436RT @kurosaek: Donc c’est des spaghettis mais c...
\n", - "

100 rows × 6 columns

\n", - "
" - ], - "text/plain": [ - " followers friends_count geo hashtags statuses_count \\\n", - "0 181 149 None [] 15674 \n", - "1 203 200 None [] 4693 \n", - "2 71 92 None [] 4950 \n", - "3 4127 497 None [] 33782 \n", - "4 191 341 None [] 27332 \n", - "5 448 256 None [] 35342 \n", - "6 376 854 None [] 18326 \n", - "7 872 646 None [] 89760 \n", - "8 493 396 None [] 23200 \n", - "9 393 362 None [] 4462 \n", - "10 15 20 None [] 217 \n", - "11 542 203 None [] 62297 \n", - "12 11 13 None [] 402 \n", - "13 54 191 None [] 916 \n", - "14 233 372 None [] 10648 \n", - "15 144 99 None [] 2846 \n", - "16 534 277 None [] 48081 \n", - "17 2212 286 None [] 128998 \n", - "18 489 380 None [] 22334 \n", - "19 306 119 None [] 9119 \n", - "20 100 395 None [] 2574 \n", - "21 95 92 None [] 3117 \n", - "22 93 161 None [] 5903 \n", - "23 2615 1040 None [] 94672 \n", - "24 2577 75 None [] 160493 \n", - "25 1649 116 None [] 90031 \n", - "26 374 287 None [] 56583 \n", - "27 1016 752 None [] 137147 \n", - "28 351 430 None [] 7033 \n", - "29 87 429 None [] 1529 \n", - ".. ... ... ... ... ... \n", - "70 2994 200 None [] 131768 \n", - "71 2656 521 None [] 223798 \n", - "72 150 120 None [] 12441 \n", - "73 829 114 None [] 26596 \n", - "74 2231 909 None [] 74291 \n", - "75 556 1827 None [] 57805 \n", - "76 50 213 None [] 10932 \n", - "77 128 259 None [] 10119 \n", - "78 106 66 None [] 16043 \n", - "79 77 42 None [] 8704 \n", - "80 1424 2189 None [] 53616 \n", - "81 1398 315 None [] 245350 \n", - "82 44 135 None [] 1096 \n", - "83 477 254 None [] 7249 \n", - "84 366 293 None [] 87353 \n", - "85 203 178 None [] 15771 \n", - "86 70 186 None [] 110069 \n", - "87 1344 1712 None [] 81695 \n", - "88 23 80 None [] 2513 \n", - "89 3060 1317 None [] 143918 \n", - "90 897 320 None [] 55352 \n", - "91 472 104 None [] 33683 \n", - "92 27 34 None [] 3713 \n", - "93 6311 2731 None [] 97912 \n", - "94 1625 710 None [] 47048 \n", - "95 1117 422 None [] 159747 \n", - "96 178 99 None [] 228 \n", - "97 4229 1006 None [] 19884 \n", - "98 680 93 None [] 21097 \n", - "99 1735 737 None [] 101436 \n", - "\n", - " text \n", - "0 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "1 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "2 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "3 @samialairbien Les baguettes qui s’effondrent ... \n", - "4 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "5 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "6 @KimJongUnique Ils les prennent avec des bague... \n", - "7 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "8 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "9 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "10 J'ai nettoyé mes baguettes pcq j'aime bien man... \n", - "11 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "12 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "13 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "14 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "15 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "16 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "17 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "18 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "19 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "20 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "21 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "22 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "23 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "24 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "25 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "26 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "27 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "28 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "29 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - ".. ... \n", - "70 Ça commence comme ça et après ça va sortir les... \n", - "71 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "72 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "73 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "74 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "75 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "76 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "77 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "78 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "79 Où l'on mange avec des baguettes 😱😱😱😱😱😱😱😱 http... \n", - "80 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "81 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "82 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "83 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "84 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "85 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "86 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "87 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "88 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "89 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "90 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "91 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "92 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "93 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "94 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "95 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "96 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "97 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "98 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "99 RT @kurosaek: Donc c’est des spaghettis mais c... \n", - "\n", - "[100 rows x 6 columns]" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" } ], "source": [ @@ -930,7 +285,8 @@ " try:\n", " result = Geocoder.geocode(cityCountry)\n", " except Exception as error:\n", - " if 'OVER_QUERY_LIMIT' in error:\n", + " #print('errrooooorrrrr: ',error.message)\n", + " if 'OVER_QUERY_LIMIT' in str(error):\n", " print('Encountered an error:{0}\\nWaiting 30 seconds and trying again.'.format(error))\n", " time.sleep(30)\n", " if geoConvertTries>10:\n", @@ -972,7 +328,6 @@ " for tweet in public_tweets['statuses']:\n", " # 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", - " print(tweet['id'])\n", " unique_ids.append(tweet['id'])\n", " desiredTweets.append({'text':tweet['text'], 'geo':tweet['geo'], \n", " 'hashtags':tweet['entities']['hashtags'], 'followers':tweet['user']['followers_count'],\n", @@ -990,7 +345,7 @@ " return pd.DataFrame(desiredTweets)\n", "\n", "\n", - "def GetTweetsByPopularCities(search_term, numTweets):\n", + "def GetTweetsByPopularCities(search_term, numTweets, translateToLocalLanguage = True):\n", " #-- Get the most populated cities from wikipedia (Thank you wikipedia library!) --\n", " html = wp.page(\"List_of_cities_by_population_density\").html().encode(\"UTF-8\")\n", " df = pd.read_html(html)[1]\n", @@ -1008,19 +363,22 @@ "\n", " #-- language conversion --- ---- --\n", " languagesDf = getCountryLanguages()\n", - " try:\n", - " translatedSearch = translator.translate(search_term, src='en', dest=languagesDf.loc[country,'language']).text\n", - " except ValueError:\n", - " print(\"could not translate \", languagesDf.loc[country,'language'])\n", + " if translateToLocalLanguage:\n", + " try:\n", + " translatedSearch = translator.translate(search_term, src='en', dest=languagesDf.loc[country,'language']).text\n", + " except ValueError:\n", + " print(\"could not translate \", languagesDf.loc[country,'language'])\n", + " translatedSearch=search_term\n", + " print('translated word: ',translatedSearch)\n", + " else:\n", " translatedSearch=search_term\n", - " print('translated word: ',translatedSearch)\n", " tweets[city+','+country]=SearchForData(translatedSearch, numTweets, cityCountry, 100)\n", " print('\\n')\n", - " time.sleep(30)\n", + " time.sleep(4)\n", " return tweets\n", "\n", - "#tweets = GetTweetsByPopularCities('dog', 100)\n", - "#tweets['Manila,Philippines']\n", + "tweets = GetTweetsByPopularCities('trump', 100, False)\n", + "tweets['Manila,Philippines']\n", "# locations are not required inputs\n", "#tweets = SearchForData(search_term='baguettes', nTweets=100, cityCountry='paris,france',radius=100)\n", "#tweets"