{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# News Commentaries of the U.S. Newsmakers\n", "by [@tozCSS](https://twitter.com/tozCSS)\n", "\n", "- Scraped the data from [thePlazz.com news site](https://web.archive.org/web/20150314213923/http://theplazz.com/)\n", "- Source code and datasets are made available on [gitHub](https://github.com/oztalha/News-Commentary-Tweets-of-Elites)" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pandas as pd\n", "import plotly.plotly as py\n", "import plotly.tools as tls\n", "from plotly.graph_objs import *\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "plt.style.use('ggplot')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "C:\\Users\\Talha\\Documents\\WinPython3\\projects\\News-Commentary-Tweets-of-Elites\n" ] } ], "source": [ "cd ../" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | newsdate | \n", "twcount | \n", "title | \n", "
---|---|---|---|
4922 | \n", "2013-12-05 | \n", "307 | \n", "Apartheid resistance leader Mandela has died | \n", "
4986 | \n", "2013-11-28 | \n", "270 | \n", "A day full of thanks, feasts and families | \n", "
7178 | \n", "2013-02-24 | \n", "227 | \n", "Academy Awards 2013: cheers and jeers | \n", "
4369 | \n", "2014-01-28 | \n", "199 | \n", "Obama promises a year of action for 2014 | \n", "
4714 | \n", "2013-12-24 | \n", "196 | \n", "Season’s tweetings: Tis time to gather ’round | \n", "
4302 | \n", "2014-02-02 | \n", "192 | \n", "Actor Philip Seymour Hoffman dead at 46 | \n", "
122 | \n", "2014-12-31 | \n", "181 | \n", "Celeb greetings wish the happiest of new years | \n", "
4660 | \n", "2013-12-31 | \n", "175 | \n", "Billions ring in the New Year around the world | \n", "
6439 | \n", "2013-06-19 | \n", "174 | \n", "James Gandolfini dies of heart attack in Italy | \n", "
2685 | \n", "2014-06-10 | \n", "174 | \n", "Tea Party’s Brat hands Cantor primary defeat | \n", "
562 | \n", "2014-11-27 | \n", "172 | \n", "Celebs share gratitude on Thanksgiving | \n", "
6863 | \n", "2013-04-08 | \n", "169 | \n", "Britain’s Iron Lady dies of stroke at 87 | \n", "
192 | \n", "2014-12-25 | \n", "165 | \n", "Season’s tweetings: It’s Christmas Day greetings | \n", "
4388 | \n", "2014-01-26 | \n", "162 | \n", "Macklemore, Lorde, Daft Punk sweep Grammys | \n", "
2844 | \n", "2014-05-28 | \n", "162 | \n", "Renowned poet, author Maya Angelou dies | \n", "
4567 | \n", "2014-01-09 | \n", "153 | \n", "NJ Gov. Christie claims ignorance, apologizes | \n", "
7250 | \n", "2013-02-14 | \n", "151 | \n", "Love and celebrity hawking on Valentine’s | \n", "
7114 | \n", "2013-03-06 | \n", "150 | \n", "Rand Paul leads epic filibuster on CIA nominee | \n", "
5211 | \n", "2013-10-31 | \n", "149 | \n", "Trick or tweet! Halloween is here | \n", "
4704 | \n", "2013-12-25 | \n", "146 | \n", "Celebs spread holiday cheer to one and all | \n", "
7410 | \n", "2013-01-21 | \n", "145 | \n", "“Our journey is not complete” | \n", "
6301 | \n", "2013-07-04 | \n", "142 | \n", "Celebs show their patriotic colors | \n", "
5258 | \n", "2013-10-27 | \n", "140 | \n", "Legendary rock pioneer dead at 71 | \n", "
4529 | \n", "2014-01-13 | \n", "139 | \n", "Hollywood’s hottest stars snag Globes | \n", "
3085 | \n", "2014-05-11 | \n", "138 | \n", "Americans mark 100 years of Mother’s Day | \n", "
5119 | \n", "2013-11-11 | \n", "135 | \n", "Remembering those who offered their lives | \n", "
5807 | \n", "2013-08-31 | \n", "131 | \n", "Obama delays Syria strike for Congress vote | \n", "
1540 | \n", "2014-09-11 | \n", "131 | \n", "US observes somber 9/11 anniversary | \n", "
7334 | \n", "2013-02-01 | \n", "131 | \n", "Old scores settled at Hagel hearing | \n", "
7067 | \n", "2013-03-13 | \n", "129 | \n", "A New World ‘first': Pope Francis | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
3091 | \n", "2014-05-11 | \n", "3 | \n", "Facing elimination, Rangers force Game 7 | \n", "
4056 | \n", "2014-02-20 | \n", "3 | \n", "Bay Area residents keep drawing lucky numbers | \n", "
4062 | \n", "2014-02-20 | \n", "3 | \n", "GOProud co-founder quits over CPAC invite | \n", "
3190 | \n", "2014-05-02 | \n", "3 | \n", "UK celeb publicist given jail for sexual assaults | \n", "
1461 | \n", "2014-09-18 | \n", "3 | \n", "AOL shares go vertical amid Yahoo merger talk | \n", "
7301 | \n", "2013-02-06 | \n", "3 | \n", "Ravens parade through Baltimore | \n", "
1522 | \n", "2014-09-12 | \n", "3 | \n", "School shooter TJ Lane escapes Ohio prison | \n", "
762 | \n", "2014-11-10 | \n", "3 | \n", "Students ask Rick Perry about anal sex in protest | \n", "
4487 | \n", "2014-01-17 | \n", "3 | \n", "Two students shot at Philadelphia school | \n", "
1549 | \n", "2014-09-11 | \n", "3 | \n", "Sens. Flake, Heinrich star in survival reality... | \n", "
2110 | \n", "2014-07-28 | \n", "3 | \n", "NPR journalist, Wiccan Margot Adler dies at 68 | \n", "
2501 | \n", "2014-06-24 | \n", "3 | \n", "Who gets dumped in Italy on ‘Bachelorette?’ | \n", "
1798 | \n", "2014-08-22 | \n", "3 | \n", "Bodies of MH17 victims return to Malaysia | \n", "
3294 | \n", "2014-04-25 | \n", "3 | \n", "Conn. teen killed after turning down prom date | \n", "
2089 | \n", "2014-07-29 | \n", "3 | \n", "OKcupid messes with users’ compatibility | \n", "
4456 | \n", "2014-01-20 | \n", "3 | \n", "Central African Republic welcomes female leader | \n", "
3268 | \n", "2014-04-28 | \n", "3 | \n", "Syria’s al-Assad formally files reelection bid | \n", "
863 | \n", "2014-11-03 | \n", "3 | \n", "NASCAR drivers in brawl at Texas speedway | \n", "
5088 | \n", "2013-11-16 | \n", "3 | \n", "Jay Z decides to work with Barney’s | \n", "
1515 | \n", "2014-09-13 | \n", "3 | \n", "Zimmerman faces no charges for death threat | \n", "
6339 | \n", "2013-06-30 | \n", "3 | \n", "Italy claims third at Confederations Cup | \n", "
3265 | \n", "2014-04-28 | \n", "3 | \n", "Kissing congressman McAllister won’t run | \n", "
3962 | \n", "2014-02-27 | \n", "3 | \n", "NFL mulls penalty for use of N-word on field | \n", "
4426 | \n", "2014-01-23 | \n", "3 | \n", "States drag feet on Medicaid expansion | \n", "
897 | \n", "2014-10-30 | \n", "3 | \n", "Cruz’s comment on gay CEO criticized, praised | \n", "
3984 | \n", "2014-02-26 | \n", "3 | \n", "SCOTUS ruling eases warrantless searches | \n", "
919 | \n", "2014-10-29 | \n", "3 | \n", "Poet and Pulitzer winner Galway Kinnell dies a... | \n", "
4407 | \n", "2014-01-24 | \n", "3 | \n", "One killed in S.C. University shooting | \n", "
944 | \n", "2014-10-27 | \n", "3 | \n", "‘Citizenfour’ proves to be effective horror film | \n", "
671 | \n", "2014-11-18 | \n", "3 | \n", "‘Dumb & Dumber To’ surprise Box Office win | \n", "
7367 rows × 3 columns
\n", "\n", " | newsdate | \n", "twcount | \n", "title | \n", "twdaily | \n", "
---|---|---|---|---|
0 | \n", "2013-12-05 | \n", "307 | \n", "Apartheid resistance leader Mandela has died | \n", "481 | \n", "
1 | \n", "2014-01-28 | \n", "199 | \n", "Obama promises a year of action for 2014 | \n", "514 | \n", "
2 | \n", "2014-02-02 | \n", "192 | \n", "Actor Philip Seymour Hoffman dead at 46 | \n", "767 | \n", "
3 | \n", "2013-09-10 | \n", "123 | \n", "Obama: ‘exceptional’ US ‘doesn’t do pinpricks’ | \n", "478 | \n", "
4 | \n", "2014-12-17 | \n", "99 | \n", "Sony axes Christmas day release of ‘The Interv... | \n", "553 | \n", "
5 | \n", "2014-12-09 | \n", "98 | \n", "CIA ‘Torture Report’ called ‘gruesome’ | \n", "460 | \n", "
6 | \n", "2014-03-02 | \n", "96 | \n", "And the Oscars for Best actors go to … | \n", "649 | \n", "
7 | \n", "2014-08-25 | \n", "91 | \n", "And the Emmy Award goes to … | \n", "472 | \n", "
8 | \n", "2014-11-04 | \n", "83 | \n", "GOP wrestles Senate majority from Dems | \n", "559 | \n", "
9 | \n", "2013-10-01 | \n", "76 | \n", "Government is closed, so now what? | \n", "475 | \n", "
10 | \n", "2014-11-25 | \n", "58 | \n", "Ferguson protests again marred by violence | \n", "473 | \n", "