Skip to content

Instantly share code, notes, and snippets.

@AndreasMadsen AndreasMadsen/graph.json
Last active Aug 29, 2015

Embed
What would you like to do?
bug in chrome?
[{"group":4097, "nodes":[["Qualcomm Boosts Stock Buyback Plan, Dividend",5,5280]], "links":[]},
{"group":4098, "nodes":[["Jeffrey Immelt Aims to Assure Investors by Buying Company Stock",5,5281]], "links":[]},
{"group":11786, "nodes":[["The World's Riskiest Stock Market?",5,15376]], "links":[]},
{"group":20494, "nodes":[["Fidelity Investments Creating New Stock-Trading Venue",5,26784]], "links":[]},
{"group":19475, "nodes":[["Investors lose taste for Just Eat as tech stocks slide",2,25699],["Investors lose taste for Just Eat as tech stocks slide",2,25701],["Just Eat causes indigestion as shares fall below listing price",2,25454],["Just Eat causes indigestion as shares fall below listing price",2,25458],["Just Eat causes indigestion as shares fall below listing price",2,25464],["Investors lose taste for Just Eat as tech stocks slide",2,25688]], "links":[[25699,25701,0.0042186519],[25454,25701,0.0522736423],[25454,25699,0.0552179068],[25454,25688,0.0549006723],[25454,25464,0.0005187572],[25454,25458,0.0014800412],[25458,25701,0.0523254015],[25458,25699,0.0552439466],[25458,25688,0.054951027],[25458,25464,0.0009886674],[25464,25701,0.052305121],[25464,25699,0.0552433021],[25464,25688,0.0549338497],[25688,25701,0.0036181512],[25688,25699,0.0014195025]]},
{"group":15892, "nodes":[["U.K.'s Wheatley Says He Takes Responsibility After Rout in Insurance Stocks",5,20856]], "links":[]},
{"group":22039, "nodes":[["Retired teacher made \u00a31million in secret on the stock market",2,33421],["Retired teacher \u00a31million in secret on the stock market",2,33335]], "links":[[33335,33421,0.021288367]]},
{"group":19480, "nodes":[["Market report: Stock Spirits falls as owner sells out",2,25462]], "links":[]},
{"group":4633, "nodes":[["Stockbrokers Fail to Disclose Red Flags",5,5968]], "links":[]},
{"group":18461, "nodes":[["Singapore Stock Probe Highlights Firms' Ties",5,24274],["Singapore Stock Probe Highlights Firms' Ties",5,24134]], "links":[[24134,24274,0.0282209925]]},
{"group":18474, "nodes":[["Stock Buybacks Abound, but Come at a Price",5,24272],["Stock Buybacks Abound, but Come at a Price",5,24156]], "links":[[24156,24272,0.0055179521]]},
{"group":28717, "nodes":[["Twitter shares slump as stock 'lock-up' ends",2,41980]], "links":[]},
{"group":7726, "nodes":[["Australian Stocks Move Up on Strong Employment Numbers",5,10004],["Australian Stocks Move Up on Strong Employment Numbers",5,9997]], "links":[[9997,10004,0.0042038411]]},
{"group":17457, "nodes":[["The misty world of marijuana stocks",3,22852]], "links":[]},
{"group":10290, "nodes":[["Airline Stocks Are Looking Up Again",5,13362],["Airline Stocks Are Looking Up Again",5,13364]], "links":[[13362,13364,0.0036018502]]},
{"group":16949, "nodes":[["How High-Frequency Stock Trader Quantlab Guarded Its Algorithms",5,22212]], "links":[]},
{"group":9274, "nodes":[["Stock Futures Lower After Crimea Vote",5,12011]], "links":[]},
{"group":17468, "nodes":[["Value Stocks Head Higher as Growth Companies Look Pricey",5,22867]], "links":[]},
{"group":17475, "nodes":[["Value Stocks Head Higher as Growth Companies Look Pricey",5,22876]], "links":[]},
{"group":29766, "nodes":[["Stocks rose on Thursday after an upbeat report from the labor market, bringing the Dow Jones Industrial Average close to an all-time high.",5,43323]], "links":[]},
{"group":2640, "nodes":[["Stocks Drop for Third Straight Session",5,9601],["Stocks Edge Lower in Choppy Trade",5,9091],["Stock Futures Edge Up Ahead of Jobless-Claims Data",5,6289],["NEW YORK\u0097U.S. stock futures edged higher, but the gains shrank after data showing private-sector job growth fell short of forecasts.",5,5656],["Global Stocks Rally on Easing Ukraine Tensions",5,5017],["Global Stocks Rally, Pushing S&P 500 to Record",5,5273],["U.S. Stocks Falter in Choppy Trade",5,7067],["Asian Shares Up as Ukraine Tensions Ease",5,5405],["Tokyo Stocks Tumble Almost 3%",5,10660],["U.S. Stock Futures Down Sharply",5,4397],["Asian Markets Calmer After Ukraine-Inspired Selloff",5,5302],["European Stock Markets Edge Higher Ahead of ECB",5,6205],["NEW YORK\u0097U.S. stock futures held gains Thursday after data showed weekly jobless claims fell slightly more than expected.",5,6336],["European Stock Markets Edge Higher Ahead of ECB",5,6208],["U.S. Stock Futures Trade Little Changed",5,8906],["Stocks advanced on Thursday after upbeat U.S. economic readings overshadowed disappointing data from China.",5,10318],["Asian Markets Calmer After Ukraine-Inspired Selloff",5,4696],["Chinese Trade Weakens Asian Stocks",5,8025],["Asian Shares Gain Ahead of U.S. Jobs Report",5,6622],["European Stocks Edge Lower",5,8161],["Asian Shares Fall on Concerns Over China",5,9317],["Asian Shares Gain Ahead of U.S. Jobs Report",5,6630],["Stock Futures Edge Up Ahead of Data",5,5608],["Stocks advanced on Thursday after upbeat U.S. economic readings overshadowed disappointing data from China.",5,10344],["Stocks Rally, Extending Record Run for S&P 500",5,3434],["Chinese Trade Weakens Asian Stocks",5,8041],["European Stocks Edge Lower",5,8171],["Asian Shares Up as Ukraine Tensions Ease",5,5357],["European Stocks Recover in Early Trading",5,8827],["U.S. Stocks Falter in Choppy Trade",5,7037],["Tokyo Stocks Tumble to Three-Week Low",5,10622]], "links":[[9601,10344,0.0881380513],[9601,10318,0.088178739],[9091,10622,0.0776350275],[9091,10344,0.0862474516],[9091,10318,0.0862052813],[6289,9601,0.0788495988],[6289,7067,0.0980404466],[6289,7037,0.0814416856],[6289,6336,0.0585351922],[5656,7067,0.0996107385],[5017,5273,0.0755341575],[7067,10622,0.0927856043],[7067,9091,0.0997012332],[5405,7037,0.0986031368],[5405,5656,0.099066548],[5405,5608,0.0758646801],[4397,7037,0.0957943499],[4397,6289,0.0940531418],[6205,7067,0.0946400017],[6205,6208,0.0271407943],[6208,7067,0.0955206081],[8906,10344,0.092425324],[8906,10318,0.0923758671],[8906,9601,0.0711822808],[8906,9091,0.0974690467],[10318,10622,0.0907121673],[10318,10344,0.0002775176],[4696,6630,0.090108335],[4696,6622,0.0899145082],[4696,5302,0.0487596467],[4696,5017,0.0897676572],[8025,9317,0.0839579999],[8025,8041,0.0012935596],[6622,8906,0.0959127843],[6622,8827,0.0862365291],[6622,8171,0.0824021846],[6622,8161,0.0818499103],[6622,6630,0.0015184444],[8161,10660,0.0899962634],[8161,8906,0.0946489871],[8161,8171,0.0080669718],[9317,10622,0.088131018],[9317,10344,0.0977968946],[9317,10318,0.0977918804],[6630,10660,0.087736465],[6630,8906,0.0948256776],[6630,8827,0.0859503746],[6630,8171,0.0823176578],[6630,8161,0.0816713646],[5608,7037,0.0846201554],[5608,6289,0.0889459848],[5608,5656,0.0813085064],[10344,10622,0.0907923952],[3434,6336,0.0948502049],[3434,6289,0.0833507925],[3434,5608,0.098199755],[8041,9317,0.0840955079],[8171,10660,0.0875742063],[8171,8906,0.0985954851],[5357,7037,0.0990735665],[5357,5656,0.0997914746],[5357,5608,0.0761302263],[5357,5405,0.0012304002],[8827,10622,0.0892568976],[8827,10344,0.0872713402],[8827,10318,0.0871394798],[8827,9091,0.0941204727],[8827,8906,0.0926473513],[7037,10622,0.0931397527],[7037,10344,0.0992846936],[7037,10318,0.0993007272],[7037,9601,0.0954245999],[7037,9317,0.0880797729],[7037,7067,0.0559574552]]},
{"group":16980, "nodes":[["Snog, Marry, Avoid: a new stock-picking technique?",2,22246]], "links":[]},
{"group":8790, "nodes":[["Stock markets soar, endowment returns tumble",2,11390],["Stock markets soar, endowment returns tumble",2,11423]], "links":[[11390,11423,0.0035713939]]},
{"group":12376, "nodes":[["Asian Stock Markets End Higher",5,16151]], "links":[]},
{"group":12381, "nodes":[["Asian Stock Markets End Higher",5,16157]], "links":[]},
{"group":25701, "nodes":[["Europe Stocks Dip Slightly Ahead of Inflation Data",5,38121],["Europe Stocks Dip Slightly Ahead of Inflation Data",5,38107]], "links":[[38107,38121,0.0141083058]]},
{"group":15974, "nodes":[["Stock Investors Seek Clues to Uncertain Markets",5,20955]], "links":[]},
{"group":20070, "nodes":[["Ally Prices Stock Offering at Low End of Guidance",5,26233]], "links":[]},
{"group":26727, "nodes":[["Retirement Investors Flock Back to Stocks",5,39409],["Retirement Investors Flock Back to Stocks",5,39435]], "links":[[39409,39435,0.0067799115]]},
{"group":28776, "nodes":[["Twitter Stock Drops Over 17%",1,42043]], "links":[]},
{"group":33388, "nodes":[["What's Ahead for AT&T's Stock Price?",5,31645]], "links":[]},
{"group":23662, "nodes":[["U.S. stocks fell Friday as escalating tensions between Russia and Ukraine as well as mixed earnings news put investors on edge.",5,35415]], "links":[]},
{"group":8821, "nodes":[["Plea for blood donors as stocks hit four-year low",3,11434]], "links":[]},
{"group":4729, "nodes":[["'Carbon bubble' threatens stock markets, say MPs",3,6086]], "links":[]},
{"group":31865, "nodes":[["Stockbroker Records to Receive More Scrutiny",5,29664],["Stockbroker Records to Receive More Scrutiny",5,29742]], "links":[[29664,29742,0.0022997607]]},
{"group":26745, "nodes":[["Japan, Australia Stocks Lead Asia Lower",5,39437],["Japan, Australia Stocks Lead Asia Lower",5,39430]], "links":[[39430,39437,0.0008418563]]},
{"group":15998, "nodes":[["European Stocks Rise on China Data, Dovish Fed Comments",5,20993],["European Stocks Rise on China Data, Dovish Fed Comments",5,20981]], "links":[[20981,20993,0.0074046487]]},
{"group":20612, "nodes":[["Stocks' Skid Dents Hot IPO Market",5,27003],["Stocks' Skid Dents Hot IPO Market",5,26940]], "links":[[26940,27003,0.0026289725]]},
{"group":12936, "nodes":[["Stockton pound pub gets mixed response",3,16923]], "links":[]},
{"group":5259, "nodes":[["Dollar Slumps Against Euro, Stocks Steady Despite Chinese Data",5,10216],["Dollar Slumps Against Euro, Stocks Steady Despite Chinese Data",5,10135],["European Stocks Fall",5,6805],["European Stocks Fall",5,6791]], "links":[[10135,10216,0.0001313184],[6805,10216,0.0996747985],[6805,10135,0.0996441096],[6791,10216,0.0998890102],[6791,10135,0.0998587087],[6791,6805,0.0186225791]]},
{"group":18571, "nodes":[["Asian Shares Down as Tech Stocks Fall",5,24287]], "links":[]},
{"group":18065, "nodes":[["Tehran Stock Exchange Officials to Visit London",5,23649],["Tehran Stock Exchange Officials to Visit London",5,23631]], "links":[[23631,23649,0.0519864261]]},
{"group":20115, "nodes":[["Opening the Box on Tech Stocks' Next Move",5,26315],["Opening the Box on Tech Stocks' Next Move",5,26285]], "links":[[26285,26315,0.0814967453]]},
{"group":14484, "nodes":[["European Stocks Rise, Euro Falls After Spain Slips Into Deflation",5,19020]], "links":[]},
{"group":24216, "nodes":[["Brown bears ravage livestock in Italy's South Tirol region",2,36162],["Farmers in Italy's South Tirol region want an end to bear hunting ban",2,36103],["Farmers in Italy's South Tirol region want an end to bear hunting ban",2,36109],["Brown bears ravage livestock in Italy's South Tirol region",2,36110],["Farmers in Italy's South Tyrol region want an end to bear hunting ban",2,36239],["Farmers in Italy's South Tyrol region want an end to bear hunting ban",2,36240]], "links":[[36162,36240,0.0197285619],[36162,36239,0.0189108029],[36103,36240,0.000641653],[36103,36239,0.0011160953],[36103,36162,0.0194277577],[36103,36110,0.0189582817],[36103,36109,0.0018889597],[36109,36240,0.0024592176],[36109,36239,0.0007760779],[36109,36162,0.0186038371],[36109,36110,0.0182174072],[36110,36240,0.019229902],[36110,36239,0.0184879564],[36110,36162,0.0011106526],[36239,36240,0.0016900741]]},
{"group":8346, "nodes":[["Stocks Sink on Ukraine, Russia Jitters",5,10840],["Ukraine Jitters Push European Stocks to Five-Week Low",5,10803]], "links":[[10803,10840,0.070291236]]},
{"group":12955, "nodes":[["European Stocks Extend Rally on Stimulus Hopes",5,17664],["European Stocks Close Higher",5,16953],["European Stocks Close Higher",5,16971],["European Stocks Extend Rally on Stimulus Hopes",5,17679]], "links":[[17664,17679,0.0030584587],[16953,17679,0.0820977166],[16953,17664,0.081464842],[16953,16971,0.0040726312],[16971,17679,0.0829876289],[16971,17664,0.0823086351]]},
{"group":18075, "nodes":[["Stock market flotation prices are ridiculous, warns Questor",2,23668],["Stock market flotation prices are ridiculous, warns Questor",2,23646]], "links":[[23646,23668,0.0279936772]]},
{"group":33949, "nodes":[["Tech-Stock Slide Hurts Demand for IPOs",5,32346],["Tech-Stock Slide Hurts Demand for IPOs",5,32391]], "links":[[32346,32391,0.0117232818]]},
{"group":7326, "nodes":[["European Stocks Lower as China Concerns Continue",5,9464],["European Stocks Lower as China Concerns Continue",5,9446]], "links":[[9446,9464,0.0146279177]]},
{"group":15519, "nodes":[["European Stocks Edge Higher; Euro Slightly Weaker",5,20360],["European Stocks Edge Higher; Euro Slightly Weaker",5,20403]], "links":[[20360,20403,0.0006535049]]},
{"group":10406, "nodes":[["U.K. Stocks Slide on Pensions Ruling",5,13512],["U.K. Stocks Slide on Pensions Ruling",5,13524]], "links":[[13512,13524,0.0002425044]]},
{"group":20647, "nodes":[["Biotech Stocks' Rout Perplexes Analysts",5,26981]], "links":[]},
{"group":28329, "nodes":[["SEC Sues Consultant, Others for Alleged Stock Manipulation",5,41467]], "links":[]},
{"group":31407, "nodes":[["Stockbrokers Who Fail Test Have Checkered Records",5,29064]], "links":[]},
{"group":4272, "nodes":[["The strong performing 'quality income' stocks to replace Vodafone",2,5504],["The strong performing 'quality income' stocks to replace Vodafone",2,5612]], "links":[[5504,5612,0.0009885726]]},
{"group":31410, "nodes":[["Stockbrokers Who Fail Test Have Checkered Records",5,29068]], "links":[]},
{"group":30899, "nodes":[["Stock-Market Jitters Put Investors at Ease",5,28408],["Stock-Market Jitters Put Investors at Ease",5,28437]], "links":[[28408,28437,0.0382272117]]},
{"group":21684, "nodes":[["Investment banks are slugging it out over stock trading.",5,32881],["Investment banks are slugging it out over stock trading.",5,32922]], "links":[[32881,32922,0.0481362566]]},
{"group":6325, "nodes":[["Asian Stocks Fall on Weak Chinese Trade Data",1,8167]], "links":[]},
{"group":28340, "nodes":[["Einhorn Sends Athenahealth Stock Reeling",5,41481]], "links":[]},
{"group":28851, "nodes":[["Stanford to Purge $18 Billion Endowment of Coal Stock",1,42144]], "links":[]},
{"group":22717, "nodes":[["Apple Increases Earnings, Stock Buyback",5,34202]], "links":[]},
{"group":30912, "nodes":[["Stocks Stumble, but Hope Lingers",5,28425]], "links":[]},
{"group":28355, "nodes":[["Sydney Stocks Up Before RBA Decision",5,41498]], "links":[]},
{"group":31944, "nodes":[["Goldman Moves to Energize Stock Trading",5,29763]], "links":[]},
{"group":21193, "nodes":[["Why are tech stocks sliding?",3,27721]], "links":[]},
{"group":27848, "nodes":[["Warren Buffett and Charlie Munger wow the Woodstock of capitalism",2,40864]], "links":[]},
{"group":30923, "nodes":[["Stocks Stumble, but Hope Lingers",5,28436]], "links":[]},
{"group":28874, "nodes":[["Japanese Stocks Dragged by Stronger Yen",5,42174]], "links":[]},
{"group":21199, "nodes":[["Stockport vicar arrested over alleged rape of teenager",3,27728]], "links":[]},
{"group":3280, "nodes":[["Ukraine Crisis Roils Global Markets",5,4213],["Pressure Eases on Ruble, Russian Stocks",5,5454]], "links":[[4213,5454,0.0999603048]]},
{"group":31953, "nodes":[["Goldman Moves to Energize Stock Trading",5,29772]], "links":[]},
{"group":4818, "nodes":[["Stockwell fire blamed on bird carrying lit cigarette",3,6226]], "links":[]},
{"group":5842, "nodes":[["Questor share tip: Aggreko a questionable stock",2,7559]], "links":[]},
{"group":9427, "nodes":[["Europe Stocks Rise After Milder Than Expected Sanctions Against Russia",5,12217],["Europe Stocks Rise After Milder Than Expected Sanctions Against Russia",5,12227]], "links":[[12217,12227,0.0011056486]]},
{"group":29907, "nodes":[["U.S. Stocks Edge Higher",5,43492]], "links":[]},
{"group":27863, "nodes":[["The fastest start on record for corporate takeovers is providing fuel for a stock market stuck in low gear.",5,40977],["The fastest start on record for corporate takeovers is providing fuel for a stock market stuck in low gear.",5,40883]], "links":[[40883,40977,0.0492256656]]},
{"group":20185, "nodes":[["Hairdressing horrors: why do we women fall victim to Salon Stockholm Syndrome?",2,26432],["Hairdressing horrors: why do we women fall victim to Salon Stockholm Syndrome?",2,26375]], "links":[[26375,26432,0.0023881441]]},
{"group":26330, "nodes":[["U.K. Stocks Buoyed by Strong Manufacturing Data, Lloyds' Results",5,38915]], "links":[]},
{"group":17627, "nodes":[["The highest-yielding stock market in the world? Czech Republic",2,23068]], "links":[]},
{"group":27869, "nodes":[["Pendulum swings against 'super-growth\u0092 stocks as Aim loses ground",2,40891]], "links":[]},
{"group":31455, "nodes":[["Key Twitter Shareholders Vow Not to Sell Stock",5,29117]], "links":[]},
{"group":16615, "nodes":[["European Stocks Rise as Ruble Weakens",5,21796]], "links":[]},
{"group":29423, "nodes":[["U.S. Stocks Rise, but Nasdaq Drops",5,42888]], "links":[]},
{"group":9456, "nodes":[["Just Eat set for \u00a3100m float on London Stock Exchange",3,12255]], "links":[]},
{"group":22768, "nodes":[["Apple Boosts Buyback, Splits Stock to Reward Investors",5,34259]], "links":[]},
{"group":33012, "nodes":[["Stocks in Tokyo, Seoul Rise in Early Trade",5,31159]], "links":[]},
{"group":18173, "nodes":[["Nasdaq tumbles as investor dump tech stocks",2,23764]], "links":[]},
{"group":6399, "nodes":[["Stock Futures Slip on Weak China Data",5,8280],["Stock Futures Slip on Weak China Data",5,8297],["U.S. Losses Push Asian Shares Lower",5,9274]], "links":[[8280,9274,0.0989460498],[8280,8297,0.0006206963],[8297,9274,0.0988944396]]},
{"group":34051, "nodes":[["Madness of easy money and momentum stocks is crushing the unwary",2,32474]], "links":[]},
{"group":14084, "nodes":[["London Stock Exchange reports 91pc jump in capital raised",2,18476]], "links":[]},
{"group":13061, "nodes":[["Kim Dotcom's Mega to list on NZ stock market",3,17105]], "links":[]},
{"group":11526, "nodes":[["Sainsbury's worth half of stock market value, Goldman Sachs warns",2,15000],["Sainsbury's worth half of stock market value, Goldman Sachs warns",2,15006]], "links":[[15000,15006,0.0043270602]]},
{"group":20231, "nodes":[["Japan Pushes Plan to Stockpile Plutonium, Despite Proliferation Risks",1,26427]], "links":[]},
{"group":13576, "nodes":[["U.S. Stocks End Broadly Lower",5,17803],["U.S. Stocks End Broadly Lower",5,17855]], "links":[[17803,17855,0.012422462]]},
{"group":28419, "nodes":[["Apple Retail Chief Ahrendts Granted $68 Million in Restricted Stock",5,41573]], "links":[]},
{"group":8458, "nodes":[["European Markets Steadying After Last Week's Heavy Losses",5,29188],["Asian Shares Rise on Wall Street's Cue",5,21513],["Asia Shares Buoyant Despite Fall in Japan Stocks",5,25609],["European Shares Under Pressure After Sharp Selloff on Wall Street",5,27150],["Asia Shares Buoyant Despite Fall in Japan Stocks",5,25618],["Stocks Open Nearly Flat",5,26649],["U.S. Stocks Edge Higher",5,33306],["Stronger Earnings Give Equity Markets a Lift",5,37407],["European Markets Steadying After Last Week's Heavy Losses",5,29219],["S&P 500 Notches Another Record; Dow Just Misses",5,22059],["Asian Shares Slip Before Fed Review",5,13374],["Stocks Fall on Tech, Biotech Selloff",5,24642],["Stronger Earnings Give Equity Markets a Lift",5,37442],["Wall Street Declines Weigh on Asia",5,34372],["Stock Futures Edge Higher on Jobs Data",5,30789],["Asian Shares Slip Before Fed Review",5,13385],["Stocks Finish Higher After Upbeat Data",5,14410],["Dow Hits Intraday Record High",5,22606],["U.S. Stocks Decline",5,16468],["Tech Sector Steers Stocks Down",5,26709],["Asian Shares Higher on U.S. Data",5,17495],["U.S. Stocks Jump; Crimea Vote Fails to Stir Markets",5,12380],["Asian Shares Higher Before China Data",5,29788],["U.S. Stocks End Slightly Lower",5,18529],["Stocks Finish Higher After Upbeat Data",5,14442],["Europe's Stocks Close Higher as Greece Returns to Market",5,26218],["Stocks Turn Lower; Nasdaq Drops Sharply",5,42607],["U.S. Stock Futures Hover Near Record",5,33910],["U.S. Stocks Rise on Pfizer Offer for AstraZeneca",5,36983],["U.S. Stocks End Lower",5,40054],["U.S. Stocks Turn Mostly Higher",5,30861],["Tokyo Shares Rise After Dollar Jump",5,32910],["U.S. stocks rallied for a second-straight session Tuesday, bringing the S&P 500 within a fraction of another record high.",5,12945],["Tokyo Shares Rise After Dollar Jump",5,32921],["Tokyo Stocks Focused on Earnings",5,34976],["Emerging-Market Currencies Continue Rally",5,25761],["U.S. Stocks Fall on Mixed Earnings News",5,35488],["Asian Shares Tread Water Before Jobs Report",5,22187],["Shares in Japan Rebound",5,26284],["U.S. Stocks End Slightly Lower",5,18611],["Shares in Japan Rebound",5,26294],["U.S. stocks rallied for a second-straight session Tuesday, bringing the S&P 500 within a fraction of another record high.",5,12982],["S&P 500 Sets New Intraday Record High",5,21183],["Stocks Fall After Data, Earnings",5,33984],["Emerging-Market Currencies Continue Rally",5,25793],["U.S. Stocks End Lower",5,15043],["Blue Chips Log Worst Weekly Loss Since January",5,10952],["U.S. Stocks Gain Broadly",5,30408],["U.S. Stocks Close Higher",5,19149],["U.S. Stocks Post Slight Gains",5,25294],["Stocks Rise, Snapping Two-Session Slide",5,17106],["Stocks Search for Direction",5,27346],["U.S. Stocks Post Slight Gains",5,25307],["European Shares Rise on China Growth Data",5,29917],["Stocks Rise, Snapping Two-Session Slide",5,17121],["U.S. Stocks End Lower",5,15073],["Tech Stocks Slump Across Asia",5,24297],["U.S. Stock Futures Edge Higher",5,29421],["Stocks Mostly Down, Tech-Heavy Nasdaq Under Pressure",5,27375],["U.S. Stocks Rise on Upbeat Earnings",5,37616],["European Shares End Lower on Signs of a Slowing Economy in China",5,16624],["Asian Markets Fall on Concerns That U.S. Interest Rates May Rise",5,14072],["European Shares Rise on China Growth Data",5,29946],["Asian Shares Mixed, Nikkei Pulls Back",5,30465],["Yen Rises, Tokyo Stocks Ease On Crimea Vote",5,12043],["U.S. Stocks Close Higher",5,19218],["Stocks Retreat as High-Growth Tech Shares Slide",5,24851],["Asian Shares Mixed, Nikkei Pulls Back",5,30488],["Stocks Turn Lower After Hitting Intraday Records",5,23324],["Yen Rises, Tokyo Stocks Ease On Crimea Vote",5,12061],["Stock Futures Add to Gains on Durable-Goods Data",5,34588],["Japanese Stocks Stabilize, Asian Markets Mixed",5,28450],["Blue Chips Log Worst Weekly Loss Since January",5,11044],["European Markets Steady Ahead of ECB Meeting",5,22315],["U.S. Stocks Rise",5,29492],["European Markets Steady Ahead of ECB Meeting",5,22326],["U.S. Stocks Erase Earlier Losses",5,41272],["Asian Shares Higher, Bolstered by Wall Street",5,33595],["Asian Shares Higher, Bolstered by Wall Street",5,33606],["Asian Shares Lower Ahead of U.S. Jobs Data",5,22861],["European Shares Retreat From Six-Year Highs",5,24399],["European Stock Markets Move Higher",5,26449],["Asian Shares Lower Ahead of U.S. Jobs Data",5,22868],["Fed Comments Spook Investors; Shares Fall",5,13653],["U.S. Stocks Open Higher",5,25943],["Fed Comments Spook Investors; Shares Fall",5,13664],["U.S. Stocks Erase Earlier Losses",5,41315],["Nikkei Falls to 2014 Low After Wall Street Selloff",5,26980],["European Shares Retreat From Six-Year Highs",5,24425],["Asian Shares Lower, Japan Leads Losses",5,24941],["U.S. Stocks Edge Higher",5,21872],["European Stock Markets Move Higher",5,26482],["Nasdaq Composite Leads Market Lower",5,23419],["Upbeat U.S. Data Lifts European Markets",5,14209],["U.S. Stocks Advance",5,37773],["S&P 500 Closes at Record High",5,21390],["Asian Shares Rise as Ukraine Concerns Recede",5,12688],["U.S. Stocks Edge Higher",5,32660],["Asian Shares Rise on China Manufacturing Data",5,20889],["Upbeat U.S. Data Lifts European Markets",5,14235],["U.S. Stocks Open Higher",5,26015],["Most Asian Shares Move Higher",5,24994],["U.S. Stock Futures Pare Gains After Housing Data Disappoint",5,30115],["European Shares End Lower on Signs of a Slowing Economy in China",5,16295],["Asian Shares Rise on China Manufacturing Data",5,20907],["Banks Lead U.K. Shares Lower",5,18356],["Asian Shares Mostly Higher",5,18881],["European Shares Fall After Disappointing French Data",5,33730],["U.S. Stock Futures Trade Flat",5,33221],["Asian Shares Mostly Higher",5,18886],["Banks Lead U.K. Shares Lower",5,18387],["Nikkei Falls to 2014 Low After Wall Street Selloff",5,27099],["Wall Street Declines Weigh on Asia",5,34271],["U.S. Stocks Waver",5,39910],["Dow Hits Intraday Record High",5,22507],["U.S. Stocks Rise on Pfizer Offer for AstraZeneca",5,36850],["European Shares Under Pressure After Sharp Selloff on Wall Street",5,27126]], "links":[[29188,29219,0.0077870083],[21513,24994,0.0859576538],[25609,29421,0.0903139785],[25609,25793,0.0905615464],[25609,25761,0.0913459435],[25609,25618,0.018928336],[27150,30408,0.0916270018],[27150,30115,0.0705320984],[27150,29946,0.0973476917],[27150,29917,0.097378917],[27150,29492,0.0925164893],[27150,27375,0.0980956778],[27150,27346,0.0864562318],[25618,29421,0.0904332697],[25618,25793,0.0904956385],[25618,25761,0.0912675187],[26649,30408,0.0912836418],[26649,27375,0.0847609043],[26649,27346,0.0880085006],[33306,36850,0.0633151755],[33306,35488,0.0981279016],[33306,34372,0.0929459706],[33306,34271,0.0929379091],[33306,33984,0.0766562223],[33306,33910,0.0802093148],[37407,40054,0.0976077467],[37407,37442,0.0001206669],[22059,25943,0.0952984244],[22059,24642,0.0903650597],[13374,13385,0.0198852532],[24642,27375,0.0876896679],[24642,27346,0.0928703249],[24642,26649,0.0670213997],[24642,26294,0.0881700888],[24642,26284,0.0883232355],[24642,26218,0.0792486593],[24642,26015,0.0912558138],[24642,25943,0.0687944666],[37442,40054,0.0975895599],[34372,36983,0.099626869],[34372,36850,0.0748794004],[30789,34588,0.0454085283],[30789,32921,0.0854846686],[30789,32910,0.0854713321],[30789,30861,0.08861655],[13385,14072,0.0972958803],[14410,23419,0.098107785],[14410,23324,0.0957733095],[14410,21872,0.0817238092],[14410,18611,0.07684201],[14410,18529,0.0765707046],[14410,14442,0.0014151069],[22606,26649,0.0993029773],[22606,26015,0.0887662247],[22606,25943,0.0942159891],[22606,24425,0.0992255658],[22606,24399,0.096372813],[16468,22606,0.0735978484],[16468,22507,0.0804740116],[16468,19218,0.0997547433],[16468,19149,0.097789757],[16468,17495,0.0925066695],[26709,30861,0.0825163871],[26709,30465,0.0863713324],[26709,29492,0.0975636393],[26709,29421,0.0675306544],[26709,27099,0.0825547948],[26709,26980,0.09154661],[17495,22606,0.0896484926],[17495,18387,0.0939299688],[17495,18356,0.0939782709],[12380,18387,0.097162053],[12380,18356,0.0971344709],[12380,13385,0.0903756097],[12380,13374,0.0974253044],[18529,23419,0.0899253264],[18529,22606,0.0952270329],[18529,22507,0.0968885496],[18529,22059,0.0943793282],[18529,21872,0.0578977428],[18529,21390,0.0905445218],[18529,19218,0.0972099528],[18529,19149,0.0974093154],[18529,18611,0.0186375901],[14442,23419,0.098208636],[14442,23324,0.0962575823],[14442,21872,0.0817383826],[14442,18611,0.0770595893],[14442,18529,0.0766994357],[26218,26649,0.0852679461],[33910,36983,0.0873090327],[33910,36850,0.0745294094],[33910,34372,0.0810193494],[33910,34271,0.0811116174],[33910,33984,0.0670417696],[36983,40054,0.0923218951],[36983,39910,0.0683586746],[30861,34588,0.0715944394],[32910,32921,0.002013803],[12945,15073,0.0878860503],[12945,15043,0.0903460458],[12945,12982,0.0002111918],[34976,37616,0.0817508101],[25761,25793,0.0031937137],[35488,36983,0.0839495659],[35488,36850,0.0950821936],[22187,26284,0.097677879],[26284,29788,0.0973097682],[26284,26482,0.0784600601],[26284,26449,0.078434974],[26284,26294,0.0003368703],[18611,23419,0.0924929976],[18611,22059,0.0870835409],[18611,21872,0.0587873533],[26294,29788,0.0973997265],[26294,26482,0.0786179304],[26294,26449,0.078593038],[12982,15073,0.0879390836],[12982,15043,0.0904012024],[33984,36850,0.0785770267],[33984,34372,0.0753832012],[33984,34271,0.0752390176],[15043,21183,0.0978291929],[15043,15073,0.0118975043],[10952,21872,0.0989653766],[10952,18611,0.0977712348],[10952,12043,0.0997692645],[10952,11044,0.0049451538],[30408,33910,0.092822589],[19149,23419,0.0958504975],[19149,22606,0.0960875526],[19149,22507,0.076000452],[19149,21872,0.0859879926],[19149,19218,0.0049935202],[25294,27346,0.0885786638],[25294,27150,0.096927911],[25294,27126,0.0968429595],[25294,27099,0.0973826125],[25294,26980,0.0892101973],[25294,26015,0.0714790225],[25294,25307,0.0007089597],[17106,21390,0.0810768977],[17106,18529,0.0996007249],[17106,17121,0.0315505527],[27346,30115,0.0960335582],[27346,29492,0.0727331117],[27346,27375,0.0515442491],[25307,27346,0.0886183232],[25307,27150,0.0967180729],[25307,27126,0.0966356397],[25307,27099,0.0974990204],[25307,26980,0.0892776176],[25307,26015,0.0715828314],[29917,30115,0.0933408663],[29917,29946,0.0002096102],[17121,21390,0.0863136798],[15073,23419,0.0999312624],[15073,23324,0.0994492546],[15073,21183,0.0985752717],[24297,28450,0.0887144506],[24297,24941,0.088967301],[24297,24851,0.0846936777],[29421,30861,0.0700793862],[29421,30789,0.086650908],[29421,30465,0.0895516723],[29421,29492,0.0995378718],[27375,30408,0.0963534117],[27375,30115,0.0984954759],[27375,29492,0.0966635495],[37616,41272,0.0705270246],[37616,37773,0.0694416836],[29946,30115,0.0933206305],[30465,30861,0.0878446624],[12043,12061,0.0009475251],[19218,23419,0.0964902639],[19218,22606,0.0974874496],[19218,22507,0.0753425509],[19218,22059,0.0992007032],[19218,21872,0.0845676437],[24851,26709,0.0959297121],[24851,24994,0.0913000554],[24851,24941,0.0942277536],[30488,34271,0.0923305303],[23324,23419,0.0776012912],[34588,37773,0.0766218826],[28450,30789,0.0994562209],[11044,23419,0.099834159],[11044,21872,0.0966091082],[11044,18611,0.0959356204],[11044,18529,0.0986316949],[22315,24425,0.0990735143],[22315,24399,0.0973715708],[22315,22326,0.0001860012],[29492,30115,0.0811951011],[22326,24425,0.0990901589],[22326,24399,0.0973849893],[41272,42607,0.0994647071],[41272,41315,0.0949979499],[33595,33606,0.063226819],[33606,34372,0.0966657922],[33606,34271,0.0968440697],[22861,26294,0.0655414015],[22861,26284,0.0654813796],[22861,24642,0.0960951969],[22861,22868,0.0101454873],[24399,27150,0.086459212],[24399,27126,0.0864008367],[24399,24425,0.01278059],[26449,30488,0.0909789577],[26449,29788,0.0845021904],[26449,26482,0.0000858497],[22868,26294,0.0660543367],[22868,26284,0.0659970567],[22868,24642,0.096204482],[13653,14442,0.0981792808],[13653,14410,0.0981511548],[13653,13664,0.0019168539],[25943,30115,0.0997604579],[25943,27375,0.0657175034],[25943,27346,0.0804745033],[25943,26649,0.0495042577],[25943,26218,0.0935216546],[25943,26015,0.076114893],[13664,14442,0.0988192111],[13664,14410,0.0987904742],[26980,30465,0.0812963247],[26980,29492,0.08963494],[26980,29188,0.0974745154],[26980,27346,0.0997097641],[26980,27150,0.0908677354],[26980,27126,0.090621762],[26980,27099,0.0191809479],[24425,27150,0.0884670764],[24425,27126,0.0883988217],[24941,28450,0.0915500224],[21872,25943,0.0736543387],[21872,24642,0.0813826546],[21872,23419,0.0981309116],[21872,22606,0.0977695733],[21872,22507,0.0856983513],[21872,22059,0.070910573],[26482,30488,0.090952456],[26482,29788,0.084485516],[23419,27375,0.0996846706],[23419,26649,0.0937266499],[14209,22507,0.0947214216],[14209,22326,0.0910834298],[14209,22315,0.0910303369],[14209,20907,0.062563695],[14209,20889,0.0624970458],[14209,14235,0.0164450146],[37773,41272,0.0904938355],[21390,25307,0.0902245194],[21390,25294,0.0903255045],[21390,22606,0.0903965235],[21390,22507,0.0977565721],[21390,21872,0.0996548757],[12688,22059,0.0945212394],[12688,18886,0.0975794122],[32660,36850,0.0713869557],[32660,35488,0.0945855826],[32660,34372,0.09093678],[32660,34271,0.0910292417],[32660,33984,0.0685933977],[32660,33910,0.0680016726],[32660,33306,0.0589013025],[32660,33221,0.0771886855],[20889,22507,0.0897047818],[20889,22326,0.090680927],[20889,22315,0.090643011],[20889,20907,0.0003019591],[14235,22507,0.0907973722],[14235,22326,0.0923078507],[14235,22315,0.0922575966],[14235,20907,0.0628723055],[14235,20889,0.0628140271],[26015,30115,0.0826299265],[26015,29492,0.0705306679],[26015,27375,0.0706164762],[26015,27346,0.051768478],[26015,27150,0.0831101388],[26015,27126,0.0829300657],[26015,27099,0.096372515],[26015,26980,0.0923158228],[26015,26649,0.0746493638],[24994,27099,0.087900579],[24994,26980,0.0938009173],[24994,26709,0.0756726936],[24994,25618,0.0835578442],[24994,25609,0.0833950043],[30115,33730,0.0969326943],[30115,30408,0.0601232871],[16295,20907,0.0991836488],[16295,20889,0.0991639718],[16295,16624,0.0225255992],[20907,22507,0.0897900984],[20907,22326,0.0908588395],[20907,22315,0.0908211544],[18356,18387,0.0002353561],[18881,22868,0.0722723231],[18881,22861,0.0717582032],[18881,22059,0.0976530463],[18881,18886,0.0266744141],[33221,36850,0.0701055825],[33221,34372,0.0934885889],[33221,34271,0.0933396742],[33221,33984,0.0738129318],[33221,33910,0.0901615769],[33221,33306,0.0471669994],[18886,22868,0.0764519945],[18886,22861,0.0759852827],[18886,22059,0.0966696963],[27099,30465,0.0817794204],[27099,29492,0.0884387568],[27099,29421,0.0980545059],[27099,27150,0.0973475426],[27099,27126,0.0970679671],[34271,36983,0.0998311564],[34271,36850,0.0749542788],[34271,34372,0.0004521505],[39910,40054,0.0669042394],[22507,26015,0.0886303484],[22507,25943,0.0715331212],[22507,24642,0.0897385925],[22507,22606,0.0584230907],[36850,40054,0.0976723656],[36850,36983,0.0854344741],[27126,30408,0.0915701091],[27126,30115,0.0703053102],[27126,29946,0.0972681046],[27126,29917,0.0972985029],[27126,29492,0.0921888575],[27126,27375,0.098038882],[27126,27346,0.0863320082],[27126,27150,0.0005822697]]},
{"group":20236, "nodes":[["10 warning signs of a stock market crash",2,26524],["Ten warning signs we are heading for a crash",2,26438]], "links":[[26438,26524,0.0185013115]]},
{"group":15630, "nodes":[["Stock Futures Up on Quarter's Final Day",5,20525]], "links":[]},
{"group":29967, "nodes":[["Chrissie Hynde: Stockholm \u0096 the making of the album",2,43564]], "links":[]},
{"group":14102, "nodes":[["Giant rat: Swedes agog at 'Ratzilla' in Stockholm",3,18508]], "links":[]},
{"group":15644, "nodes":[["U.S. Stocks Up on Quarter's Final Day",5,20539]], "links":[]},
{"group":1827, "nodes":[["Tanzania will not sell ivory stockpile, says minister",3,2316]], "links":[]},
{"group":27940, "nodes":[["Australian Stocks Edge Higher",5,40966]], "links":[]},
{"group":20261, "nodes":[["China to Trial Cross-Market Stock Trade by Mainland, Hong Kong Investors",5,26469]], "links":[]},
{"group":13098, "nodes":[["How interest in stockbroking jobs rocketed after The Wolf of Wall Street \u0096 especially in Essex",2,17152]], "links":[]},
{"group":16173, "nodes":[["FBI probes high-speed trading on US stock markets",3,21235]], "links":[]},
{"group":31026, "nodes":[["Ukraine Tensions Help European Stocks Continue Slide",5,28570]], "links":[]},
{"group":27962, "nodes":[["China PMI Data Weigh on Asian Stocks",5,40995]], "links":[]},
{"group":24903, "nodes":[["China's slowdown 'is good for stocks'",2,37064],["China's slowdown 'is good for stocks'",2,37042],["China's slowdown 'is good for stocks'",2,37067]], "links":[[37064,37067,0.0191744231],[37042,37067,0.0417830721],[37042,37064,0.0226454046]]},
{"group":9547, "nodes":[["Under Armour Approves Stock Split",5,12384]], "links":[]},
{"group":29532, "nodes":[["Tea with the Stockwell Strangler",2,43013]], "links":[]},
{"group":24927, "nodes":[["When all else failed Johnny Harrington became a bloodstock agent, and a very good one too",2,37080]], "links":[]},
{"group":4963, "nodes":[["Stockbrokers Fail to Disclose Red Flags",5,6421]], "links":[]},
{"group":20324, "nodes":[["Will the 2014 technology stock market boom repeat the dotcom bust of 2000?",2,26554],["Will the 2014 technology stock market boom repeat the dotcom bust of 2000?",2,26564],["Will the 2014 technology stock market boom repeat the dotcom bust of 2000?",2,26566]], "links":[[26554,26566,0.012803277],[26554,26564,0.0126936585],[26564,26566,0.0001466464]]},
{"group":26468, "nodes":[["Stocks Waver After Dow's Record Close",5,39089]], "links":[]},
{"group":7533, "nodes":[["US opens emergency oil stockpile in signal to Putin",2,9731],["US opens emergency oil stockpile in signal to Putin",2,9733]], "links":[[9731,9733,0.0233016349]]},
{"group":25456, "nodes":[["Gailene Stock - obituary",2,37794]], "links":[]},
{"group":33137, "nodes":[["US freeing Iran funds as Tehran cuts uranium stockpile",3,31321]], "links":[]},
{"group":21876, "nodes":[["Card Factory to raise \u00a390m in stock market listing",2,33116]], "links":[]},
{"group":28547, "nodes":[["Time to Worry About Stock Market Bubbles",1,41749]], "links":[]},
{"group":10117, "nodes":[["New York Stock Exchange Is Front-Runner to Land Prized Alibaba Listing",5,13139],["New York Stock Exchange Is Front-Runner to Land Prized Alibaba Listing",5,13175]], "links":[[13139,13175,0.0050201113]]},
{"group":23429, "nodes":[["Guanghui Energy First in China Preferred-Stock Trial",5,35087]], "links":[]},
{"group":32652, "nodes":[["Drop in Tech Stocks Hits Startup Funding",5,30695]], "links":[]},
{"group":9105, "nodes":[["Alibaba reveals plan for US stock market listing",3,11799]], "links":[]},
{"group":29078, "nodes":[["Ukraine Tensions Weigh on Europe Stocks",5,42436]], "links":[]},
{"group":5528, "nodes":[["Manners maketh the Brits a laughing stock",2,7153],["Manners maketh the Brits a laughing stock",2,7150]], "links":[[7150,7153,0.0009517769]]},
{"group":20385, "nodes":[["Tech stocks rout: what should investors do?",2,26641],["Tech stocks rout: what should investors do?",2,26647]], "links":[[26641,26647,0.0034798507]]},
{"group":28578, "nodes":[["Shares in big UK stocks cheaper than ever",2,41782]], "links":[]},
{"group":15285, "nodes":[["Health-Care Stocks Lead From the Front",5,20065],["Health-Care Stocks Lead From the Front",5,20202]], "links":[[20065,20202,0.0305081233]]},
{"group":32694, "nodes":[["Iran has cut higher-enriched uranium stock 'by half'",3,30751]], "links":[]},
{"group":6583, "nodes":[["Regulator Was Encouraged by Effort to Save Anglo Irish Stock",5,8519]], "links":[]},
{"group":24507, "nodes":[["Japan Leads Asian Shares Lower on Ukraine Concerns",5,36533],["Japanese Stocks Lower on Ukraine Concerns",5,36510]], "links":[[36510,36533,0.0577939637]]},
{"group":30651, "nodes":[["Catch and release call to conserve fish stocks",3,44488]], "links":[]},
{"group":16318, "nodes":[["Comcast Stock Drop Complicates TWC Deal",5,21494],["Comcast Stock Drop Complicates TWC Deal",5,21415]], "links":[[21415,21494,0.070364289]]},
{"group":25534, "nodes":[["Twitter's Stock Sinks Despite Growth in Revenue, Users",5,37902]], "links":[]},
{"group":28606, "nodes":[["U.S. Stocks Open Lower",5,41858],["U.S. Stocks Open Lower",5,41827]], "links":[[41827,41858,0.0100101409]]},
{"group":6081, "nodes":[["New Norm for Stock Investors: Performance Matters",5,7852],["New Norm for Stock Investors: Performance Matters",5,7974]], "links":[[7852,7974,0.0020728367]]},
{"group":11205, "nodes":[["A Surprising Bargain at Tiffany: Its Stock",5,14600],["A Surprising Bargain at Tiffany: Its Stock",5,14693]], "links":[[14600,14693,0.0969808623]]},
{"group":5065, "nodes":[["London Stock Exchange's MTS to Buy Bonds.com",5,6555]], "links":[]},
{"group":33229, "nodes":[["Cambodia's Second Stock Listing Delayed",5,31443]], "links":[]},
{"group":5590, "nodes":[["Sally Beauty's CEO Sold Stock",5,7230]], "links":[]},
{"group":25558, "nodes":[["Twitter's Stock Sinks Despite Growth in Revenue, Users",5,37928]], "links":[]},
{"group":5102, "nodes":[["Carlyle Honchos Join Wave of Private-Equity Stock Sales",5,6633],["Carlyle Honchos Join Wave of Private-Equity Stock Sales",5,6597]], "links":[[6597,6633,0.0361750796]]},
{"group":13296, "nodes":[["Teenage girls will be able to stock up on morning-after pill under new NHS guidance",2,17417]], "links":[]},
{"group":12273, "nodes":[["Shiller Metric Carries Warning for Stocks",5,16115],["Shiller Metric Carries Warning for Stocks",5,15999]], "links":[[15999,16115,0.0007023995]]},
{"group":11256, "nodes":[["Foreign Investors Rush to Sell Japanese Stocks",5,14663]], "links":[]},
{"group":12792, "nodes":[["Trading Winds Blow Cold for Some Hot Stocks",5,16761],["Trading Winds Blow Cold for Some Hot Stocks",5,16750]], "links":[[16750,16761,0.0018866947]]},
{"group":16377, "nodes":[["Asian Stock Hedge Funds Flat in First Quarter",5,21496]], "links":[]},
{"group":27646, "nodes":[["Thailand to Sell Large Stocks of Natural Rubber",5,40953],["Thailand to Sell Large Stocks of Natural Rubber",5,40605]], "links":[[40605,40953,0.0008271124]]}]
<!DOCTYPE html>
<title>News Story Graph View</title>
<meta charset="utf8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="view.js"></script>
<link href="style.css" rel="stylesheet">
<body>
<header id="input"><input placeholder="Search" type="text" disabled></header>
<section id="main">
<svg id="graph"></svg>
<aside>
<div id="status"></div>
<div id="nodes"></div>
<div id="details">
<div class="details-doc"></div>
</div>
</aside>
</section>
</body>
/* reset */
html, body {
margin: 0;
padding: 0;
height: 100%;
font: 12px sans-serif;
line-height: 14px;
}
/* layout */
body {
display: flex;
flex-direction: column;
}
#main {
display: flex;
flex-flow: row wrap;
align-items: stretch;
height: 100%;
}
#graph {
flex: 0 0 960px;
display: block;
}
aside {
flex: 1;
}
/* main input */
#input {
padding: 20px 30px 0 30px;
border-bottom: 1px solid #555;
background: rgb(250, 250, 250);
}
#input input[type=text] {
box-sizing: border-box;
-webkit-appearance: none;
width: 100%;
height: 32px;
padding: 7px 0 0 0;
margin: 0;
border: none;
line-height: 20px;
font-size: 20px;
color: #333;
outline: 0;
background: transparent;
}
/* main graph */
#graph {
background: steelblue;
padding: 0;
margin: 0 auto;
display: block;
overflow: visible;
}
/* main nodes view */
aside {
background: rgb(237, 237, 237);
height: 100%;
box-sizing: border-box;
height: calc(100% - 51px);
}
/* status view */
#status {
height: 40px;
border-bottom: 1px solid gray;
line-height: 40px;
text-align: center;
background: rgb(250, 250, 250);
}
/* list view */
#nodes {
height: calc(100% - 41px - 151px);
overflow: scroll;
border-bottom: 1px solid gray;
}
#nodes div.group {
margin-left: 5px;
}
#nodes div.group::before {
content: '▼';
font-size: 10px;
line-height: 14px;
padding-right: 3px;
color: #666;
}
#nodes div.node {
margin: 0 10px 0 20px;
padding: 2px 5px;
}
#nodes div.node.highlight {
background: white;
border-radius: 14px;
}
#nodes div.node span.nodecolor::before {
content: '●';
padding-right: 3px;
font-size: 14px;
line-height: 14px;
-webkit-text-stroke: 1px rgba(0,0,0,0.8);
}
/* details view */
#details {
height: 150px;
background: rgb(250, 250, 250);
overflow: hidden;
position: relative;
}
#details table {
width: 100%;
}
#details table tr td:first-of-type {
text-align: right;
}
#details table tr td:first-of-type::after {
content: ':'
}
#details div.details-doc {
height: 100%;
}
/* d3 */
svg .node {
stroke: #fff;
stroke-width: 1.5px;
}
svg .node.highlight {
stroke: #000;
}
svg .link {
stroke: #fff;
stroke-opacity: 0.2;
stroke-width: 1px;
}
(function (d3, undefined) {
document.addEventListener('DOMContentLoaded', function () {
window.viewer = new Viewer();
});
//
// Manage the view
//
function Viewer() {
if (!(this instanceof Viewer)) return new Viewer();
var self = this;
this._graph = new GraphViewer();
this._status = document.querySelector('#status');
this._list = new ListViewer();
this._details = new DetailsView(this);
this._handler = new NodeEventHandler(this);
this._data = new DataContainer([], {
_group2index: {}
});
this.status('wait', 'Loading ...');
d3.json('graph.json', function (error, data) {
if (error) return self._viewer.status('error', 'Request error: ' + error.statusText);
self.status('none');
self.update(data);
});
}
Viewer.prototype.status = function (key, message) {
var colormap = {
'error': 'rgb(172, 65, 35)',
'wait': 'rgb(121, 132, 18)',
'none': 'rgb(255, 255, 255)'
};
this._status.innerHTML = message || '';
this._status.style.color = colormap[key];
};
Viewer.prototype.update = function (data) {
this._data = new DataContainer(data, this._data);
this._list.update(this._data);
this._graph.update(this._data);
};
//
// Manage events on nodes
//
function NodeEventHandler(watcher) {
this._watcher = watcher;
this._detailsViewer = this._watcher._details;
this._listViewer = this._watcher._list;
this._graphViewer = this._watcher._graph;
this._highlight = null;
this.addEventListener('click', this._click.bind(this));
}
NodeEventHandler.prototype.addEventListener = function (eventName, fn) {
var self = this;
function handler(d, i) {
var list = self._listViewer.getNode(d);
var graph = self._graphViewer.getNode(d);
fn(d, list, graph);
}
this._listViewer.addEventListener(eventName, handler);
this._graphViewer.addEventListener(eventName, handler);
};
NodeEventHandler.prototype._click = function (d, listNode, graphNode) {
if (this._highlight) {
this._highlight.list.classList.remove('highlight');
this._highlight.graph.classList.remove('highlight');
}
listNode.classList.add('highlight');
graphNode.classList.add('highlight');
this._highlight = { 'list': listNode, 'graph': graphNode };
if (!isElementVisible(listNode)) listNode.scrollIntoView(true);
this._detailsViewer.update(d);
};
//
// Holds and unpack the data
//
function LinkContainer(source, target, distance) {
this.source = source;
this.target = target;
this.distance = distance;
}
function NodeContainer(data) {
this.title = data[0];
this.website = data[1];
this.id = data[2];
}
function GroupContainer(data) {
this._id2index = {};
this.group = data.group;
this.nodes = [];
this.links = [];
var i = 0;
// Create node list
for (i=0; i < data.nodes.length; i++) {
var node = data.nodes[i];
this._id2index[node[2]] = i;
this.nodes.push(new NodeContainer(node));
}
// Create link list and find min max for distance
var min = Infinity, max = 0;
for (i=0; i < data.links.length; i++) {
var link = data.links[i];
this.links.push(new LinkContainer(
this.nodes[ this._id2index[link[0]] ],
this.nodes[ this._id2index[link[1]] ],
link[2]
));
if (link[2] < min) min = link[2];
if (link[2] > max) max = link[2];
}
// Save min & max
this.min = min;
this.max = max;
}
function DataContainer(data, old) {
if (!(this instanceof DataContainer)) return new DataContainer(data);
this.groups = [];
this._group2index = {};
// Create group list and find min max for distance
var min = Infinity, max = 0;
for (var i = 0; i < data.length; i++) {
var groupId = data[i].group;
// Get group, either from an old build or create it
var group;
if (old._group2index.hasOwnProperty(groupId)) {
group = old.groups[ old._group2index[groupId] ];
} else {
group = new GroupContainer(data[i]);
}
this.groups.push(group);
this._group2index[group.group] = i;
if (group.min < min) min = group.min;
if (group.max > max) max = group.max;
}
// Save min & max
this.min = min;
this.max = max;
}
//
// Manage the Node View
//
function ListViewer() {
if (!(this instanceof ListViewer)) return ListViewer();
EventAbstraction.apply(this, arguments);
this._view = d3.select('#nodes');
this._colors = d3.scale.category10();
this._groupSelection = this._view.selectAll('.group');
}
inherits(ListViewer, EventAbstraction);
ListViewer.prototype.update = function (data) {
var self = this;
this._groupSelection = this._groupSelection
.data(data.groups, function (d) { return d.group; });
var group = this._groupSelection.enter().append('div')
.attr('class', 'group')
.text(function (d) { return d.group; });
var nodes = group.selectAll('.node')
.data(function (d) { return d.nodes; }, function (d) { return d.id; });
var node = nodes.enter().append('div')
.attr('class', 'node')
.call(this.enterNodeEventer.bind(this))
.insert('span', ':first-child')
.attr('class', 'nodecolor')
.style('color', function (d) { return self._colors(d.website); })
.each(function (d) {
this.parentNode.appendChild(document.createTextNode(d.title));
});
this._groupSelection.exit().remove();
nodes.exit()
.call(this.exitNodeEventer.bind(this))
.remove();
};
//
// Manage the Graph
//
function GraphViewer() {
if (!(this instanceof GraphViewer)) return GraphViewer();
EventAbstraction.apply(this, arguments);
var self = this;
this._svg = d3.select('#graph');
this._colors = d3.scale.category10();
this._scale = d3.scale.sqrt();
this._scale.range([1, 30]);
this._links = [];
this._nodes = [];
this._size = [960, 500];
this._radius = 5;
this._force = d3.layout.force()
.nodes(this._nodes)
.links(this._links)
.charge(-120)
.linkStrength(0.3)
.linkDistance(function (d) { return self._scale(d.distance); })
.size(this._size)
.on('tick', this._forceTick.bind(this));
this._resize();
this._nodeSelect = this._svg.selectAll(".node");
this._linkSelect = this._svg.selectAll(".link");
var noresize = null;
window.addEventListener('resize', function () {
clearTimeout(noresize);
noresize = setTimeout(self._resize.bind(self), 1000);
});
}
inherits(GraphViewer, EventAbstraction);
GraphViewer.prototype._resize = function () {
var size = this._svg.node().getBoundingClientRect();
var width = Math.floor(size.width),
height = Math.floor(size.height);
if (width !== this._size[0] || height !== this._size[1]) {
this._size = [width, height];
this._force.size(this._size);
if (this._nodes.length > 0) {
this._force.start();
}
}
};
GraphViewer.prototype._forceTick = function () {
var self = this;
var radius = this._radius;
this._nodeSelect
.attr("cx", function(d) {
return Math.max(radius, Math.min(self._size[0] - radius, d.x));
})
.attr("cy", function(d) {
return Math.max(radius, Math.min(self._size[1] - radius, d.y));
});
this._linkSelect.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; });
};
GraphViewer.prototype._forceUpdate = function () {
var self = this;
this._linkSelect = this._linkSelect
.data(this._force.links(), function(d) { return d.source.id + "-" + d.target.id; });
this._linkSelect.enter().insert("line", ".node")
.attr("class", "link");
this._linkSelect.exit().remove();
this._nodeSelect = this._nodeSelect
.data(this._force.nodes(), function(d) { return d.id; });
this._nodeSelect.enter().append("circle")
.attr("class", "node")
.attr("r", this._radius - 0.75)
.style("fill", function(d) { return self._colors(d.website); })
.call(this._force.drag)
.call(this.enterNodeEventer.bind(this))
.append("title")
.text(function(d) { return d.title; });
this._nodeSelect.exit()
.call(this.exitNodeEventer.bind(this))
.remove();
this._force.start();
};
GraphViewer.prototype.update = function (data) {
this._nodes.length = 0;
this._links.length = 0;
for (var g = 0; g < data.groups.length; g++) {
var group = data.groups[g];
for (var n = 0; n < group.nodes.length; n++) {
this._nodes.push(group.nodes[n]);
}
for (var l = 0; l < group.links.length; l++) {
this._links.push(group.links[l]);
}
}
this._scale.domain([data.min, data.max]);
this._forceUpdate();
};
//
// Manage details view
//
function DetailsView(viewer) {
if (!(this instanceof DetailsView)) return new DetailsView();
this._viewer = viewer;
this._details = document.querySelector('#details');
this._table = new PropertyTable();
this._table.append(this._details.querySelectorAll('.details-doc')[0]);
}
DetailsView.prototype.update = function (d, side) {
var self = this;
this._table.update({
"db-id":2,
"date":"2014-02-21T11:16:43",
"website":"http:\/\/www.bbc.com\/news\/",
"index":1
});
};
//
// Property table
//
function PropertyTable() {
this._table = document.createElement('table');
}
PropertyTable.prototype._createCell = function (val) {
var td = document.createElement('td');
td.appendChild(document.createTextNode(val));
return td;
};
PropertyTable.prototype.append = function (el) {
el.appendChild(this._table);
};
PropertyTable.prototype.clear = function () {
this._table.innerHTML = '';
};
PropertyTable.prototype.update = function (content) {
this.clear();
var keys = Object.keys(content);
for (var i = 0; i < keys.length; i++) {
var tr = document.createElement('tr');
tr.appendChild(this._createCell(keys[i]));
tr.appendChild(this._createCell(content[keys[i]]));
this._table.appendChild(tr);
}
};
//
// Event handler Abstraction
//
function EventAbstraction() {
this._events = {
nodeMap: {},
listeners: {},
keys: []
};
}
EventAbstraction.prototype.addEventListener = function (eventName, fn) {
this._events.listeners[eventName] = fn;
this._events.keys.push(eventName);
};
EventAbstraction.prototype.enterNodeEventer = function (nodeCollection) {
var self = this;
for (var i = 0; i < this._events.keys.length; i++) {
var eventName = this._events.keys[i];
var listener = this._events.listeners[eventName];
nodeCollection.on(eventName, listener);
}
nodeCollection.each(function (d) {
self._events.nodeMap[d.id] = this;
});
};
EventAbstraction.prototype.exitNodeEventer = function (nodeCollection) {
var self = this;
nodeCollection.each(function (d) {
delete self._events.nodeMap[d.id];
});
};
EventAbstraction.prototype.getNode = function (d) {
return this._events.nodeMap[d.id];
};
//
// Utils
//
function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
function isElementVisible(el) {
var rect = el.getBoundingClientRect(),
efp = function (x, y) { return document.elementFromPoint(x, y); };
// Return false if it's not in the viewport
if (rect.right < 0 || rect.bottom < 0 || rect.left > window.innerWidth || rect.top > window.innerHeight) {
return false;
}
var x = rect.left + rect.width/2,
y = rect.top + rect.height/2;
// Return true if any of its four corners are visible
var eap = document.elementFromPoint(x, y);
return (eap == el || el.contains(eap));
}
})(window.d3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.