From 759cca763081185de3bed786b4e3eb962fb80425 Mon Sep 17 00:00:00 2001 From: karim hamidou Date: Tue, 18 Dec 2012 18:14:45 +0100 Subject: [PATCH] latest changes --- js/extract.json | 1 + js/index.html | 4 ++++ js/js/main.js | 37 ++++++++++++++++++++++++++++++++----- js/miserables.json | 1 - 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 js/extract.json delete mode 100644 js/miserables.json diff --git a/js/extract.json b/js/extract.json new file mode 100644 index 0000000..5c29946 --- /dev/null +++ b/js/extract.json @@ -0,0 +1 @@ +{"nodes": [{"webSite": false, "nodeScore": 0, "nodeName": "efiregalyq", "avatar": "http://a0.twimg.com/profile_images/2714157168/0a014d5c57552fc80c9e16cbf380c296_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "PJ Sykes", "avatar": "http://a0.twimg.com/profile_images/2400784166/ltbrly476q6o1pmx5ivl_normal.jpeg"}, {"website": true, "articles": ["http://www.dailykos.com/story/2012/10/28/1151619/-VIDEO-gt-Newt-Gingrich-he-and-Paul-Ryan-plotted-to-sabotage-the-US-Economy-on-January-20-2009"], "nodeScore": 1, "nodeName": "www.dailykos.com"}, {"webSite": false, "nodeScore": 1, "nodeName": "Wayne Powell"}, {"webSite": false, "nodeScore": 4, "nodeName": "WiseUPLibs", "avatar": "http://a0.twimg.com/profile_images/1249039668/WiseUPLibs_normal.jpg"}, {"website": true, "articles": ["http://dailycaller.com/2012/11/02/new-jersey-town-to-ala-volunteer-utility-crew-dont-help-with-sandy-unless-youre-unionized/", "http://dailycaller.com/2012/11/02/plenty-of-time-left/", "http://dailycaller.com/2012/11/02/a-new-theory-of-bls-skew/", "http://dailycaller.com/2012/11/02/new-book-publishes-little-seen-essays-by-milton-friedman/", "http://dailycaller.com/2012/11/02/wealthy-columbia-univ-donor-school-told-me-obama-had-2-6-gpa/"], "nodeScore": 4, "nodeName": "dailycaller.com"}, {"webSite": false, "nodeScore": 0, "nodeName": "Bailey", "avatar": "http://a0.twimg.com/profile_images/1677664834/Profile2_normal.jpg"}, {"webSite": false, "nodeScore": 0, "nodeName": "justin ", "avatar": "http://a0.twimg.com/profile_images/2653114761/e456c355fef7bb5208e500c5bf0d1ede_normal.jpeg"}, {"webSite": false, "nodeScore": 6, "nodeName": "YA BOY OBAMA"}, {"webSite": false, "nodeScore": 0, "nodeName": "orindaLu", "avatar": "http://a0.twimg.com/profile_images/2714304172/5c4ac2158e5dfb2f7a9dbc14562d75c4_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "bydurirym", "avatar": "http://a0.twimg.com/profile_images/2718200789/0670d2cf0d35394fc7d36c62166ddcd4_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Never Chilling Troll"}, {"webSite": false, "nodeScore": 0, "nodeName": "noqizede", "avatar": "http://a0.twimg.com/profile_images/2718166652/96815e88e5de056271c30b158edc8e9c_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "~~ Lady Liberty ~~"}, {"webSite": false, "nodeScore": 0, "nodeName": "Cindelyn Mcadam", "avatar": "http://a0.twimg.com/profile_images/2755854959/d5bc5b3f74a1eb68ad4b3abe1351d6ae_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Travis Strickland"}, {"webSite": false, "nodeScore": 0, "nodeName": "kuhndaddy", "avatar": "http://a0.twimg.com/profile_images/2754694780/66ff4a3899e33f59a2c9688f4b9073be_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Etown's Mitt Romney"}, {"webSite": false, "nodeScore": 1, "nodeName": "Etown'z Paul Ryan"}, {"webSite": false, "nodeScore": 0, "nodeName": "gorecetug", "avatar": "http://a0.twimg.com/profile_images/2756935860/5403650d233c2799aef972c6c686b872_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Proud of Obama"}, {"webSite": false, "nodeScore": 1, "nodeName": "Sunshinefox7 "}, {"webSite": false, "nodeScore": 0, "nodeName": "soqohiqerum", "avatar": "http://a0.twimg.com/profile_images/2756017470/cf360e31107174e95dada6199d6e0ba0_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Joey Gee"}, {"webSite": false, "nodeScore": 0, "nodeName": "ebipezadol", "avatar": "http://a0.twimg.com/profile_images/2718242541/e9edf99981c02d81cf8094ec95705998_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Amr"}, {"webSite": false, "nodeScore": 1, "nodeName": "Sharif Aly"}, {"webSite": false, "nodeScore": 0, "nodeName": "Wayne Fox", "avatar": "http://a0.twimg.com/profile_images/2589940447/8z6cadd1fhola61g36xy_normal.jpeg"}, {"website": true, "articles": ["http://www.dispatch.com/content/stories/local/2012/11/02/ann-romney-woos-ohio-women.html"], "nodeScore": 1, "nodeName": "www.dispatch.com"}, {"webSite": false, "nodeScore": 0, "nodeName": "vonokywoc", "avatar": "http://a0.twimg.com/profile_images/2717199044/759cec6233700ebc462ed4ccc056507b_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "Jake Sweater Vest", "avatar": "http://a0.twimg.com/profile_images/2764591527/c141c8cd118b9f74bad9c9ec28abe7f7_normal.jpeg"}, {"website": true, "articles": ["http://thelookingspoon.com/index.php?option=com_content&view=article&id=4094&catid=79&Itemid=25"], "nodeScore": 1, "nodeName": "thelookingspoon.com"}, {"webSite": false, "nodeScore": 0, "nodeName": "narigirada", "avatar": "http://a0.twimg.com/profile_images/2756224803/7a6087e9f2b0d52f31dd5ef815f57371_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "licuvypu", "avatar": "http://a0.twimg.com/profile_images/2717243792/2417901f7105f4e86dd6428082781b27_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "sacyxibe", "avatar": "http://a0.twimg.com/profile_images/2716568653/9004f8ef3afe921f10a0ed6803c69e36_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "Agharna", "avatar": "http://a0.twimg.com/profile_images/2757636570/53af5901b8226362183e76b011f96192_normal.jpeg"}, {"website": true, "articles": ["http://tucsoncitizen.com/hispanic-politico/2012/10/26/from-ron-paul-to-president-obama-armed-forces-and-military-show-overwhelming-support-for-obama-in-donations/"], "nodeScore": 1, "nodeName": "tucsoncitizen.com"}, {"webSite": false, "nodeScore": 0, "nodeName": "Vez", "avatar": "http://a0.twimg.com/profile_images/2727929525/70f185563b97cd557aa0506c002fb79a_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "Obamney \u270c\u270c", "avatar": "http://a0.twimg.com/profile_images/2477654209/7G61iGDw_normal"}, {"webSite": false, "nodeScore": 0, "nodeName": "bogocyzat", "avatar": "http://a0.twimg.com/profile_images/2735951143/6ab7c107daf9dfed0135dc3ae94f2762_normal.jpeg"}, {"website": true, "articles": ["http://communities.washingtontimes.com/neighborhood/not-your-average-read/2012/oct/26/gary-johnson-ron-paul-chuck-baldwin-third-party/", "http://communities.washingtontimes.com/neighborhood/appalachian-chronicles/2012/oct/30/legalize-marijuana-snoop-dog-and-bill-oreilly-agre/", "http://communities.washingtontimes.com/neighborhood/appalachian-chronicles/2012/oct/31/gary-johnson-and-ron-paul-agree-it-time-legalize-m/"], "nodeScore": 1, "nodeName": "communities.washingtontimes.com"}, {"webSite": false, "nodeScore": 1, "nodeName": "Laura "}, {"webSite": false, "nodeScore": 1, "nodeName": "Demetrius Minor"}, {"webSite": false, "nodeScore": 0, "nodeName": "ecevivuko", "avatar": "http://a0.twimg.com/profile_images/2734361646/dba31a999572cfa91e632f259f4af3fb_normal.jpeg"}, {"website": true, "articles": ["http://www.policymic.com/articles/17433/ron-paul-and-gary-johnson-do-not-speak"], "nodeScore": 1, "nodeName": "www.policymic.com"}, {"webSite": false, "nodeScore": 1, "nodeName": "Sarape7312"}, {"webSite": false, "nodeScore": 1, "nodeName": "YPP"}, {"webSite": false, "nodeScore": 0, "nodeName": "olyfepeg", "avatar": "http://a0.twimg.com/profile_images/2715083814/1c9eafde8ead7a0349af680f9b081da8_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Ron Paul California"}, {"webSite": false, "nodeScore": 1, "nodeName": "Ron Paul"}, {"webSite": false, "nodeScore": 1, "nodeName": "Gary Johnson 2012"}, {"webSite": false, "nodeScore": 0, "nodeName": "sirikubaga", "avatar": "http://a0.twimg.com/profile_images/2758048564/d9761c1ed10adb219fb5d7508ea48255_normal.gif"}, {"webSite": false, "nodeScore": 0, "nodeName": "Bruce Tunno", "avatar": "http://a0.twimg.com/profile_images/1237107469/IMG_0129_normal.JPG"}, {"website": true, "articles": ["http://www.youtube.com/watch?v=wPjBXufufUU&feature=youtube_gdata_player", "http://www.youtube.com/watch?v=UkK27gjB7mk", "http://www.youtube.com/watch?v=r3BbIPbLSRw&feature=youtu.be"], "nodeScore": 1, "nodeName": "www.youtube.com"}, {"webSite": false, "nodeScore": 0, "nodeName": "Tomy Randazzo", "avatar": "http://a0.twimg.com/profile_images/2646916151/c14fc5dc5d31b0c4c9ecb6a2c5b430d6_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "nydykovo", "avatar": "http://a0.twimg.com/profile_images/2734916341/e7efcdaf50e383990117b0b4050f64c9_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Amanda Cain"}, {"webSite": false, "nodeScore": 0, "nodeName": "tozujecu", "avatar": "http://a0.twimg.com/profile_images/2757906842/09bb948f665e0ed896eec9e32246a0ba_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "rubuhewohum", "avatar": "http://a0.twimg.com/profile_images/2756291764/87a52ca32fac118edb0c67471e8519d4_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Achiasaph"}, {"webSite": false, "nodeScore": 1, "nodeName": "changethemusic"}, {"webSite": false, "nodeScore": 1, "nodeName": "Calvin"}, {"webSite": false, "nodeScore": 0, "nodeName": "cadupozabe", "avatar": "http://a0.twimg.com/profile_images/2755933033/1568ad3d1bed66ba8521ea711a0ed3ea_normal.jpeg"}, {"website": true, "articles": ["http://MarijuanaMajority.com"], "nodeScore": 1, "nodeName": "marijuanamajority.com"}, {"webSite": false, "nodeScore": 1, "nodeName": "tomangell"}, {"webSite": false, "nodeScore": 0, "nodeName": "David Pirazzi", "avatar": "http://a0.twimg.com/profile_images/1391768686/24940_normal.jpg"}, {"webSite": false, "nodeScore": 1, "nodeName": "The Daily Edge"}, {"webSite": false, "nodeScore": 0, "nodeName": "opapugagc", "avatar": "http://a0.twimg.com/profile_images/2718088317/8598761107db831751fb3b086423ecc1_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Janice A.J. Hartmann"}, {"webSite": false, "nodeScore": 1, "nodeName": "B Rela"}, {"webSite": false, "nodeScore": 1, "nodeName": "Martin O'Malley"}, {"webSite": false, "nodeScore": 0, "nodeName": "just20percent", "avatar": "http://a0.twimg.com/profile_images/2791306861/c6c026a9f4bbda491e54bb65d6e40ec0_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "John Dehmer", "avatar": "http://a0.twimg.com/profile_images/2762183327/f10ce852f33d2c37d44fa327736ce317_normal.jpeg"}, {"webSite": false, "nodeScore": 0, "nodeName": "Jeunes LibDem", "avatar": "http://a0.twimg.com/profile_images/2111345097/Logo_Jeunes_Lib_raux_D_mocrates_normal.jpg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Arnaud Dassier"}, {"webSite": false, "nodeScore": 1, "nodeName": "Le Grand Journal"}, {"webSite": false, "nodeScore": 0, "nodeName": "gonadasahi", "avatar": "http://a0.twimg.com/profile_images/2715421655/04264b8b12ca39f25d509bd7254bd8f1_normal.gif"}, {"webSite": false, "nodeScore": 1, "nodeName": "Chip Zehnder"}, {"webSite": false, "nodeScore": 0, "nodeName": "boqibeze", "avatar": "http://a0.twimg.com/profile_images/2717965227/2da3cbc5a3b7e0075619178a48b696cf_normal.jpeg"}, {"webSite": false, "nodeScore": 1, "nodeName": "Libertyf033"}, {"webSite": false, "nodeScore": 1, "nodeName": "Gandalf"}, {"webSite": false, "nodeScore": 1, "nodeName": "chris rosati"}, {"webSite": false, "nodeScore": 0, "nodeName": "dabullet", "avatar": "http://a0.twimg.com/profile_images/1105953236/Adrian_Foley_399_normal.jpg"}, {"website": true, "articles": ["http://www.ydr.com/politics/ci_21906531/romney-campaign-paul-ryan-stop-harrisburg-area-saturday"], "nodeScore": 1, "nodeName": "www.ydr.com"}, {"webSite": false, "nodeScore": 1, "nodeName": "Gunservatively"}, {"webSite": false, "nodeScore": 0, "nodeName": "ElmObama Jobs", "avatar": "http://a0.twimg.com/profile_images/2684445551/a4babda8b22b912806372747fd40b431_normal.png"}, {"webSite": false, "nodeScore": 0, "nodeName": "jijitygyqo", "avatar": "http://a0.twimg.com/profile_images/2718889231/77772b211b23ab73801b80dcb25f407d_normal.gif"}, {"webSite": false, "nodeScore": 1, "nodeName": "YouTube"}, {"webSite": false, "nodeScore": 0, "nodeName": "Pharlap", "avatar": "http://a0.twimg.com/profile_images/220927864/draft_lens1281291module1538861photo_Secretariat_belmont_1__normal.jpg"}, {"webSite": false, "nodeScore": 0, "nodeName": "Tommy Bland", "avatar": "http://a0.twimg.com/profile_images/1544797340/Frederick_Douglass_portrait_normal.jpg"}, {"website": true, "articles": ["http://www.againstcronycapitalism.org/2012/10/the-role-of-the-us-intelligence-community-is-to-protect-the-united-states-from-military-threats-not-to-provide-corporate-welfare-to-the-private-sector-ron-paul/"], "nodeScore": 1, "nodeName": "www.againstcronycapitalism.org"}, {"webSite": false, "nodeScore": 1, "nodeName": "Nicholaus Sorrentino"}, {"webSite": false, "nodeScore": 0, "nodeName": "sewujifid", "avatar": "http://a0.twimg.com/profile_images/2718089549/fd2fe16edb01d6cff66e7a2929aeca4b_normal.jpeg"}], "edges": [{"url": "http://tucsoncitizen.com/hispanic-politico/2012/10/26/from-ron-paul-to-president-obama-armed-forces-and-military-show-overwhelming-support-for-obama-in-donations/", "source": "Agharna", "destination": "tucsoncitizen.com", "date": "Fri, 02 Nov 2012 10:52:20 +0000"}, {"url": "http://thelookingspoon.com/index.php?option=com_content&view=article&id=4094&catid=79&Itemid=25", "source": "WiseUPLibs", "destination": "thelookingspoon.com", "date": "Fri, 02 Nov 2012 10:53:02 +0000"}, {"url": "http://www.dispatch.com/content/stories/local/2012/11/02/ann-romney-woos-ohio-women.html", "source": "Wayne Fox", "destination": "www.dispatch.com", "date": "Fri, 02 Nov 2012 10:55:41 +0000"}, {"date": "Fri, 02 Nov 2012 10:55:56 +0000", "source": "ebipezadol", "destination": "Amr", "content": "RT @amrgeddon @sharifaly the Ron Paul crowd isn't nearly as big as the anti Obama care crowd."}, {"date": "Fri, 02 Nov 2012 10:55:56 +0000", "source": "ebipezadol", "destination": "Sharif Aly", "content": "RT @amrgeddon @sharifaly the Ron Paul crowd isn't nearly as big as the anti Obama care crowd."}, {"date": "Fri, 02 Nov 2012 10:55:58 +0000", "source": "soqohiqerum", "destination": "Joey Gee", "content": "RT @JoeyGarret oo Romney is ahead by 5% today. Not that Obama was winning by 5% yesterday. Makes no sense. What if Ron Paul wins?"}, {"date": "Fri, 02 Nov 2012 10:56:11 +0000", "source": "gorecetug", "destination": "Proud of Obama", "content": "@Proud_of_Obama @stevenala you mean Ron Paul, the one who tells the truth even though he's a little weird but he's the man!"}, {"date": "Fri, 02 Nov 2012 10:56:11 +0000", "source": "gorecetug", "destination": "Sunshinefox7 ", "content": "@Proud_of_Obama @stevenala you mean Ron Paul, the one who tells the truth even though he's a little weird but he's the man!"}, {"date": "Fri, 02 Nov 2012 10:56:23 +0000", "source": "kuhndaddy", "destination": "Etown's Mitt Romney", "content": "\u201c@YABOYOBAMA: I've seen at least 20 gay couples in my lifetime that look like Mitt Romney and Paul Ryan.\u201d @EtownRomney @EtownzPaulRyan"}, {"date": "Fri, 02 Nov 2012 10:56:23 +0000", "source": "kuhndaddy", "destination": "Etown'z Paul Ryan", "content": "\u201c@YABOYOBAMA: I've seen at least 20 gay couples in my lifetime that look like Mitt Romney and Paul Ryan.\u201d @EtownRomney @EtownzPaulRyan"}, {"date": "Fri, 02 Nov 2012 10:56:51 +0000", "source": "Cindelyn Mcadam", "destination": "Travis Strickland", "content": "@Stricky2 well maybe if u voted for him and got the word out there he would.. there's a reason CNN and fox don't discuss Ron Paul and Gary"}, {"date": "Fri, 02 Nov 2012 10:57:24 +0000", "source": "noqizede", "destination": "~~ Lady Liberty ~~", "content": "@libertyladyusa a vote for Ron Paul is a vote for Obama!"}, {"date": "Fri, 02 Nov 2012 10:57:56 +0000", "source": "bydurirym", "destination": "Never Chilling Troll", "content": "RT @I_exude_sarcasm Fuck Mitt Romney and his dumb ass...How come Ron Paul couldnt be nominated as the republican candidate"}, {"date": "Fri, 02 Nov 2012 10:59:12 +0000", "source": "justin ", "destination": "YA BOY OBAMA", "content": "RT @YABOYOBAMA: I've seen at least 20 gay couples in my lifetime that look like Mitt Romney and Paul Ryan."}, {"url": "http://www.dailykos.com/story/2012/10/28/1151619/-VIDEO-gt-Newt-Gingrich-he-and-Paul-Ryan-plotted-to-sabotage-the-US-Economy-on-January-20-2009", "source": "PJ Sykes", "destination": "www.dailykos.com", "date": "Fri, 02 Nov 2012 11:00:34 +0000"}, {"date": "Fri, 02 Nov 2012 11:00:34 +0000", "source": "PJ Sykes", "destination": "Wayne Powell", "content": "#Gingrich #Ryan #Cantor and more plotted to sabotage the US Economy on January 20, 2009 http://t.co/c6RXic6K #VA07 @PowellforVA #Obama"}, {"url": "http://dailycaller.com/2012/11/02/new-jersey-town-to-ala-volunteer-utility-crew-dont-help-with-sandy-unless-youre-unionized/", "source": "WiseUPLibs", "destination": "dailycaller.com", "date": "Fri, 02 Nov 2012 11:00:34 +0000"}, {"date": "Fri, 02 Nov 2012 11:02:58 +0000", "source": "opapugagc", "destination": "Janice A.J. Hartmann", "content": "RT @NiceConundrum @brela @GovernorOMalley Nicely done. I'm torn between Obama & writing in Dr. Ron Paul #president #vote"}, {"date": "Fri, 02 Nov 2012 11:02:58 +0000", "source": "opapugagc", "destination": "B Rela", "content": "RT @NiceConundrum @brela @GovernorOMalley Nicely done. I'm torn between Obama & writing in Dr. Ron Paul #president #vote"}, {"date": "Fri, 02 Nov 2012 11:02:58 +0000", "source": "opapugagc", "destination": "Martin O'Malley", "content": "RT @NiceConundrum @brela @GovernorOMalley Nicely done. I'm torn between Obama & writing in Dr. Ron Paul #president #vote"}, {"date": "Fri, 02 Nov 2012 11:03:17 +0000", "source": "David Pirazzi", "destination": "The Daily Edge", "content": "RT @TheDailyEdge: Paul Ryan: \"Mitt Romney is a car guy.\" Car guys: \"Mitt Romney is a fucking liar\" #MittLies #GOPlies"}, {"url": "http://MarijuanaMajority.com", "source": "cadupozabe", "destination": "marijuanamajority.com", "date": "Fri, 02 Nov 2012 11:03:25 +0000"}, {"date": "Fri, 02 Nov 2012 11:03:25 +0000", "source": "cadupozabe", "destination": "tomangell", "content": "2-part Washington Times interview with http://t.co/OezJysOB founder @tomangell http://t.co/e6DGD5TR and http://t.co/s3tEfVZn"}, {"date": "Fri, 02 Nov 2012 11:03:32 +0000", "source": "rubuhewohum", "destination": "Achiasaph", "content": "RT @rowetyhus RT @changethemusic @aurosan prepare yourself for all of the romney/ryan and ron paul stickers on the cars. they're everywhere."}, {"date": "Fri, 02 Nov 2012 11:03:32 +0000", "source": "rubuhewohum", "destination": "changethemusic", "content": "RT @rowetyhus RT @changethemusic @aurosan prepare yourself for all of the romney/ryan and ron paul stickers on the cars. they're everywhere."}, {"date": "Fri, 02 Nov 2012 11:03:32 +0000", "source": "rubuhewohum", "destination": "Calvin", "content": "RT @rowetyhus RT @changethemusic @aurosan prepare yourself for all of the romney/ryan and ron paul stickers on the cars. they're everywhere."}, {"date": "Fri, 02 Nov 2012 11:04:54 +0000", "source": "Cindelyn Mcadam", "destination": "Amanda Cain", "content": "@cain_amanda exactlyyy! That's Ron Paul's view. And Gary Johnson's. it's the most logical."}, {"url": "http://www.youtube.com/watch?v=wPjBXufufUU&feature=youtube_gdata_player", "source": "Bruce Tunno", "destination": "www.youtube.com", "date": "Fri, 02 Nov 2012 11:05:42 +0000"}, {"date": "Fri, 02 Nov 2012 11:06:42 +0000", "source": "olyfepeg", "destination": "Ron Paul California", "content": "Gary Johnson 2012 or 'write in' Ron Paul dont waste your vote on Obamney!@GovGaryJohnson @RonPaulCA2012 @RonPaul_2012 @Gibson_The_Paul"}, {"date": "Fri, 02 Nov 2012 11:06:42 +0000", "source": "olyfepeg", "destination": "Ron Paul", "content": "Gary Johnson 2012 or 'write in' Ron Paul dont waste your vote on Obamney!@GovGaryJohnson @RonPaulCA2012 @RonPaul_2012 @Gibson_The_Paul"}, {"date": "Fri, 02 Nov 2012 11:06:42 +0000", "source": "olyfepeg", "destination": "Gary Johnson 2012", "content": "Gary Johnson 2012 or 'write in' Ron Paul dont waste your vote on Obamney!@GovGaryJohnson @RonPaulCA2012 @RonPaul_2012 @Gibson_The_Paul"}, {"url": "http://communities.washingtontimes.com/neighborhood/not-your-average-read/2012/oct/26/gary-johnson-ron-paul-chuck-baldwin-third-party/", "source": "bogocyzat", "destination": "communities.washingtontimes.com", "date": "Fri, 02 Nov 2012 11:06:48 +0000"}, {"date": "Fri, 02 Nov 2012 11:06:48 +0000", "source": "bogocyzat", "destination": "Laura ", "content": ".@GOPrincess @dminor85 Please share my column \"Reverse statism: A reality check for voters considering third party\" http://t.co/cKBeR7uZ"}, {"date": "Fri, 02 Nov 2012 11:06:48 +0000", "source": "bogocyzat", "destination": "Demetrius Minor", "content": ".@GOPrincess @dminor85 Please share my column \"Reverse statism: A reality check for voters considering third party\" http://t.co/cKBeR7uZ"}, {"url": "http://www.policymic.com/articles/17433/ron-paul-and-gary-johnson-do-not-speak", "source": "ecevivuko", "destination": "www.policymic.com", "date": "Fri, 02 Nov 2012 11:06:48 +0000"}, {"date": "Fri, 02 Nov 2012 11:06:48 +0000", "source": "ecevivuko", "destination": "Sarape7312", "content": "RT @Sarape7312 RT @yppnetwork MAPP insights into Libertarian youth in PolicyMic http://t.co/NdiW4XG8"}, {"date": "Fri, 02 Nov 2012 11:06:48 +0000", "source": "ecevivuko", "destination": "YPP", "content": "RT @Sarape7312 RT @yppnetwork MAPP insights into Libertarian youth in PolicyMic http://t.co/NdiW4XG8"}, {"url": "http://www.againstcronycapitalism.org/2012/10/the-role-of-the-us-intelligence-community-is-to-protect-the-united-states-from-military-threats-not-to-provide-corporate-welfare-to-the-private-sector-ron-paul/", "source": "Tommy Bland", "destination": "www.againstcronycapitalism.org", "date": "Fri, 02 Nov 2012 11:07:33 +0000"}, {"date": "Fri, 02 Nov 2012 11:07:33 +0000", "source": "Tommy Bland", "destination": "Nicholaus Sorrentino", "content": "RT @AgainstCronyCap: Will the Obama admin create #CISPA with an (unconstitutional) executive order- it looks so. http://t.co/VJsIO221"}, {"date": "Fri, 02 Nov 2012 11:07:52 +0000", "source": "jijitygyqo", "destination": "YouTube", "content": "Ron Paul tells Mitt Romney to read the Constitution!: http://t.co/lcETmqHy via @youtube"}, {"url": "http://www.ydr.com/politics/ci_21906531/romney-campaign-paul-ryan-stop-harrisburg-area-saturday", "source": "dabullet", "destination": "www.ydr.com", "date": "Fri, 02 Nov 2012 11:08:17 +0000"}, {"date": "Fri, 02 Nov 2012 11:08:17 +0000", "source": "dabullet", "destination": "Gunservatively", "content": "RT @Gunservatively: Romney campaign: Paul Ryan to stop in Harrisburg area Saturday http://t.co/MCXcVBCI"}, {"date": "Fri, 02 Nov 2012 11:08:34 +0000", "source": "boqibeze", "destination": "Libertyf033", "content": "RT @Libertyf033 RT @ghuxtable_ \"@HottieRosati69: RON PAUL!! fuck Obama and fuck Romney\""}, {"date": "Fri, 02 Nov 2012 11:08:34 +0000", "source": "boqibeze", "destination": "Gandalf", "content": "RT @Libertyf033 RT @ghuxtable_ \"@HottieRosati69: RON PAUL!! fuck Obama and fuck Romney\""}, {"date": "Fri, 02 Nov 2012 11:08:34 +0000", "source": "boqibeze", "destination": "chris rosati", "content": "RT @Libertyf033 RT @ghuxtable_ \"@HottieRosati69: RON PAUL!! fuck Obama and fuck Romney\""}, {"date": "Fri, 02 Nov 2012 11:08:42 +0000", "source": "gonadasahi", "destination": "Chip Zehnder", "content": "RT @ChipZehnder Ron Paul Calls Mitt Romney Stupid http://t.co/iXX64XD2"}, {"date": "Fri, 02 Nov 2012 11:09:02 +0000", "source": "Jeunes LibDem", "destination": "Arnaud Dassier", "content": "\"J'aurai pr\u00e9f\u00e9r\u00e9 soutenir Ron Paul ou Gary Jonhson, mais comme ils sont hors course, je soutiens Romney\" @arnauddassier @GrdJournal"}, {"date": "Fri, 02 Nov 2012 11:09:02 +0000", "source": "Jeunes LibDem", "destination": "Le Grand Journal", "content": "\"J'aurai pr\u00e9f\u00e9r\u00e9 soutenir Ron Paul ou Gary Jonhson, mais comme ils sont hors course, je soutiens Romney\" @arnauddassier @GrdJournal"}]} \ No newline at end of file diff --git a/js/index.html b/js/index.html index 4147ea7..e966f47 100755 --- a/js/index.html +++ b/js/index.html @@ -38,9 +38,13 @@

Survolez un noeud pour obtenir des détails.

+
+ +
+ diff --git a/js/js/main.js b/js/js/main.js index c290202..45469bf 100755 --- a/js/js/main.js +++ b/js/js/main.js @@ -1,5 +1,6 @@ +FILTER_NODE_SIZE = 0; $(document).ready(function() { - $.ajax("full.json", {success :setup}); + $.ajax("extract.json", {success :setup}); /* window.setTimeout(step1, 2000); window.setTimeout(step2, 5000); @@ -17,7 +18,30 @@ function setup(json) { var sigRoot = $('#graphWrapper').get(0); var sigInst = sigma.init(sigRoot); - sigInst.graphProperties({minNodeSize: 1, maxNodeSize: 50}); + sigInst.graphProperties({minNodeSize: 1, maxNodeSize: 50, defaultEdgeType: 'curve', defaultEdgeColor: '#ccc'}); + sigInst.bind('overnodes', function(event) { + var nodeName = event.content; + + var i = 0; + var node = _.find(json["nodes"], function(node) { return node["nodeName"] == nodeName }); + if(node == null) + return; + + console.log(node, node["webSite"]) + if(node["website"] == true) { + var siteTempl = _.template("
<%= siteName %>
"); + var txt = siteTempl({"siteName" : node["nodeName"], articles: node["articles"]}); + $("#rightNav").html(txt); + } else if(node["webSite"] == false) { + var siteTempl = _.template("
<%= userName %>"); + + var txt = siteTempl({"userName" : node["nodeName"], avatar: node["avatar"]}); + $("#rightNav").html(txt); + + console.log("user"); + } + }); draw(jsonData, sigInst); return; @@ -33,7 +57,7 @@ function draw(data, sigInst) { if(name.split(".").length > 1) color = "#00c"; // site web - if(size > 2) { + if(size > FILTER_NODE_SIZE) { sigInst.addNode(name, {x: Math.random(), y: Math.random(), size: size, color: color}); created_nodes[name] = 1; } @@ -42,13 +66,16 @@ function draw(data, sigInst) { for(var i = 0; i < data["edges"].length; i++) { var source = data["edges"][i]["source"]; var dest = data["edges"][i]["destination"]; - if(created_nodes[source] == 1 && created_nodes[dest] == 1) + if(created_nodes[source] == 1 && created_nodes[dest] == 1) { sigInst.addEdge(i, source, dest); + console.log("created " + source + " -> " + dest); + } } sigInst.startForceAtlas2(); + /* var isRunning = true; document.getElementById('stop-layout').addEventListener('click',function(){ if(isRunning){ @@ -64,7 +91,7 @@ function draw(data, sigInst) { document.getElementById('rescale-graph').addEventListener('click',function(){ sigInst.position(0,0,1).draw(); },true); - + */ sigInst.draw(); } diff --git a/js/miserables.json b/js/miserables.json deleted file mode 100644 index 8ac8437..0000000 --- a/js/miserables.json +++ /dev/null @@ -1 +0,0 @@ -{"nodes":[{"name":"Myriel","group":1},{"name":"Napoleon","group":1},{"name":"Mlle.Baptistine","group":1},{"name":"Mme.Magloire","group":1},{"name":"CountessdeLo","group":1},{"name":"Geborand","group":1},{"name":"Champtercier","group":1},{"name":"Cravatte","group":1},{"name":"Count","group":1},{"name":"OldMan","group":1},{"name":"Labarre","group":2},{"name":"Valjean","group":2},{"name":"Marguerite","group":3},{"name":"Mme.deR","group":2},{"name":"Isabeau","group":2},{"name":"Gervais","group":2},{"name":"Tholomyes","group":3},{"name":"Listolier","group":3},{"name":"Fameuil","group":3},{"name":"Blacheville","group":3},{"name":"Favourite","group":3},{"name":"Dahlia","group":3},{"name":"Zephine","group":3},{"name":"Fantine","group":3},{"name":"Mme.Thenardier","group":4},{"name":"Thenardier","group":4},{"name":"Cosette","group":5},{"name":"Javert","group":4},{"name":"Fauchelevent","group":0},{"name":"Bamatabois","group":2},{"name":"Perpetue","group":3},{"name":"Simplice","group":2},{"name":"Scaufflaire","group":2},{"name":"Woman1","group":2},{"name":"Judge","group":2},{"name":"Champmathieu","group":2},{"name":"Brevet","group":2},{"name":"Chenildieu","group":2},{"name":"Cochepaille","group":2},{"name":"Pontmercy","group":4},{"name":"Boulatruelle","group":6},{"name":"Eponine","group":4},{"name":"Anzelma","group":4},{"name":"Woman2","group":5},{"name":"MotherInnocent","group":0},{"name":"Gribier","group":0},{"name":"Jondrette","group":7},{"name":"Mme.Burgon","group":7},{"name":"Gavroche","group":8},{"name":"Gillenormand","group":5},{"name":"Magnon","group":5},{"name":"Mlle.Gillenormand","group":5},{"name":"Mme.Pontmercy","group":5},{"name":"Mlle.Vaubois","group":5},{"name":"Lt.Gillenormand","group":5},{"name":"Marius","group":8},{"name":"BaronessT","group":5},{"name":"Mabeuf","group":8},{"name":"Enjolras","group":8},{"name":"Combeferre","group":8},{"name":"Prouvaire","group":8},{"name":"Feuilly","group":8},{"name":"Courfeyrac","group":8},{"name":"Bahorel","group":8},{"name":"Bossuet","group":8},{"name":"Joly","group":8},{"name":"Grantaire","group":8},{"name":"MotherPlutarch","group":9},{"name":"Gueulemer","group":4},{"name":"Babet","group":4},{"name":"Claquesous","group":4},{"name":"Montparnasse","group":4},{"name":"Toussaint","group":5},{"name":"Child1","group":10},{"name":"Child2","group":10},{"name":"Brujon","group":4},{"name":"Mme.Hucheloup","group":8}],"links":[{"source":1,"target":0,"value":1},{"source":2,"target":0,"value":8},{"source":3,"target":0,"value":10},{"source":3,"target":2,"value":6},{"source":4,"target":0,"value":1},{"source":5,"target":0,"value":1},{"source":6,"target":0,"value":1},{"source":7,"target":0,"value":1},{"source":8,"target":0,"value":2},{"source":9,"target":0,"value":1},{"source":11,"target":10,"value":1},{"source":11,"target":3,"value":3},{"source":11,"target":2,"value":3},{"source":11,"target":0,"value":5},{"source":12,"target":11,"value":1},{"source":13,"target":11,"value":1},{"source":14,"target":11,"value":1},{"source":15,"target":11,"value":1},{"source":17,"target":16,"value":4},{"source":18,"target":16,"value":4},{"source":18,"target":17,"value":4},{"source":19,"target":16,"value":4},{"source":19,"target":17,"value":4},{"source":19,"target":18,"value":4},{"source":20,"target":16,"value":3},{"source":20,"target":17,"value":3},{"source":20,"target":18,"value":3},{"source":20,"target":19,"value":4},{"source":21,"target":16,"value":3},{"source":21,"target":17,"value":3},{"source":21,"target":18,"value":3},{"source":21,"target":19,"value":3},{"source":21,"target":20,"value":5},{"source":22,"target":16,"value":3},{"source":22,"target":17,"value":3},{"source":22,"target":18,"value":3},{"source":22,"target":19,"value":3},{"source":22,"target":20,"value":4},{"source":22,"target":21,"value":4},{"source":23,"target":16,"value":3},{"source":23,"target":17,"value":3},{"source":23,"target":18,"value":3},{"source":23,"target":19,"value":3},{"source":23,"target":20,"value":4},{"source":23,"target":21,"value":4},{"source":23,"target":22,"value":4},{"source":23,"target":12,"value":2},{"source":23,"target":11,"value":9},{"source":24,"target":23,"value":2},{"source":24,"target":11,"value":7},{"source":25,"target":24,"value":13},{"source":25,"target":23,"value":1},{"source":25,"target":11,"value":12},{"source":26,"target":24,"value":4},{"source":26,"target":11,"value":31},{"source":26,"target":16,"value":1},{"source":26,"target":25,"value":1},{"source":27,"target":11,"value":17},{"source":27,"target":23,"value":5},{"source":27,"target":25,"value":5},{"source":27,"target":24,"value":1},{"source":27,"target":26,"value":1},{"source":28,"target":11,"value":8},{"source":28,"target":27,"value":1},{"source":29,"target":23,"value":1},{"source":29,"target":27,"value":1},{"source":29,"target":11,"value":2},{"source":30,"target":23,"value":1},{"source":31,"target":30,"value":2},{"source":31,"target":11,"value":3},{"source":31,"target":23,"value":2},{"source":31,"target":27,"value":1},{"source":32,"target":11,"value":1},{"source":33,"target":11,"value":2},{"source":33,"target":27,"value":1},{"source":34,"target":11,"value":3},{"source":34,"target":29,"value":2},{"source":35,"target":11,"value":3},{"source":35,"target":34,"value":3},{"source":35,"target":29,"value":2},{"source":36,"target":34,"value":2},{"source":36,"target":35,"value":2},{"source":36,"target":11,"value":2},{"source":36,"target":29,"value":1},{"source":37,"target":34,"value":2},{"source":37,"target":35,"value":2},{"source":37,"target":36,"value":2},{"source":37,"target":11,"value":2},{"source":37,"target":29,"value":1},{"source":38,"target":34,"value":2},{"source":38,"target":35,"value":2},{"source":38,"target":36,"value":2},{"source":38,"target":37,"value":2},{"source":38,"target":11,"value":2},{"source":38,"target":29,"value":1},{"source":39,"target":25,"value":1},{"source":40,"target":25,"value":1},{"source":41,"target":24,"value":2},{"source":41,"target":25,"value":3},{"source":42,"target":41,"value":2},{"source":42,"target":25,"value":2},{"source":42,"target":24,"value":1},{"source":43,"target":11,"value":3},{"source":43,"target":26,"value":1},{"source":43,"target":27,"value":1},{"source":44,"target":28,"value":3},{"source":44,"target":11,"value":1},{"source":45,"target":28,"value":2},{"source":47,"target":46,"value":1},{"source":48,"target":47,"value":2},{"source":48,"target":25,"value":1},{"source":48,"target":27,"value":1},{"source":48,"target":11,"value":1},{"source":49,"target":26,"value":3},{"source":49,"target":11,"value":2},{"source":50,"target":49,"value":1},{"source":50,"target":24,"value":1},{"source":51,"target":49,"value":9},{"source":51,"target":26,"value":2},{"source":51,"target":11,"value":2},{"source":52,"target":51,"value":1},{"source":52,"target":39,"value":1},{"source":53,"target":51,"value":1},{"source":54,"target":51,"value":2},{"source":54,"target":49,"value":1},{"source":54,"target":26,"value":1},{"source":55,"target":51,"value":6},{"source":55,"target":49,"value":12},{"source":55,"target":39,"value":1},{"source":55,"target":54,"value":1},{"source":55,"target":26,"value":21},{"source":55,"target":11,"value":19},{"source":55,"target":16,"value":1},{"source":55,"target":25,"value":2},{"source":55,"target":41,"value":5},{"source":55,"target":48,"value":4},{"source":56,"target":49,"value":1},{"source":56,"target":55,"value":1},{"source":57,"target":55,"value":1},{"source":57,"target":41,"value":1},{"source":57,"target":48,"value":1},{"source":58,"target":55,"value":7},{"source":58,"target":48,"value":7},{"source":58,"target":27,"value":6},{"source":58,"target":57,"value":1},{"source":58,"target":11,"value":4},{"source":59,"target":58,"value":15},{"source":59,"target":55,"value":5},{"source":59,"target":48,"value":6},{"source":59,"target":57,"value":2},{"source":60,"target":48,"value":1},{"source":60,"target":58,"value":4},{"source":60,"target":59,"value":2},{"source":61,"target":48,"value":2},{"source":61,"target":58,"value":6},{"source":61,"target":60,"value":2},{"source":61,"target":59,"value":5},{"source":61,"target":57,"value":1},{"source":61,"target":55,"value":1},{"source":62,"target":55,"value":9},{"source":62,"target":58,"value":17},{"source":62,"target":59,"value":13},{"source":62,"target":48,"value":7},{"source":62,"target":57,"value":2},{"source":62,"target":41,"value":1},{"source":62,"target":61,"value":6},{"source":62,"target":60,"value":3},{"source":63,"target":59,"value":5},{"source":63,"target":48,"value":5},{"source":63,"target":62,"value":6},{"source":63,"target":57,"value":2},{"source":63,"target":58,"value":4},{"source":63,"target":61,"value":3},{"source":63,"target":60,"value":2},{"source":63,"target":55,"value":1},{"source":64,"target":55,"value":5},{"source":64,"target":62,"value":12},{"source":64,"target":48,"value":5},{"source":64,"target":63,"value":4},{"source":64,"target":58,"value":10},{"source":64,"target":61,"value":6},{"source":64,"target":60,"value":2},{"source":64,"target":59,"value":9},{"source":64,"target":57,"value":1},{"source":64,"target":11,"value":1},{"source":65,"target":63,"value":5},{"source":65,"target":64,"value":7},{"source":65,"target":48,"value":3},{"source":65,"target":62,"value":5},{"source":65,"target":58,"value":5},{"source":65,"target":61,"value":5},{"source":65,"target":60,"value":2},{"source":65,"target":59,"value":5},{"source":65,"target":57,"value":1},{"source":65,"target":55,"value":2},{"source":66,"target":64,"value":3},{"source":66,"target":58,"value":3},{"source":66,"target":59,"value":1},{"source":66,"target":62,"value":2},{"source":66,"target":65,"value":2},{"source":66,"target":48,"value":1},{"source":66,"target":63,"value":1},{"source":66,"target":61,"value":1},{"source":66,"target":60,"value":1},{"source":67,"target":57,"value":3},{"source":68,"target":25,"value":5},{"source":68,"target":11,"value":1},{"source":68,"target":24,"value":1},{"source":68,"target":27,"value":1},{"source":68,"target":48,"value":1},{"source":68,"target":41,"value":1},{"source":69,"target":25,"value":6},{"source":69,"target":68,"value":6},{"source":69,"target":11,"value":1},{"source":69,"target":24,"value":1},{"source":69,"target":27,"value":2},{"source":69,"target":48,"value":1},{"source":69,"target":41,"value":1},{"source":70,"target":25,"value":4},{"source":70,"target":69,"value":4},{"source":70,"target":68,"value":4},{"source":70,"target":11,"value":1},{"source":70,"target":24,"value":1},{"source":70,"target":27,"value":1},{"source":70,"target":41,"value":1},{"source":70,"target":58,"value":1},{"source":71,"target":27,"value":1},{"source":71,"target":69,"value":2},{"source":71,"target":68,"value":2},{"source":71,"target":70,"value":2},{"source":71,"target":11,"value":1},{"source":71,"target":48,"value":1},{"source":71,"target":41,"value":1},{"source":71,"target":25,"value":1},{"source":72,"target":26,"value":2},{"source":72,"target":27,"value":1},{"source":72,"target":11,"value":1},{"source":73,"target":48,"value":2},{"source":74,"target":48,"value":2},{"source":74,"target":73,"value":3},{"source":75,"target":69,"value":3},{"source":75,"target":68,"value":3},{"source":75,"target":25,"value":3},{"source":75,"target":48,"value":1},{"source":75,"target":41,"value":1},{"source":75,"target":70,"value":1},{"source":75,"target":71,"value":1},{"source":76,"target":64,"value":1},{"source":76,"target":65,"value":1},{"source":76,"target":66,"value":1},{"source":76,"target":63,"value":1},{"source":76,"target":62,"value":1},{"source":76,"target":48,"value":1},{"source":76,"target":58,"value":1}]} \ No newline at end of file -- 2.43.0