Skip to content

Instantly share code, notes, and snippets.

@nikhiltitus
Last active April 15, 2018 15:30
Show Gist options
  • Save nikhiltitus/d7defd5673bf03df755d7bf5501ca8bc to your computer and use it in GitHub Desktop.
Save nikhiltitus/d7defd5673bf03df755d7bf5501ca8bc to your computer and use it in GitHub Desktop.

590V assignment 5

  1. The dataset is the EU core dataset obtained from https://snap.stanford.edu/data/. The data consists of emails sent between different persons in a large EU organization. It consists of 986 nodes and 332334 edges. I sampled 300 nodes and 1000+ edges for the assignment, as the entire dataset was causing the browser to crash. The scatterplot shows aggregated data for the entire dataset and the graph represents a sample of 300 nodes.
  2. Force directed graph is created.
  3. Scatter plot is created
  4. Lasso selector and probbing are linked.
  5. Drop down is given.

I have used the open source d3.lasso library for lasso selector. I have reused my code from previous assignments for scatterplot and selector. I have used the force graph lab in 590v.

I didn't get time to put the visualizations side by side so zoom out your browser if you want to see both the graphs together.

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-drag")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-drag"],n):n(t.d3=t.d3||{},t.d3,t.d3)}(this,function(t,n,r){"use strict";function e(t,n){return n={exports:{}},t(n,n.exports),n.exports}function o(){function t(t){function u(){p=[],h="",_.attr("d",null),m.attr("d",null),r.nodes().forEach(function(t){t.__lasso.possible=!1,t.__lasso.selected=!1,t.__lasso.hoverSelect=!1,t.__lasso.loopSelect=!1;var n=t.getBoundingClientRect();t.__lasso.lassoPoint=[Math.round(n.left+n.width/2),Math.round(n.top+n.height/2)]}),s&&r.on("mouseover.lasso",function(){this.__lasso.hoverSelect=!0}),i.start()}function l(){var t,n;"touchmove"===d3.event.sourceEvent.type?(t=d3.event.sourceEvent.touches[0].clientX,n=d3.event.sourceEvent.touches[0].clientY):(t=d3.event.sourceEvent.clientX,n=d3.event.sourceEvent.clientY);var s=d3.mouse(this)[0],u=d3.mouse(this)[1];""===h?(h=h+"M "+s+" "+u,v=[t,n],d=[s,u],b.attr("cx",s).attr("cy",u).attr("r",7).attr("display",null)):h=h+" L "+s+" "+u,p.push([t,n]);var l=Math.sqrt(Math.pow(t-v[0],2)+Math.pow(n-v[1],2)),f="M "+s+" "+u+" L "+d[0]+" "+d[1];_.attr("d",h),m.attr("d",f),a=l<=e,a&&o?m.attr("display",null):m.attr("display","none"),r.nodes().forEach(function(t){t.__lasso.loopSelect=!(!a||!o)&&c(p,t.__lasso.lassoPoint)<1,t.__lasso.possible=t.__lasso.hoverSelect||t.__lasso.loopSelect}),i.draw()}function f(){r.on("mouseover.lasso",null),r.nodes().forEach(function(t){t.__lasso.selected=t.__lasso.possible,t.__lasso.possible=!1}),_.attr("d",null),m.attr("d",null),b.attr("display","none"),i.end()}var h,v,d,p,g=t.append("g").attr("class","lasso"),_=g.append("path").attr("class","drawn"),m=g.append("path").attr("class","loop_close"),b=g.append("circle").attr("class","origin"),M=d3.drag().on("start",u).on("drag",l).on("end",f);n.call(M)}var n,r=[],e=75,o=!0,a=!1,s=!0,i={start:function(){},draw:function(){},end:function(){}};return t.items=function(n){if(!arguments.length)return r;r=n;var e=r.nodes();return e.forEach(function(t){t.__lasso={possible:!1,selected:!1}}),t},t.possibleItems=function(){return r.filter(function(){return this.__lasso.possible})},t.selectedItems=function(){return r.filter(function(){return this.__lasso.selected})},t.notPossibleItems=function(){return r.filter(function(){return!this.__lasso.possible})},t.notSelectedItems=function(){return r.filter(function(){return!this.__lasso.selected})},t.closePathDistance=function(n){return arguments.length?(e=n,t):e},t.closePathSelect=function(n){return arguments.length?(o=n===!0,t):o},t.isPathClosed=function(n){return arguments.length?(a=n===!0,t):a},t.hoverSelect=function(n){return arguments.length?(s=n===!0,t):s},t.on=function(n,r){if(!arguments.length)return i;if(1===arguments.length)return i[n];var e=["start","draw","end"];return e.indexOf(n)>-1&&(i[n]=r),t},t.targetArea=function(r){return arguments.length?(n=r,t):n},t}var a=e(function(t){function n(t,n,e){var o=t*n,a=r*t,s=a-t,i=a-s,u=t-i,l=r*n,f=l-n,c=l-f,h=n-c,v=o-i*c,d=v-u*c,p=d-i*h,g=u*h-p;return e?(e[0]=g,e[1]=o,e):[g,o]}t.exports=n;var r=+(Math.pow(2,27)+1)}),s=e(function(t){function n(t,n){var r=t+n,e=r-t,o=r-e,a=n-e,s=t-o,i=s+a;return i?[i,r]:[r]}function r(t,r){var e=0|t.length,o=0|r.length;if(1===e&&1===o)return n(t[0],r[0]);var a,s,i=e+o,u=new Array(i),l=0,f=0,c=0,h=Math.abs,v=t[f],d=h(v),p=r[c],g=h(p);d<g?(s=v,f+=1,f<e&&(v=t[f],d=h(v))):(s=p,c+=1,c<o&&(p=r[c],g=h(p))),f<e&&d<g||c>=o?(a=v,f+=1,f<e&&(v=t[f],d=h(v))):(a=p,c+=1,c<o&&(p=r[c],g=h(p)));for(var _,m,b,M,y,w=a+s,x=w-a,j=s-x,E=j,A=w;f<e&&c<o;)d<g?(a=v,f+=1,f<e&&(v=t[f],d=h(v))):(a=p,c+=1,c<o&&(p=r[c],g=h(p))),s=E,w=a+s,x=w-a,j=s-x,j&&(u[l++]=j),_=A+w,m=_-A,b=_-m,M=w-m,y=A-b,E=y+M,A=_;for(;f<e;)a=v,s=E,w=a+s,x=w-a,j=s-x,j&&(u[l++]=j),_=A+w,m=_-A,b=_-m,M=w-m,y=A-b,E=y+M,A=_,f+=1,f<e&&(v=t[f]);for(;c<o;)a=p,s=E,w=a+s,x=w-a,j=s-x,j&&(u[l++]=j),_=A+w,m=_-A,b=_-m,M=w-m,y=A-b,E=y+M,A=_,c+=1,c<o&&(p=r[c]);return E&&(u[l++]=E),A&&(u[l++]=A),l||(u[l++]=0),u.length=l,u}t.exports=r}),i=e(function(t){function n(t,n,r){var e=t+n,o=e-t,a=e-o,s=n-o,i=t-a;return r?(r[0]=i+s,r[1]=e,r):[i+s,e]}t.exports=n}),u=e(function(t){function n(t,n){var o=t.length;if(1===o){var a=r(t[0],n);return a[0]?a:[a[1]]}var s=new Array(2*o),i=[.1,.1],u=[.1,.1],l=0;r(t[0],n,i),i[0]&&(s[l++]=i[0]);for(var f=1;f<o;++f){r(t[f],n,u);var c=i[1];e(c,u[0],i),i[0]&&(s[l++]=i[0]);var h=u[1],v=i[1],d=h+v,p=d-h,g=v-p;i[1]=d,g&&(s[l++]=g)}return i[1]&&(s[l++]=i[1]),0===l&&(s[l++]=0),s.length=l,s}var r=a,e=i;t.exports=n}),l=e(function(t){function n(t,n){var r=t+n,e=r-t,o=r-e,a=n-e,s=t-o,i=s+a;return i?[i,r]:[r]}function r(t,r){var e=0|t.length,o=0|r.length;if(1===e&&1===o)return n(t[0],-r[0]);var a,s,i=e+o,u=new Array(i),l=0,f=0,c=0,h=Math.abs,v=t[f],d=h(v),p=-r[c],g=h(p);d<g?(s=v,f+=1,f<e&&(v=t[f],d=h(v))):(s=p,c+=1,c<o&&(p=-r[c],g=h(p))),f<e&&d<g||c>=o?(a=v,f+=1,f<e&&(v=t[f],d=h(v))):(a=p,c+=1,c<o&&(p=-r[c],g=h(p)));for(var _,m,b,M,y,w=a+s,x=w-a,j=s-x,E=j,A=w;f<e&&c<o;)d<g?(a=v,f+=1,f<e&&(v=t[f],d=h(v))):(a=p,c+=1,c<o&&(p=-r[c],g=h(p))),s=E,w=a+s,x=w-a,j=s-x,j&&(u[l++]=j),_=A+w,m=_-A,b=_-m,M=w-m,y=A-b,E=y+M,A=_;for(;f<e;)a=v,s=E,w=a+s,x=w-a,j=s-x,j&&(u[l++]=j),_=A+w,m=_-A,b=_-m,M=w-m,y=A-b,E=y+M,A=_,f+=1,f<e&&(v=t[f]);for(;c<o;)a=p,s=E,w=a+s,x=w-a,j=s-x,j&&(u[l++]=j),_=A+w,m=_-A,b=_-m,M=w-m,y=A-b,E=y+M,A=_,c+=1,c<o&&(p=-r[c]);return E&&(u[l++]=E),A&&(u[l++]=A),l||(u[l++]=0),u.length=l,u}t.exports=r}),f=e(function(t){function n(t,n){for(var r=new Array(t.length-1),e=1;e<t.length;++e)for(var o=r[e-1]=new Array(t.length-1),a=0,s=0;a<t.length;++a)a!==n&&(o[s++]=t[e][a]);return r}function r(t){for(var n=new Array(t),r=0;r<t;++r){n[r]=new Array(t);for(var e=0;e<t;++e)n[r][e]=["m",e,"[",t-r-1,"]"].join("")}return n}function e(t){return 1&t?"-":""}function o(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var n=t.length>>1;return["sum(",o(t.slice(0,n)),",",o(t.slice(n)),")"].join("")}function i(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var r=[],a=0;a<t.length;++a)r.push(["scale(",o(i(n(t,a))),",",e(a),t[0][a],")"].join(""));return r}function f(t){for(var e=[],a=[],s=r(t),u=[],l=0;l<t;++l)0===(1&l)?e.push.apply(e,i(n(s,l))):a.push.apply(a,i(n(s,l))),u.push("m"+l);var f=o(e),c=o(a),h="orientation"+t+"Exact",_=["function ",h,"(",u.join(),"){var p=",f,",n=",c,",d=sub(p,n);return d[d.length-1];};return ",h].join(""),m=new Function("sum","prod","scale","sub",_);return m(d,v,p,g)}function c(t){var n=x[t.length];return n||(n=x[t.length]=f(t.length)),n.apply(void 0,t)}function h(){for(;x.length<=_;)x.push(f(x.length));for(var n=[],r=["slow"],e=0;e<=_;++e)n.push("a"+e),r.push("o"+e);for(var o=["function getOrientation(",n.join(),"){switch(arguments.length){case 0:case 1:return 0;"],e=2;e<=_;++e)o.push("case ",e,":return o",e,"(",n.slice(0,e).join(),");");o.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),r.push(o.join(""));var a=Function.apply(void 0,r);t.exports=a.apply(void 0,[c].concat(x));for(var e=0;e<=_;++e)t.exports[e]=x[e]}var v=a,d=s,p=u,g=l,_=5,m=1.1102230246251565e-16,b=(3+16*m)*m,M=(7+56*m)*m,y=f(3),w=f(4),x=[function(){return 0},function(){return 0},function(t,n){return n[0]-t[0]},function(t,n,r){var e,o=(t[1]-r[1])*(n[0]-r[0]),a=(t[0]-r[0])*(n[1]-r[1]),s=o-a;if(o>0){if(a<=0)return s;e=o+a}else{if(!(o<0))return s;if(a>=0)return s;e=-(o+a)}var i=b*e;return s>=i||s<=-i?s:y(t,n,r)},function(t,n,r,e){var o=t[0]-e[0],a=n[0]-e[0],s=r[0]-e[0],i=t[1]-e[1],u=n[1]-e[1],l=r[1]-e[1],f=t[2]-e[2],c=n[2]-e[2],h=r[2]-e[2],v=a*l,d=s*u,p=s*i,g=o*l,_=o*u,m=a*i,b=f*(v-d)+c*(p-g)+h*(_-m),y=(Math.abs(v)+Math.abs(d))*Math.abs(f)+(Math.abs(p)+Math.abs(g))*Math.abs(c)+(Math.abs(_)+Math.abs(m))*Math.abs(h),x=M*y;return b>x||-b>x?b:w(t,n,r,e)}];h()}),c=e(function(t){function n(t,n){for(var e=n[0],o=n[1],a=t.length,s=1,i=a,u=0,l=a-1;u<i;l=u++){var f=t[u],c=t[l],h=f[1],v=c[1];if(v<h){if(v<o&&o<h){var d=r(f,c,n);if(0===d)return 0;s^=0<d|0}else if(o===h){var p=t[(u+1)%a],g=p[1];if(h<g){var d=r(f,c,n);if(0===d)return 0;s^=0<d|0}}}else if(h<v){if(h<o&&o<v){var d=r(f,c,n);if(0===d)return 0;s^=d<0|0}else if(o===h){var p=t[(u+1)%a],g=p[1];if(g<h){var d=r(f,c,n);if(0===d)return 0;s^=d<0|0}}}else if(o===h){var _=Math.min(f[0],c[0]),m=Math.max(f[0],c[0]);if(0===u){for(;l>0;){var b=(l+a-1)%a,M=t[b];if(M[1]!==o)break;var y=M[0];_=Math.min(_,y),m=Math.max(m,y),l=b}if(0===l)return _<=e&&e<=m?0:1;i=l+1}for(var w=t[(l+a-1)%a][1];u+1<i;){var M=t[u+1];if(M[1]!==o)break;var y=M[0];_=Math.min(_,y),m=Math.max(m,y),u+=1}if(_<=e&&e<=m)return 0;var x=t[(u+1)%a][1];e<_&&w<o!=x<o&&(s^=1)}}return 2*s-1}t.exports=n;var r=f});t.lasso=o,Object.defineProperty(t,"__esModule",{value:!0})});
{"nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}, {"id": 16}, {"id": 17}, {"id": 18}, {"id": 19}, {"id": 20}, {"id": 21}, {"id": 22}, {"id": 23}, {"id": 24}, {"id": 25}, {"id": 26}, {"id": 27}, {"id": 28}, {"id": 29}, {"id": 30}, {"id": 31}, {"id": 32}, {"id": 33}, {"id": 34}, {"id": 35}, {"id": 36}, {"id": 37}, {"id": 38}, {"id": 39}, {"id": 40}, {"id": 41}, {"id": 42}, {"id": 43}, {"id": 44}, {"id": 45}, {"id": 46}, {"id": 47}, {"id": 48}, {"id": 49}, {"id": 50}, {"id": 51}, {"id": 52}, {"id": 53}, {"id": 54}, {"id": 55}, {"id": 56}, {"id": 57}, {"id": 58}, {"id": 59}, {"id": 60}, {"id": 61}, {"id": 62}, {"id": 63}, {"id": 64}, {"id": 65}, {"id": 66}, {"id": 67}, {"id": 68}, {"id": 69}, {"id": 70}, {"id": 71}, {"id": 72}, {"id": 73}, {"id": 74}, {"id": 75}, {"id": 76}, {"id": 77}, {"id": 78}, {"id": 79}, {"id": 80}, {"id": 81}, {"id": 82}, {"id": 83}, {"id": 84}, {"id": 85}, {"id": 86}, {"id": 87}, {"id": 88}, {"id": 89}, {"id": 90}, {"id": 91}, {"id": 92}, {"id": 93}, {"id": 94}, {"id": 95}, {"id": 96}, {"id": 97}, {"id": 98}, {"id": 99}, {"id": 100}, {"id": 101}, {"id": 102}, {"id": 103}, {"id": 104}, {"id": 105}, {"id": 106}, {"id": 107}, {"id": 108}, {"id": 109}, {"id": 110}, {"id": 111}, {"id": 112}, {"id": 113}, {"id": 114}, {"id": 115}, {"id": 116}, {"id": 117}, {"id": 118}, {"id": 119}, {"id": 120}, {"id": 121}, {"id": 122}, {"id": 123}, {"id": 124}, {"id": 125}, {"id": 126}, {"id": 127}, {"id": 128}, {"id": 129}, {"id": 130}, {"id": 131}, {"id": 132}, {"id": 133}, {"id": 134}, {"id": 135}, {"id": 136}, {"id": 137}, {"id": 138}, {"id": 139}, {"id": 140}, {"id": 141}, {"id": 142}, {"id": 143}, {"id": 144}, {"id": 145}, {"id": 146}, {"id": 147}, {"id": 148}, {"id": 149}, {"id": 150}, {"id": 151}, {"id": 152}, {"id": 153}, {"id": 154}, {"id": 155}, {"id": 156}, {"id": 157}, {"id": 158}, {"id": 159}, {"id": 160}, {"id": 161}, {"id": 162}, {"id": 163}, {"id": 164}, {"id": 165}, {"id": 166}, {"id": 167}, {"id": 168}, {"id": 169}, {"id": 170}, {"id": 171}, {"id": 172}, {"id": 173}, {"id": 174}, {"id": 175}, {"id": 176}, {"id": 177}, {"id": 178}, {"id": 179}, {"id": 180}, {"id": 181}, {"id": 182}, {"id": 183}, {"id": 184}, {"id": 185}, {"id": 186}, {"id": 187}, {"id": 188}, {"id": 189}, {"id": 190}, {"id": 191}, {"id": 192}, {"id": 193}, {"id": 194}, {"id": 195}, {"id": 196}, {"id": 197}, {"id": 198}, {"id": 199}, {"id": 200}, {"id": 201}, {"id": 202}, {"id": 203}, {"id": 204}, {"id": 205}, {"id": 206}, {"id": 207}, {"id": 208}, {"id": 209}, {"id": 210}, {"id": 211}, {"id": 212}, {"id": 213}, {"id": 214}, {"id": 215}, {"id": 216}, {"id": 217}, {"id": 218}, {"id": 219}, {"id": 220}, {"id": 221}, {"id": 222}, {"id": 223}, {"id": 224}, {"id": 225}, {"id": 226}, {"id": 227}, {"id": 228}, {"id": 229}, {"id": 230}, {"id": 231}, {"id": 232}, {"id": 233}, {"id": 234}, {"id": 235}, {"id": 236}, {"id": 237}, {"id": 238}, {"id": 239}, {"id": 240}, {"id": 241}, {"id": 242}, {"id": 243}, {"id": 244}, {"id": 245}, {"id": 246}, {"id": 247}, {"id": 248}, {"id": 249}, {"id": 250}, {"id": 251}, {"id": 252}, {"id": 253}, {"id": 254}, {"id": 255}, {"id": 256}, {"id": 257}, {"id": 258}, {"id": 259}, {"id": 260}, {"id": 261}, {"id": 262}, {"id": 263}, {"id": 264}, {"id": 265}, {"id": 266}, {"id": 267}, {"id": 268}, {"id": 269}, {"id": 270}, {"id": 271}, {"id": 272}, {"id": 273}, {"id": 274}, {"id": 275}, {"id": 276}, {"id": 277}, {"id": 278}, {"id": 279}, {"id": 280}, {"id": 281}, {"id": 282}, {"id": 283}, {"id": 284}, {"id": 285}, {"id": 286}, {"id": 287}, {"id": 288}, {"id": 289}, {"id": 290}, {"id": 291}, {"id": 292}, {"id": 293}, {"id": 294}, {"id": 295}, {"id": 296}, {"id": 297}, {"id": 298}, {"id": 299}, {"id": 300}, {"id": 301}, {"id": 302}, {"id": 303}, {"id": 304}, {"id": 305}, {"id": 306}, {"id": 307}, {"id": 308}, {"id": 309}, {"id": 310}, {"id": 311}, {"id": 312}, {"id": 313}, {"id": 314}, {"id": 315}, {"id": 316}, {"id": 317}, {"id": 318}, {"id": 319}, {"id": 320}, {"id": 321}, {"id": 322}, {"id": 323}, {"id": 324}, {"id": 325}, {"id": 326}, {"id": 327}, {"id": 328}, {"id": 329}, {"id": 330}, {"id": 331}, {"id": 332}, {"id": 333}, {"id": 334}, {"id": 335}, {"id": 336}, {"id": 337}, {"id": 338}, {"id": 339}, {"id": 340}, {"id": 341}, {"id": 342}, {"id": 343}, {"id": 344}, {"id": 345}, {"id": 346}, {"id": 347}, {"id": 348}, {"id": 349}, {"id": 350}, {"id": 351}, {"id": 352}, {"id": 353}, {"id": 354}, {"id": 355}, {"id": 356}, {"id": 357}, {"id": 358}, {"id": 359}, {"id": 360}, {"id": 361}, {"id": 362}, {"id": 363}, {"id": 364}, {"id": 365}, {"id": 366}, {"id": 367}, {"id": 368}, {"id": 369}, {"id": 370}, {"id": 371}, {"id": 372}, {"id": 373}, {"id": 374}, {"id": 375}, {"id": 376}, {"id": 377}, {"id": 378}, {"id": 379}, {"id": 380}, {"id": 381}, {"id": 382}, {"id": 383}, {"id": 384}, {"id": 385}, {"id": 386}, {"id": 387}, {"id": 388}, {"id": 389}, {"id": 390}, {"id": 391}, {"id": 392}, {"id": 393}, {"id": 394}, {"id": 395}, {"id": 396}, {"id": 397}, {"id": 398}, {"id": 399}, {"id": 400}, {"id": 401}, {"id": 402}, {"id": 403}, {"id": 404}, {"id": 405}, {"id": 406}, {"id": 407}, {"id": 408}, {"id": 409}, {"id": 410}, {"id": 411}, {"id": 412}, {"id": 413}, {"id": 414}, {"id": 415}, {"id": 416}, {"id": 417}, {"id": 418}, {"id": 419}, {"id": 420}, {"id": 421}, {"id": 422}, {"id": 423}, {"id": 424}, {"id": 425}, {"id": 426}, {"id": 427}, {"id": 428}, {"id": 429}, {"id": 430}, {"id": 431}, {"id": 432}, {"id": 433}, {"id": 434}, {"id": 435}, {"id": 436}, {"id": 437}, {"id": 438}, {"id": 439}, {"id": 440}, {"id": 441}, {"id": 442}, {"id": 443}, {"id": 444}, {"id": 445}, {"id": 446}, {"id": 447}, {"id": 448}, {"id": 449}, {"id": 450}, {"id": 451}, {"id": 452}, {"id": 453}, {"id": 454}, {"id": 455}, {"id": 456}, {"id": 457}, {"id": 458}, {"id": 459}, {"id": 460}, {"id": 461}, {"id": 462}, {"id": 463}, {"id": 464}, {"id": 465}, {"id": 466}, {"id": 467}, {"id": 468}, {"id": 469}, {"id": 470}, {"id": 471}, {"id": 472}, {"id": 473}, {"id": 474}], "links": [{"source": 0, "target": 1, "value": 1}, {"source": 2, "target": 3, "value": 1}, {"source": 2, "target": 4, "value": 1}, {"source": 5, "target": 6, "value": 1}, {"source": 5, "target": 7, "value": 1}, {"source": 8, "target": 9, "value": 1}, {"source": 10, "target": 11, "value": 1}, {"source": 12, "target": 13, "value": 1}, {"source": 12, "target": 14, "value": 1}, {"source": 15, "target": 16, "value": 1}, {"source": 17, "target": 18, "value": 1}, {"source": 12, "target": 19, "value": 1}, {"source": 20, "target": 21, "value": 1}, {"source": 20, "target": 22, "value": 1}, {"source": 23, "target": 24, "value": 1}, {"source": 23, "target": 25, "value": 1}, {"source": 23, "target": 26, "value": 1}, {"source": 23, "target": 27, "value": 1}, {"source": 23, "target": 28, "value": 1}, {"source": 23, "target": 29, "value": 1}, {"source": 23, "target": 30, "value": 1}, {"source": 23, "target": 31, "value": 1}, {"source": 23, "target": 32, "value": 1}, {"source": 23, "target": 33, "value": 1}, {"source": 23, "target": 34, "value": 1}, {"source": 23, "target": 35, "value": 1}, {"source": 23, "target": 36, "value": 1}, {"source": 23, "target": 37, "value": 1}, {"source": 23, "target": 38, "value": 1}, {"source": 23, "target": 39, "value": 1}, {"source": 23, "target": 40, "value": 1}, {"source": 41, "target": 42, "value": 1}, {"source": 43, "target": 44, "value": 1}, {"source": 45, "target": 46, "value": 1}, {"source": 47, "target": 48, "value": 1}, {"source": 49, "target": 50, "value": 1}, {"source": 41, "target": 51, "value": 1}, {"source": 52, "target": 53, "value": 1}, {"source": 54, "target": 55, "value": 1}, {"source": 54, "target": 56, "value": 1}, {"source": 54, "target": 57, "value": 1}, {"source": 54, "target": 58, "value": 1}, {"source": 54, "target": 59, "value": 1}, {"source": 60, "target": 61, "value": 1}, {"source": 54, "target": 54, "value": 1}, {"source": 62, "target": 63, "value": 1}, {"source": 64, "target": 65, "value": 1}, {"source": 62, "target": 4, "value": 1}, {"source": 66, "target": 67, "value": 1}, {"source": 68, "target": 69, "value": 1}, {"source": 42, "target": 41, "value": 1}, {"source": 70, "target": 71, "value": 1}, {"source": 72, "target": 21, "value": 1}, {"source": 71, "target": 70, "value": 1}, {"source": 73, "target": 74, "value": 1}, {"source": 75, "target": 76, "value": 1}, {"source": 75, "target": 48, "value": 1}, {"source": 77, "target": 78, "value": 1}, {"source": 77, "target": 79, "value": 1}, {"source": 80, "target": 81, "value": 1}, {"source": 80, "target": 68, "value": 1}, {"source": 19, "target": 62, "value": 1}, {"source": 82, "target": 83, "value": 1}, {"source": 22, "target": 21, "value": 1}, {"source": 82, "target": 84, "value": 1}, {"source": 21, "target": 72, "value": 1}, {"source": 41, "target": 85, "value": 1}, {"source": 41, "target": 86, "value": 1}, {"source": 41, "target": 87, "value": 1}, {"source": 82, "target": 86, "value": 1}, {"source": 88, "target": 89, "value": 1}, {"source": 90, "target": 91, "value": 1}, {"source": 92, "target": 20, "value": 1}, {"source": 41, "target": 93, "value": 1}, {"source": 41, "target": 94, "value": 1}, {"source": 41, "target": 95, "value": 1}, {"source": 89, "target": 96, "value": 1}, {"source": 89, "target": 88, "value": 1}, {"source": 97, "target": 98, "value": 1}, {"source": 97, "target": 99, "value": 1}, {"source": 97, "target": 100, "value": 1}, {"source": 97, "target": 101, "value": 1}, {"source": 97, "target": 102, "value": 1}, {"source": 103, "target": 104, "value": 1}, {"source": 51, "target": 41, "value": 1}, {"source": 82, "target": 105, "value": 1}, {"source": 90, "target": 106, "value": 1}, {"source": 62, "target": 107, "value": 1}, {"source": 108, "target": 109, "value": 1}, {"source": 108, "target": 66, "value": 1}, {"source": 108, "target": 110, "value": 1}, {"source": 108, "target": 111, "value": 1}, {"source": 108, "target": 112, "value": 1}, {"source": 113, "target": 114, "value": 1}, {"source": 115, "target": 116, "value": 1}, {"source": 117, "target": 118, "value": 1}, {"source": 76, "target": 119, "value": 1}, {"source": 17, "target": 120, "value": 1}, {"source": 82, "target": 121, "value": 1}, {"source": 122, "target": 123, "value": 1}, {"source": 14, "target": 12, "value": 1}, {"source": 124, "target": 125, "value": 1}, {"source": 13, "target": 126, "value": 1}, {"source": 127, "target": 128, "value": 1}, {"source": 127, "target": 129, "value": 1}, {"source": 127, "target": 130, "value": 1}, {"source": 131, "target": 132, "value": 1}, {"source": 40, "target": 26, "value": 1}, {"source": 40, "target": 29, "value": 1}, {"source": 18, "target": 133, "value": 1}, {"source": 56, "target": 55, "value": 1}, {"source": 56, "target": 54, "value": 1}, {"source": 56, "target": 59, "value": 1}, {"source": 134, "target": 6, "value": 1}, {"source": 115, "target": 62, "value": 1}, {"source": 135, "target": 136, "value": 1}, {"source": 137, "target": 138, "value": 1}, {"source": 137, "target": 137, "value": 1}, {"source": 22, "target": 20, "value": 1}, {"source": 139, "target": 140, "value": 1}, {"source": 141, "target": 142, "value": 1}, {"source": 143, "target": 143, "value": 1}, {"source": 143, "target": 51, "value": 1}, {"source": 143, "target": 133, "value": 1}, {"source": 144, "target": 145, "value": 1}, {"source": 146, "target": 147, "value": 1}, {"source": 83, "target": 82, "value": 1}, {"source": 148, "target": 149, "value": 1}, {"source": 150, "target": 103, "value": 1}, {"source": 150, "target": 150, "value": 1}, {"source": 49, "target": 84, "value": 1}, {"source": 151, "target": 28, "value": 1}, {"source": 152, "target": 153, "value": 1}, {"source": 153, "target": 152, "value": 1}, {"source": 154, "target": 155, "value": 1}, {"source": 156, "target": 157, "value": 1}, {"source": 139, "target": 15, "value": 1}, {"source": 158, "target": 159, "value": 1}, {"source": 4, "target": 2, "value": 1}, {"source": 4, "target": 3, "value": 1}, {"source": 133, "target": 18, "value": 1}, {"source": 160, "target": 161, "value": 1}, {"source": 84, "target": 162, "value": 1}, {"source": 84, "target": 50, "value": 1}, {"source": 84, "target": 49, "value": 1}, {"source": 84, "target": 71, "value": 1}, {"source": 72, "target": 163, "value": 1}, {"source": 164, "target": 139, "value": 1}, {"source": 165, "target": 166, "value": 1}, {"source": 167, "target": 168, "value": 1}, {"source": 123, "target": 122, "value": 1}, {"source": 169, "target": 115, "value": 1}, {"source": 169, "target": 170, "value": 1}, {"source": 40, "target": 171, "value": 1}, {"source": 123, "target": 103, "value": 1}, {"source": 123, "target": 172, "value": 1}, {"source": 123, "target": 61, "value": 1}, {"source": 123, "target": 123, "value": 1}, {"source": 24, "target": 96, "value": 1}, {"source": 81, "target": 80, "value": 1}, {"source": 173, "target": 21, "value": 1}, {"source": 174, "target": 175, "value": 1}, {"source": 176, "target": 177, "value": 1}, {"source": 176, "target": 178, "value": 1}, {"source": 122, "target": 179, "value": 1}, {"source": 21, "target": 22, "value": 1}, {"source": 180, "target": 130, "value": 1}, {"source": 181, "target": 182, "value": 1}, {"source": 129, "target": 183, "value": 1}, {"source": 184, "target": 184, "value": 1}, {"source": 181, "target": 179, "value": 1}, {"source": 185, "target": 52, "value": 1}, {"source": 70, "target": 186, "value": 1}, {"source": 106, "target": 187, "value": 1}, {"source": 137, "target": 175, "value": 1}, {"source": 137, "target": 174, "value": 1}, {"source": 188, "target": 189, "value": 1}, {"source": 108, "target": 190, "value": 1}, {"source": 191, "target": 157, "value": 1}, {"source": 191, "target": 191, "value": 1}, {"source": 192, "target": 193, "value": 1}, {"source": 192, "target": 194, "value": 1}, {"source": 192, "target": 195, "value": 1}, {"source": 192, "target": 2, "value": 1}, {"source": 192, "target": 192, "value": 1}, {"source": 41, "target": 196, "value": 1}, {"source": 41, "target": 197, "value": 1}, {"source": 41, "target": 198, "value": 1}, {"source": 41, "target": 199, "value": 1}, {"source": 41, "target": 200, "value": 1}, {"source": 41, "target": 167, "value": 1}, {"source": 41, "target": 201, "value": 1}, {"source": 41, "target": 202, "value": 1}, {"source": 41, "target": 203, "value": 1}, {"source": 41, "target": 204, "value": 1}, {"source": 41, "target": 205, "value": 1}, {"source": 41, "target": 206, "value": 1}, {"source": 41, "target": 207, "value": 1}, {"source": 208, "target": 208, "value": 1}, {"source": 61, "target": 123, "value": 1}, {"source": 209, "target": 210, "value": 1}, {"source": 41, "target": 128, "value": 1}, {"source": 211, "target": 54, "value": 1}, {"source": 115, "target": 212, "value": 1}, {"source": 106, "target": 189, "value": 1}, {"source": 137, "target": 208, "value": 1}, {"source": 212, "target": 115, "value": 1}, {"source": 56, "target": 58, "value": 1}, {"source": 30, "target": 25, "value": 1}, {"source": 30, "target": 36, "value": 1}, {"source": 30, "target": 41, "value": 1}, {"source": 155, "target": 213, "value": 1}, {"source": 48, "target": 47, "value": 1}, {"source": 214, "target": 180, "value": 1}, {"source": 96, "target": 24, "value": 1}, {"source": 4, "target": 4, "value": 1}, {"source": 4, "target": 62, "value": 1}, {"source": 155, "target": 215, "value": 1}, {"source": 216, "target": 15, "value": 1}, {"source": 170, "target": 170, "value": 1}, {"source": 71, "target": 217, "value": 1}, {"source": 71, "target": 50, "value": 1}, {"source": 71, "target": 49, "value": 1}, {"source": 13, "target": 13, "value": 1}, {"source": 98, "target": 97, "value": 1}, {"source": 74, "target": 1, "value": 1}, {"source": 74, "target": 218, "value": 1}, {"source": 74, "target": 219, "value": 1}, {"source": 74, "target": 215, "value": 1}, {"source": 74, "target": 220, "value": 1}, {"source": 74, "target": 221, "value": 1}, {"source": 74, "target": 222, "value": 1}, {"source": 74, "target": 223, "value": 1}, {"source": 74, "target": 18, "value": 1}, {"source": 74, "target": 224, "value": 1}, {"source": 74, "target": 225, "value": 1}, {"source": 74, "target": 226, "value": 1}, {"source": 74, "target": 227, "value": 1}, {"source": 74, "target": 17, "value": 1}, {"source": 74, "target": 228, "value": 1}, {"source": 229, "target": 64, "value": 1}, {"source": 100, "target": 97, "value": 1}, {"source": 230, "target": 21, "value": 1}, {"source": 230, "target": 20, "value": 1}, {"source": 231, "target": 232, "value": 1}, {"source": 233, "target": 209, "value": 1}, {"source": 233, "target": 234, "value": 1}, {"source": 233, "target": 235, "value": 1}, {"source": 233, "target": 236, "value": 1}, {"source": 233, "target": 159, "value": 1}, {"source": 233, "target": 237, "value": 1}, {"source": 233, "target": 210, "value": 1}, {"source": 233, "target": 238, "value": 1}, {"source": 233, "target": 239, "value": 1}, {"source": 233, "target": 240, "value": 1}, {"source": 233, "target": 241, "value": 1}, {"source": 233, "target": 242, "value": 1}, {"source": 233, "target": 243, "value": 1}, {"source": 233, "target": 244, "value": 1}, {"source": 245, "target": 115, "value": 1}, {"source": 246, "target": 247, "value": 1}, {"source": 248, "target": 74, "value": 1}, {"source": 13, "target": 238, "value": 1}, {"source": 106, "target": 62, "value": 1}, {"source": 106, "target": 249, "value": 1}, {"source": 13, "target": 27, "value": 1}, {"source": 13, "target": 209, "value": 1}, {"source": 103, "target": 250, "value": 1}, {"source": 40, "target": 251, "value": 1}, {"source": 175, "target": 252, "value": 1}, {"source": 169, "target": 251, "value": 1}, {"source": 115, "target": 169, "value": 1}, {"source": 232, "target": 231, "value": 1}, {"source": 75, "target": 253, "value": 1}, {"source": 75, "target": 40, "value": 1}, {"source": 175, "target": 174, "value": 1}, {"source": 254, "target": 137, "value": 1}, {"source": 249, "target": 212, "value": 1}, {"source": 249, "target": 255, "value": 1}, {"source": 249, "target": 256, "value": 1}, {"source": 222, "target": 74, "value": 1}, {"source": 183, "target": 257, "value": 1}, {"source": 17, "target": 218, "value": 1}, {"source": 183, "target": 198, "value": 1}, {"source": 183, "target": 258, "value": 1}, {"source": 183, "target": 183, "value": 1}, {"source": 19, "target": 12, "value": 1}, {"source": 259, "target": 72, "value": 1}, {"source": 259, "target": 260, "value": 1}, {"source": 75, "target": 261, "value": 1}, {"source": 115, "target": 170, "value": 1}, {"source": 251, "target": 169, "value": 1}, {"source": 262, "target": 262, "value": 1}, {"source": 263, "target": 263, "value": 1}, {"source": 264, "target": 265, "value": 1}, {"source": 264, "target": 266, "value": 1}, {"source": 264, "target": 267, "value": 1}, {"source": 106, "target": 268, "value": 1}, {"source": 269, "target": 45, "value": 1}, {"source": 129, "target": 270, "value": 1}, {"source": 271, "target": 272, "value": 1}, {"source": 81, "target": 256, "value": 1}, {"source": 46, "target": 139, "value": 1}, {"source": 46, "target": 15, "value": 1}, {"source": 46, "target": 273, "value": 1}, {"source": 46, "target": 272, "value": 1}, {"source": 46, "target": 274, "value": 1}, {"source": 46, "target": 164, "value": 1}, {"source": 46, "target": 216, "value": 1}, {"source": 46, "target": 45, "value": 1}, {"source": 275, "target": 276, "value": 1}, {"source": 277, "target": 277, "value": 1}, {"source": 155, "target": 114, "value": 1}, {"source": 158, "target": 62, "value": 1}, {"source": 129, "target": 278, "value": 1}, {"source": 101, "target": 101, "value": 1}, {"source": 29, "target": 40, "value": 1}, {"source": 279, "target": 107, "value": 1}, {"source": 155, "target": 208, "value": 1}, {"source": 231, "target": 280, "value": 1}, {"source": 281, "target": 281, "value": 1}, {"source": 282, "target": 283, "value": 1}, {"source": 155, "target": 284, "value": 1}, {"source": 46, "target": 46, "value": 1}, {"source": 160, "target": 28, "value": 1}, {"source": 160, "target": 23, "value": 1}, {"source": 285, "target": 286, "value": 1}, {"source": 285, "target": 211, "value": 1}, {"source": 258, "target": 183, "value": 1}, {"source": 69, "target": 287, "value": 1}, {"source": 280, "target": 231, "value": 1}, {"source": 212, "target": 249, "value": 1}, {"source": 162, "target": 288, "value": 1}, {"source": 162, "target": 71, "value": 1}, {"source": 162, "target": 84, "value": 1}, {"source": 280, "target": 289, "value": 1}, {"source": 280, "target": 270, "value": 1}, {"source": 280, "target": 196, "value": 1}, {"source": 280, "target": 168, "value": 1}, {"source": 280, "target": 167, "value": 1}, {"source": 280, "target": 290, "value": 1}, {"source": 280, "target": 203, "value": 1}, {"source": 280, "target": 14, "value": 1}, {"source": 280, "target": 291, "value": 1}, {"source": 280, "target": 284, "value": 1}, {"source": 280, "target": 129, "value": 1}, {"source": 280, "target": 130, "value": 1}, {"source": 280, "target": 292, "value": 1}, {"source": 293, "target": 19, "value": 1}, {"source": 254, "target": 226, "value": 1}, {"source": 129, "target": 294, "value": 1}, {"source": 189, "target": 106, "value": 1}, {"source": 295, "target": 296, "value": 1}, {"source": 165, "target": 115, "value": 1}, {"source": 287, "target": 69, "value": 1}, {"source": 287, "target": 80, "value": 1}, {"source": 74, "target": 248, "value": 1}, {"source": 74, "target": 297, "value": 1}, {"source": 74, "target": 73, "value": 1}, {"source": 298, "target": 299, "value": 1}, {"source": 281, "target": 137, "value": 1}, {"source": 147, "target": 62, "value": 1}, {"source": 147, "target": 249, "value": 1}, {"source": 62, "target": 300, "value": 1}, {"source": 301, "target": 248, "value": 1}, {"source": 302, "target": 303, "value": 1}, {"source": 303, "target": 302, "value": 1}, {"source": 304, "target": 303, "value": 1}, {"source": 252, "target": 233, "value": 1}, {"source": 252, "target": 166, "value": 1}, {"source": 252, "target": 121, "value": 1}, {"source": 252, "target": 145, "value": 1}, {"source": 252, "target": 115, "value": 1}, {"source": 136, "target": 115, "value": 1}, {"source": 92, "target": 22, "value": 1}, {"source": 303, "target": 304, "value": 1}, {"source": 268, "target": 106, "value": 1}, {"source": 252, "target": 212, "value": 1}, {"source": 252, "target": 288, "value": 1}, {"source": 252, "target": 58, "value": 1}, {"source": 252, "target": 175, "value": 1}, {"source": 252, "target": 305, "value": 1}, {"source": 252, "target": 48, "value": 1}, {"source": 12, "target": 293, "value": 1}, {"source": 306, "target": 62, "value": 1}, {"source": 281, "target": 2, "value": 1}, {"source": 236, "target": 209, "value": 1}, {"source": 236, "target": 238, "value": 1}, {"source": 236, "target": 235, "value": 1}, {"source": 236, "target": 243, "value": 1}, {"source": 236, "target": 244, "value": 1}, {"source": 102, "target": 97, "value": 1}, {"source": 175, "target": 15, "value": 1}, {"source": 6, "target": 5, "value": 1}, {"source": 17, "target": 307, "value": 1}, {"source": 17, "target": 308, "value": 1}, {"source": 17, "target": 1, "value": 1}, {"source": 17, "target": 177, "value": 1}, {"source": 17, "target": 74, "value": 1}, {"source": 17, "target": 309, "value": 1}, {"source": 17, "target": 215, "value": 1}, {"source": 17, "target": 248, "value": 1}, {"source": 17, "target": 220, "value": 1}, {"source": 17, "target": 310, "value": 1}, {"source": 17, "target": 85, "value": 1}, {"source": 17, "target": 311, "value": 1}, {"source": 17, "target": 221, "value": 1}, {"source": 17, "target": 312, "value": 1}, {"source": 17, "target": 222, "value": 1}, {"source": 17, "target": 313, "value": 1}, {"source": 17, "target": 223, "value": 1}, {"source": 17, "target": 0, "value": 1}, {"source": 17, "target": 224, "value": 1}, {"source": 17, "target": 314, "value": 1}, {"source": 17, "target": 225, "value": 1}, {"source": 17, "target": 315, "value": 1}, {"source": 17, "target": 226, "value": 1}, {"source": 17, "target": 73, "value": 1}, {"source": 17, "target": 316, "value": 1}, {"source": 17, "target": 317, "value": 1}, {"source": 17, "target": 228, "value": 1}, {"source": 245, "target": 318, "value": 1}, {"source": 35, "target": 62, "value": 1}, {"source": 236, "target": 319, "value": 1}, {"source": 167, "target": 167, "value": 1}, {"source": 167, "target": 201, "value": 1}, {"source": 167, "target": 133, "value": 1}, {"source": 167, "target": 18, "value": 1}, {"source": 320, "target": 321, "value": 1}, {"source": 254, "target": 62, "value": 1}, {"source": 322, "target": 45, "value": 1}, {"source": 220, "target": 177, "value": 1}, {"source": 215, "target": 295, "value": 1}, {"source": 321, "target": 320, "value": 1}, {"source": 102, "target": 323, "value": 1}, {"source": 102, "target": 300, "value": 1}, {"source": 147, "target": 212, "value": 1}, {"source": 147, "target": 42, "value": 1}, {"source": 147, "target": 105, "value": 1}, {"source": 11, "target": 324, "value": 1}, {"source": 21, "target": 173, "value": 1}, {"source": 21, "target": 325, "value": 1}, {"source": 21, "target": 10, "value": 1}, {"source": 21, "target": 20, "value": 1}, {"source": 21, "target": 306, "value": 1}, {"source": 21, "target": 326, "value": 1}, {"source": 21, "target": 327, "value": 1}, {"source": 21, "target": 230, "value": 1}, {"source": 328, "target": 329, "value": 1}, {"source": 64, "target": 229, "value": 1}, {"source": 215, "target": 5, "value": 1}, {"source": 209, "target": 236, "value": 1}, {"source": 18, "target": 62, "value": 1}, {"source": 73, "target": 330, "value": 1}, {"source": 73, "target": 248, "value": 1}, {"source": 73, "target": 331, "value": 1}, {"source": 73, "target": 297, "value": 1}, {"source": 73, "target": 17, "value": 1}, {"source": 290, "target": 290, "value": 1}, {"source": 141, "target": 332, "value": 1}, {"source": 69, "target": 306, "value": 1}, {"source": 139, "target": 46, "value": 1}, {"source": 333, "target": 114, "value": 1}, {"source": 334, "target": 335, "value": 1}, {"source": 336, "target": 337, "value": 1}, {"source": 336, "target": 116, "value": 1}, {"source": 336, "target": 165, "value": 1}, {"source": 336, "target": 115, "value": 1}, {"source": 336, "target": 136, "value": 1}, {"source": 336, "target": 338, "value": 1}, {"source": 336, "target": 169, "value": 1}, {"source": 336, "target": 251, "value": 1}, {"source": 336, "target": 135, "value": 1}, {"source": 336, "target": 339, "value": 1}, {"source": 340, "target": 134, "value": 1}, {"source": 251, "target": 336, "value": 1}, {"source": 58, "target": 57, "value": 1}, {"source": 341, "target": 74, "value": 1}, {"source": 341, "target": 309, "value": 1}, {"source": 341, "target": 215, "value": 1}, {"source": 341, "target": 311, "value": 1}, {"source": 341, "target": 222, "value": 1}, {"source": 341, "target": 316, "value": 1}, {"source": 191, "target": 342, "value": 1}, {"source": 191, "target": 277, "value": 1}, {"source": 191, "target": 149, "value": 1}, {"source": 191, "target": 262, "value": 1}, {"source": 191, "target": 343, "value": 1}, {"source": 191, "target": 344, "value": 1}, {"source": 191, "target": 345, "value": 1}, {"source": 191, "target": 346, "value": 1}, {"source": 191, "target": 214, "value": 1}, {"source": 191, "target": 347, "value": 1}, {"source": 191, "target": 348, "value": 1}, {"source": 191, "target": 349, "value": 1}, {"source": 191, "target": 350, "value": 1}, {"source": 191, "target": 284, "value": 1}, {"source": 191, "target": 351, "value": 1}, {"source": 191, "target": 231, "value": 1}, {"source": 191, "target": 278, "value": 1}, {"source": 191, "target": 130, "value": 1}, {"source": 191, "target": 178, "value": 1}, {"source": 191, "target": 122, "value": 1}, {"source": 191, "target": 179, "value": 1}, {"source": 191, "target": 352, "value": 1}, {"source": 191, "target": 207, "value": 1}, {"source": 353, "target": 354, "value": 1}, {"source": 353, "target": 185, "value": 1}, {"source": 90, "target": 13, "value": 1}, {"source": 114, "target": 155, "value": 1}, {"source": 288, "target": 233, "value": 1}, {"source": 142, "target": 355, "value": 1}, {"source": 356, "target": 357, "value": 1}, {"source": 114, "target": 113, "value": 1}, {"source": 47, "target": 339, "value": 1}, {"source": 194, "target": 194, "value": 1}, {"source": 194, "target": 195, "value": 1}, {"source": 63, "target": 137, "value": 1}, {"source": 43, "target": 358, "value": 1}, {"source": 63, "target": 63, "value": 1}, {"source": 359, "target": 360, "value": 1}, {"source": 86, "target": 128, "value": 1}, {"source": 64, "target": 5, "value": 1}, {"source": 160, "target": 187, "value": 1}, {"source": 114, "target": 361, "value": 1}, {"source": 232, "target": 103, "value": 1}, {"source": 244, "target": 236, "value": 1}, {"source": 160, "target": 190, "value": 1}, {"source": 69, "target": 212, "value": 1}, {"source": 335, "target": 334, "value": 1}, {"source": 114, "target": 129, "value": 1}, {"source": 243, "target": 271, "value": 1}, {"source": 184, "target": 190, "value": 1}, {"source": 212, "target": 69, "value": 1}, {"source": 62, "target": 18, "value": 1}, {"source": 44, "target": 362, "value": 1}, {"source": 44, "target": 293, "value": 1}, {"source": 271, "target": 243, "value": 1}, {"source": 310, "target": 62, "value": 1}, {"source": 252, "target": 105, "value": 1}, {"source": 88, "target": 303, "value": 1}, {"source": 153, "target": 62, "value": 1}, {"source": 363, "target": 283, "value": 1}, {"source": 363, "target": 161, "value": 1}, {"source": 363, "target": 280, "value": 1}, {"source": 363, "target": 256, "value": 1}, {"source": 363, "target": 211, "value": 1}, {"source": 363, "target": 364, "value": 1}, {"source": 363, "target": 106, "value": 1}, {"source": 363, "target": 236, "value": 1}, {"source": 363, "target": 365, "value": 1}, {"source": 363, "target": 249, "value": 1}, {"source": 114, "target": 263, "value": 1}, {"source": 114, "target": 318, "value": 1}, {"source": 145, "target": 87, "value": 1}, {"source": 145, "target": 252, "value": 1}, {"source": 263, "target": 114, "value": 1}, {"source": 39, "target": 28, "value": 1}, {"source": 105, "target": 252, "value": 1}, {"source": 153, "target": 366, "value": 1}, {"source": 165, "target": 28, "value": 1}, {"source": 165, "target": 114, "value": 1}, {"source": 165, "target": 169, "value": 1}, {"source": 165, "target": 367, "value": 1}, {"source": 37, "target": 37, "value": 1}, {"source": 52, "target": 185, "value": 1}, {"source": 187, "target": 329, "value": 1}, {"source": 187, "target": 106, "value": 1}, {"source": 220, "target": 223, "value": 1}, {"source": 52, "target": 52, "value": 1}, {"source": 52, "target": 368, "value": 1}, {"source": 252, "target": 304, "value": 1}, {"source": 252, "target": 96, "value": 1}, {"source": 252, "target": 89, "value": 1}, {"source": 252, "target": 88, "value": 1}, {"source": 252, "target": 302, "value": 1}, {"source": 252, "target": 369, "value": 1}, {"source": 116, "target": 169, "value": 1}, {"source": 362, "target": 44, "value": 1}, {"source": 362, "target": 293, "value": 1}, {"source": 184, "target": 298, "value": 1}, {"source": 169, "target": 116, "value": 1}, {"source": 178, "target": 176, "value": 1}, {"source": 265, "target": 264, "value": 1}, {"source": 236, "target": 363, "value": 1}, {"source": 195, "target": 194, "value": 1}, {"source": 40, "target": 370, "value": 1}, {"source": 238, "target": 236, "value": 1}, {"source": 170, "target": 136, "value": 1}, {"source": 353, "target": 371, "value": 1}, {"source": 86, "target": 205, "value": 1}, {"source": 86, "target": 41, "value": 1}, {"source": 190, "target": 184, "value": 1}, {"source": 372, "target": 373, "value": 1}, {"source": 288, "target": 162, "value": 1}, {"source": 160, "target": 113, "value": 1}, {"source": 54, "target": 211, "value": 1}, {"source": 180, "target": 343, "value": 1}, {"source": 55, "target": 58, "value": 1}, {"source": 160, "target": 263, "value": 1}, {"source": 62, "target": 153, "value": 1}, {"source": 374, "target": 44, "value": 1}, {"source": 58, "target": 208, "value": 1}, {"source": 62, "target": 340, "value": 1}, {"source": 14, "target": 290, "value": 1}, {"source": 170, "target": 115, "value": 1}, {"source": 5, "target": 215, "value": 1}, {"source": 80, "target": 375, "value": 1}, {"source": 376, "target": 377, "value": 1}, {"source": 22, "target": 92, "value": 1}, {"source": 94, "target": 201, "value": 1}, {"source": 58, "target": 162, "value": 1}, {"source": 55, "target": 54, "value": 1}, {"source": 295, "target": 378, "value": 1}, {"source": 295, "target": 379, "value": 1}, {"source": 295, "target": 103, "value": 1}, {"source": 295, "target": 380, "value": 1}, {"source": 295, "target": 381, "value": 1}, {"source": 295, "target": 382, "value": 1}, {"source": 295, "target": 376, "value": 1}, {"source": 295, "target": 181, "value": 1}, {"source": 295, "target": 383, "value": 1}, {"source": 295, "target": 384, "value": 1}, {"source": 295, "target": 283, "value": 1}, {"source": 295, "target": 157, "value": 1}, {"source": 295, "target": 385, "value": 1}, {"source": 295, "target": 386, "value": 1}, {"source": 295, "target": 387, "value": 1}, {"source": 295, "target": 388, "value": 1}, {"source": 295, "target": 389, "value": 1}, {"source": 295, "target": 390, "value": 1}, {"source": 295, "target": 61, "value": 1}, {"source": 295, "target": 391, "value": 1}, {"source": 295, "target": 392, "value": 1}, {"source": 295, "target": 393, "value": 1}, {"source": 295, "target": 394, "value": 1}, {"source": 295, "target": 250, "value": 1}, {"source": 295, "target": 395, "value": 1}, {"source": 295, "target": 396, "value": 1}, {"source": 295, "target": 397, "value": 1}, {"source": 295, "target": 398, "value": 1}, {"source": 295, "target": 377, "value": 1}, {"source": 295, "target": 368, "value": 1}, {"source": 295, "target": 104, "value": 1}, {"source": 295, "target": 321, "value": 1}, {"source": 295, "target": 60, "value": 1}, {"source": 295, "target": 150, "value": 1}, {"source": 295, "target": 320, "value": 1}, {"source": 295, "target": 295, "value": 1}, {"source": 40, "target": 35, "value": 1}, {"source": 37, "target": 30, "value": 1}, {"source": 133, "target": 307, "value": 1}, {"source": 133, "target": 399, "value": 1}, {"source": 133, "target": 167, "value": 1}, {"source": 133, "target": 400, "value": 1}, {"source": 133, "target": 133, "value": 1}, {"source": 133, "target": 401, "value": 1}, {"source": 133, "target": 232, "value": 1}, {"source": 133, "target": 291, "value": 1}, {"source": 133, "target": 284, "value": 1}, {"source": 133, "target": 206, "value": 1}, {"source": 133, "target": 402, "value": 1}, {"source": 133, "target": 52, "value": 1}, {"source": 133, "target": 179, "value": 1}, {"source": 133, "target": 403, "value": 1}, {"source": 68, "target": 21, "value": 1}, {"source": 404, "target": 166, "value": 1}, {"source": 113, "target": 160, "value": 1}, {"source": 405, "target": 106, "value": 1}, {"source": 306, "target": 69, "value": 1}, {"source": 113, "target": 47, "value": 1}, {"source": 43, "target": 406, "value": 1}, {"source": 43, "target": 407, "value": 1}, {"source": 103, "target": 378, "value": 1}, {"source": 103, "target": 377, "value": 1}, {"source": 103, "target": 321, "value": 1}, {"source": 157, "target": 395, "value": 1}, {"source": 213, "target": 155, "value": 1}, {"source": 263, "target": 160, "value": 1}, {"source": 4, "target": 63, "value": 1}, {"source": 4, "target": 286, "value": 1}, {"source": 183, "target": 282, "value": 1}, {"source": 286, "target": 4, "value": 1}, {"source": 213, "target": 61, "value": 1}, {"source": 213, "target": 320, "value": 1}, {"source": 61, "target": 380, "value": 1}, {"source": 2, "target": 195, "value": 1}, {"source": 114, "target": 256, "value": 1}, {"source": 114, "target": 365, "value": 1}, {"source": 2, "target": 305, "value": 1}, {"source": 286, "target": 174, "value": 1}, {"source": 183, "target": 303, "value": 1}, {"source": 377, "target": 376, "value": 1}, {"source": 408, "target": 408, "value": 1}, {"source": 377, "target": 103, "value": 1}, {"source": 164, "target": 216, "value": 1}, {"source": 409, "target": 409, "value": 1}, {"source": 305, "target": 2, "value": 1}, {"source": 305, "target": 63, "value": 1}, {"source": 2, "target": 2, "value": 1}, {"source": 410, "target": 329, "value": 1}, {"source": 355, "target": 256, "value": 1}, {"source": 355, "target": 365, "value": 1}, {"source": 135, "target": 135, "value": 1}, {"source": 132, "target": 411, "value": 1}, {"source": 132, "target": 132, "value": 1}, {"source": 114, "target": 340, "value": 1}, {"source": 412, "target": 4, "value": 1}, {"source": 412, "target": 2, "value": 1}, {"source": 183, "target": 129, "value": 1}, {"source": 201, "target": 94, "value": 1}, {"source": 63, "target": 3, "value": 1}, {"source": 63, "target": 62, "value": 1}, {"source": 57, "target": 137, "value": 1}, {"source": 2, "target": 412, "value": 1}, {"source": 157, "target": 191, "value": 1}, {"source": 135, "target": 336, "value": 1}, {"source": 172, "target": 413, "value": 1}, {"source": 172, "target": 123, "value": 1}, {"source": 193, "target": 193, "value": 1}, {"source": 3, "target": 63, "value": 1}, {"source": 377, "target": 61, "value": 1}, {"source": 296, "target": 296, "value": 1}, {"source": 63, "target": 174, "value": 1}, {"source": 96, "target": 96, "value": 1}, {"source": 149, "target": 148, "value": 1}, {"source": 414, "target": 415, "value": 1}, {"source": 306, "target": 306, "value": 1}, {"source": 61, "target": 377, "value": 1}, {"source": 195, "target": 2, "value": 1}, {"source": 258, "target": 329, "value": 1}, {"source": 267, "target": 19, "value": 1}, {"source": 5, "target": 5, "value": 1}, {"source": 327, "target": 21, "value": 1}, {"source": 327, "target": 416, "value": 1}, {"source": 327, "target": 173, "value": 1}, {"source": 48, "target": 50, "value": 1}, {"source": 48, "target": 75, "value": 1}, {"source": 263, "target": 417, "value": 1}, {"source": 50, "target": 87, "value": 1}, {"source": 50, "target": 49, "value": 1}, {"source": 50, "target": 71, "value": 1}, {"source": 50, "target": 84, "value": 1}, {"source": 418, "target": 62, "value": 1}, {"source": 418, "target": 184, "value": 1}, {"source": 418, "target": 299, "value": 1}, {"source": 216, "target": 164, "value": 1}, {"source": 9, "target": 19, "value": 1}, {"source": 214, "target": 345, "value": 1}, {"source": 214, "target": 351, "value": 1}, {"source": 419, "target": 290, "value": 1}, {"source": 29, "target": 420, "value": 1}, {"source": 9, "target": 421, "value": 1}, {"source": 366, "target": 366, "value": 1}, {"source": 417, "target": 263, "value": 1}, {"source": 87, "target": 422, "value": 1}, {"source": 87, "target": 154, "value": 1}, {"source": 87, "target": 41, "value": 1}, {"source": 87, "target": 145, "value": 1}, {"source": 87, "target": 50, "value": 1}, {"source": 254, "target": 186, "value": 1}, {"source": 422, "target": 87, "value": 1}, {"source": 115, "target": 136, "value": 1}, {"source": 249, "target": 105, "value": 1}, {"source": 423, "target": 417, "value": 1}, {"source": 16, "target": 424, "value": 1}, {"source": 284, "target": 155, "value": 1}, {"source": 13, "target": 301, "value": 1}, {"source": 38, "target": 25, "value": 1}, {"source": 38, "target": 26, "value": 1}, {"source": 38, "target": 40, "value": 1}, {"source": 425, "target": 426, "value": 1}, {"source": 115, "target": 427, "value": 1}, {"source": 417, "target": 423, "value": 1}, {"source": 118, "target": 117, "value": 1}, {"source": 86, "target": 189, "value": 1}, {"source": 329, "target": 187, "value": 1}, {"source": 174, "target": 63, "value": 1}, {"source": 21, "target": 68, "value": 1}, {"source": 329, "target": 410, "value": 1}, {"source": 231, "target": 172, "value": 1}, {"source": 154, "target": 87, "value": 1}, {"source": 428, "target": 429, "value": 1}, {"source": 184, "target": 299, "value": 1}, {"source": 430, "target": 249, "value": 1}, {"source": 282, "target": 212, "value": 1}, {"source": 282, "target": 121, "value": 1}, {"source": 282, "target": 83, "value": 1}, {"source": 282, "target": 424, "value": 1}, {"source": 71, "target": 162, "value": 1}, {"source": 71, "target": 431, "value": 1}, {"source": 71, "target": 432, "value": 1}, {"source": 71, "target": 433, "value": 1}, {"source": 71, "target": 83, "value": 1}, {"source": 71, "target": 84, "value": 1}, {"source": 13, "target": 36, "value": 1}, {"source": 270, "target": 129, "value": 1}, {"source": 434, "target": 215, "value": 1}, {"source": 132, "target": 285, "value": 1}, {"source": 179, "target": 157, "value": 1}, {"source": 115, "target": 338, "value": 1}, {"source": 435, "target": 435, "value": 1}, {"source": 435, "target": 147, "value": 1}, {"source": 39, "target": 23, "value": 1}, {"source": 424, "target": 15, "value": 1}, {"source": 424, "target": 45, "value": 1}, {"source": 115, "target": 337, "value": 1}, {"source": 115, "target": 436, "value": 1}, {"source": 115, "target": 123, "value": 1}, {"source": 115, "target": 437, "value": 1}, {"source": 115, "target": 165, "value": 1}, {"source": 115, "target": 336, "value": 1}, {"source": 115, "target": 438, "value": 1}, {"source": 115, "target": 251, "value": 1}, {"source": 115, "target": 439, "value": 1}, {"source": 115, "target": 135, "value": 1}, {"source": 115, "target": 339, "value": 1}, {"source": 138, "target": 137, "value": 1}, {"source": 105, "target": 249, "value": 1}, {"source": 440, "target": 413, "value": 1}, {"source": 440, "target": 275, "value": 1}, {"source": 440, "target": 178, "value": 1}, {"source": 394, "target": 104, "value": 1}, {"source": 414, "target": 414, "value": 1}, {"source": 29, "target": 23, "value": 1}, {"source": 441, "target": 360, "value": 1}, {"source": 20, "target": 86, "value": 1}, {"source": 85, "target": 17, "value": 1}, {"source": 30, "target": 23, "value": 1}, {"source": 85, "target": 41, "value": 1}, {"source": 417, "target": 442, "value": 1}, {"source": 23, "target": 115, "value": 1}, {"source": 417, "target": 443, "value": 1}, {"source": 417, "target": 444, "value": 1}, {"source": 212, "target": 282, "value": 1}, {"source": 212, "target": 145, "value": 1}, {"source": 137, "target": 57, "value": 1}, {"source": 27, "target": 23, "value": 1}, {"source": 438, "target": 35, "value": 1}, {"source": 434, "target": 23, "value": 1}, {"source": 255, "target": 249, "value": 1}, {"source": 139, "target": 129, "value": 1}, {"source": 139, "target": 445, "value": 1}, {"source": 417, "target": 113, "value": 1}, {"source": 417, "target": 114, "value": 1}, {"source": 140, "target": 139, "value": 1}, {"source": 140, "target": 446, "value": 1}, {"source": 140, "target": 447, "value": 1}, {"source": 140, "target": 448, "value": 1}, {"source": 438, "target": 169, "value": 1}, {"source": 139, "target": 342, "value": 1}, {"source": 35, "target": 438, "value": 1}, {"source": 321, "target": 104, "value": 1}, {"source": 414, "target": 449, "value": 1}, {"source": 115, "target": 23, "value": 1}, {"source": 55, "target": 56, "value": 1}, {"source": 55, "target": 57, "value": 1}, {"source": 324, "target": 11, "value": 1}, {"source": 23, "target": 434, "value": 1}, {"source": 57, "target": 55, "value": 1}, {"source": 450, "target": 434, "value": 1}, {"source": 29, "target": 438, "value": 1}, {"source": 338, "target": 116, "value": 1}, {"source": 250, "target": 150, "value": 1}, {"source": 160, "target": 405, "value": 1}, {"source": 363, "target": 154, "value": 1}, {"source": 74, "target": 177, "value": 1}, {"source": 74, "target": 74, "value": 1}, {"source": 19, "target": 267, "value": 1}, {"source": 288, "target": 217, "value": 1}, {"source": 288, "target": 84, "value": 1}, {"source": 438, "target": 29, "value": 1}, {"source": 451, "target": 452, "value": 1}, {"source": 284, "target": 160, "value": 1}, {"source": 437, "target": 135, "value": 1}, {"source": 178, "target": 177, "value": 1}, {"source": 135, "target": 437, "value": 1}, {"source": 116, "target": 338, "value": 1}, {"source": 86, "target": 453, "value": 1}, {"source": 454, "target": 357, "value": 1}, {"source": 169, "target": 438, "value": 1}, {"source": 210, "target": 210, "value": 1}, {"source": 405, "target": 160, "value": 1}, {"source": 169, "target": 338, "value": 1}, {"source": 248, "target": 142, "value": 1}, {"source": 73, "target": 73, "value": 1}, {"source": 437, "target": 455, "value": 1}, {"source": 456, "target": 456, "value": 1}, {"source": 84, "target": 82, "value": 1}, {"source": 84, "target": 121, "value": 1}, {"source": 65, "target": 457, "value": 1}, {"source": 73, "target": 215, "value": 1}, {"source": 21, "target": 212, "value": 1}, {"source": 212, "target": 21, "value": 1}, {"source": 458, "target": 129, "value": 1}, {"source": 164, "target": 46, "value": 1}, {"source": 177, "target": 176, "value": 1}, {"source": 177, "target": 178, "value": 1}, {"source": 139, "target": 164, "value": 1}, {"source": 62, "target": 283, "value": 1}, {"source": 152, "target": 147, "value": 1}, {"source": 21, "target": 74, "value": 1}, {"source": 107, "target": 113, "value": 1}, {"source": 107, "target": 417, "value": 1}, {"source": 107, "target": 114, "value": 1}, {"source": 147, "target": 152, "value": 1}, {"source": 333, "target": 62, "value": 1}, {"source": 223, "target": 459, "value": 1}, {"source": 406, "target": 11, "value": 1}, {"source": 40, "target": 48, "value": 1}, {"source": 238, "target": 244, "value": 1}, {"source": 253, "target": 75, "value": 1}, {"source": 260, "target": 74, "value": 1}, {"source": 417, "target": 62, "value": 1}, {"source": 113, "target": 417, "value": 1}, {"source": 106, "target": 405, "value": 1}, {"source": 62, "target": 333, "value": 1}, {"source": 139, "target": 429, "value": 1}, {"source": 434, "target": 450, "value": 1}, {"source": 434, "target": 460, "value": 1}, {"source": 434, "target": 365, "value": 1}, {"source": 68, "target": 80, "value": 1}, {"source": 275, "target": 172, "value": 1}, {"source": 461, "target": 45, "value": 1}, {"source": 116, "target": 336, "value": 1}, {"source": 283, "target": 308, "value": 1}, {"source": 462, "target": 463, "value": 1}, {"source": 216, "target": 216, "value": 1}, {"source": 207, "target": 41, "value": 1}, {"source": 448, "target": 140, "value": 1}, {"source": 448, "target": 272, "value": 1}, {"source": 448, "target": 46, "value": 1}, {"source": 448, "target": 45, "value": 1}, {"source": 244, "target": 238, "value": 1}, {"source": 62, "target": 441, "value": 1}, {"source": 338, "target": 123, "value": 1}, {"source": 268, "target": 459, "value": 1}, {"source": 464, "target": 280, "value": 1}, {"source": 465, "target": 155, "value": 1}, {"source": 422, "target": 404, "value": 1}, {"source": 466, "target": 421, "value": 1}, {"source": 142, "target": 187, "value": 1}, {"source": 160, "target": 18, "value": 1}, {"source": 61, "target": 295, "value": 1}, {"source": 467, "target": 152, "value": 1}, {"source": 58, "target": 305, "value": 1}, {"source": 26, "target": 38, "value": 1}, {"source": 26, "target": 40, "value": 1}, {"source": 351, "target": 180, "value": 1}, {"source": 148, "target": 468, "value": 1}, {"source": 265, "target": 19, "value": 1}, {"source": 314, "target": 17, "value": 1}, {"source": 160, "target": 284, "value": 1}, {"source": 455, "target": 375, "value": 1}, {"source": 91, "target": 469, "value": 1}, {"source": 283, "target": 282, "value": 1}, {"source": 170, "target": 470, "value": 1}, {"source": 102, "target": 2, "value": 1}, {"source": 393, "target": 378, "value": 1}, {"source": 393, "target": 379, "value": 1}, {"source": 393, "target": 103, "value": 1}, {"source": 393, "target": 381, "value": 1}, {"source": 393, "target": 376, "value": 1}, {"source": 393, "target": 181, "value": 1}, {"source": 393, "target": 385, "value": 1}, {"source": 393, "target": 388, "value": 1}, {"source": 393, "target": 390, "value": 1}, {"source": 393, "target": 61, "value": 1}, {"source": 393, "target": 392, "value": 1}, {"source": 393, "target": 393, "value": 1}, {"source": 393, "target": 394, "value": 1}, {"source": 393, "target": 296, "value": 1}, {"source": 393, "target": 250, "value": 1}, {"source": 393, "target": 395, "value": 1}, {"source": 393, "target": 397, "value": 1}, {"source": 393, "target": 377, "value": 1}, {"source": 393, "target": 368, "value": 1}, {"source": 393, "target": 104, "value": 1}, {"source": 393, "target": 321, "value": 1}, {"source": 393, "target": 60, "value": 1}, {"source": 393, "target": 150, "value": 1}, {"source": 393, "target": 320, "value": 1}, {"source": 393, "target": 295, "value": 1}, {"source": 232, "target": 52, "value": 1}, {"source": 375, "target": 455, "value": 1}, {"source": 171, "target": 40, "value": 1}, {"source": 471, "target": 472, "value": 1}, {"source": 471, "target": 255, "value": 1}, {"source": 105, "target": 473, "value": 1}, {"source": 105, "target": 434, "value": 1}, {"source": 152, "target": 467, "value": 1}, {"source": 280, "target": 464, "value": 1}, {"source": 474, "target": 91, "value": 1}, {"source": 126, "target": 13, "value": 1}, {"source": 176, "target": 292, "value": 1}, {"source": 470, "target": 170, "value": 1}, {"source": 79, "target": 62, "value": 1}, {"source": 258, "target": 62, "value": 1}, {"source": 166, "target": 424, "value": 1}]}
<html>
<head>
<title>
Email data visualization
</title>
<link rel='stylesheet' href='style.css'>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="d3-lasso.min.js"></script>
</head>
<body>
<div id="tooltip-holder"></div>
<span id='wrapper'>
<div>Emails sent less than</div>
<div class='graph-selector'></div>
<svg class="graph" width="1100" height="800" ></svg>
<svg class="scatter" width="960" height="600" ></svg>
<div>Emails sent less than</div>
<div class='scatter-selector'></div>
</span>
</body>
<script src="script.js"></script>
</html>
id sender receiver
0 41 32
1 1 51
2 84 77
3 56 62
4 89 74
5 156 124
6 109 93
7 67 49
8 28 34
9 33 27
10 34 41
11 72 62
12 50 46
13 172 61
14 73 55
15 37 45
16 47 68
17 106 61
18 42 46
19 58 62
20 54 64
21 129 111
22 14 13
23 64 68
24 37 26
25 18 32
26 23 30
27 45 51
28 78 96
29 46 48
30 57 55
31 43 39
32 23 32
33 19 24
34 26 23
35 44 53
36 20 43
37 32 22
38 41 29
39 16 33
40 53 48
41 74 66
42 67 50
43 8 11
44 83 92
45 38 38
46 49 68
47 37 47
48 51 46
49 10 13
50 12 15
51 48 62
52 24 18
53 31 27
54 48 42
55 36 35
56 41 39
57 60 54
58 115 103
59 44 46
60 52 39
61 63 55
62 190 179
63 114 104
64 113 136
65 84 40
66 26 20
67 7 8
68 40 39
69 60 41
70 12 16
71 14 15
72 6 6
73 29 25
74 82 76
75 18 14
76 15 22
77 17 18
78 0 23
79 35 35
80 58 61
81 89 92
82 227 121
83 119 86
84 130 48
85 28 35
86 202 154
87 125 109
88 20 30
89 53 57
90 22 24
91 29 27
92 39 38
93 76 51
94 34 37
95 40 37
96 107 97
97 24 21
98 17 23
99 19 23
100 38 36
101 21 25
102 21 16
103 33 43
104 16 32
105 119 115
106 102 128
107 204 169
108 37 37
109 4 4
110 6 9
111 1 8
112 8 17
113 72 74
114 127 109
115 112 101
116 69 68
117 13 15
118 29 24
119 1 13
120 14 14
121 222 157
122 22 21
123 29 30
124 35 33
125 24 20
126 25 28
127 20 16
128 110 132
129 136 139
130 1 36
131 50 46
132 58 52
133 93 73
134 21 21
135 23 35
136 17 27
137 67 77
138 30 29
139 30 36
140 31 33
141 67 68
142 120 99
143 41 45
144 10 11
145 61 47
146 27 14
147 45 37
148 17 14
149 26 24
150 23 32
151 31 42
152 48 60
153 46 23
154 36 38
155 63 53
156 17 20
157 70 54
158 40 43
159 33 34
160 334 212
161 26 35
162 42 51
163 42 37
164 41 39
165 101 92
166 125 127
167 65 49
168 61 63
169 105 96
170 82 87
171 28 39
172 74 70
173 67 63
174 59 65
175 9 8
176 31 25
177 44 41
178 29 29
179 39 49
180 70 68
181 54 45
182 44 28
183 159 143
184 61 72
185 22 10
186 20 20
187 49 39
188 34 26
189 38 61
190 26 29
191 56 47
192 18 19
193 24 25
194 34 42
195 33 29
196 28 23
197 24 33
198 35 19
199 45 38
200 22 34
201 51 43
202 1 6
203 0 39
204 20 28
205 14 27
206 55 44
207 14 29
208 9 52
209 79 60
210 64 77
211 145 118
212 108 101
213 45 36
214 36 50
215 73 75
216 24 26
217 19 15
218 54 43
219 2 18
220 10 14
221 43 54
222 47 56
223 47 41
224 9 10
225 20 25
226 47 46
227 1 19
228 1 22
229 27 27
230 19 17
231 58 49
232 79 77
233 54 45
234 43 34
235 20 18
236 35 48
237 26 23
238 39 36
239 0 11
240 17 20
241 17 20
242 23 28
243 42 46
244 20 27
245 37 47
246 15 12
247 10 15
248 16 20
249 160 112
250 24 30
251 33 31
252 113 82
253 35 23
254 83 29
255 46 45
256 52 118
257 14 16
258 51 32
259 25 25
260 18 19
261 31 43
262 23 22
263 56 47
264 35 27
265 36 31
266 29 23
267 10 18
268 30 29
269 64 69
270 7 12
271 59 58
272 38 41
273 25 24
274 8 23
275 32 25
276 2 9
277 16 16
278 40 40
279 7 9
280 95 104
281 57 45
282 117 106
283 118 120
284 40 35
285 76 68
286 35 41
287 17 17
288 32 28
289 0 8
290 66 67
291 24 22
292 24 34
293 17 16
294 18 22
295 78 55
296 21 70
297 13 19
298 14 9
299 19 21
300 70 40
301 87 116
302 18 23
303 87 83
304 22 28
305 54 52
306 40 32
307 20 12
308 24 35
309 41 29
310 23 24
311 23 31
312 20 21
313 6 17
314 47 32
315 0 8
316 24 38
317 18 19
318 46 50
319 1 11
320 42 40
321 53 37
322 24 20
323 32 31
324 11 14
325 14 26
326 23 37
327 28 29
328 15 16
329 77 85
330 6 9
331 20 19
332 23 18
333 125 94
334 15 18
335 20 23
336 22 32
337 30 37
338 48 52
339 49 40
340 72 92
341 8 9
342 66 44
343 15 20
344 16 14
345 20 23
346 24 24
347 13 24
348 2 4
349 18 18
350 18 20
351 48 43
352 19 21
353 37 29
354 8 10
355 43 41
356 30 47
357 40 42
358 48 40
359 32 20
360 17 28
361 32 47
362 49 62
363 44 39
364 2 9
365 2 90
366 79 86
367 65 71
368 34 45
369 6 6
370 34 14
371 64 76
372 23 22
373 39 23
374 18 9
375 58 53
376 44 36
377 131 88
378 9 24
379 52 34
380 32 33
381 27 27
382 0 5
383 1 6
384 0 16
385 15 21
386 0 8
387 37 23
388 18 23
389 30 34
390 44 29
391 11 19
392 9 19
393 75 66
394 29 30
395 27 36
396 1 14
397 29 34
398 0 4
399 8 18
400 31 29
401 41 32
402 1 9
403 8 17
404 77 61
405 110 83
406 18 25
407 14 22
408 52 38
409 84 30
410 8 9
411 95 74
412 64 60
413 25 24
414 11 3
415 3 3
416 1 3
417 55 53
418 20 29
419 91 72
420 106 109
421 16 48
422 38 31
423 36 32
424 113 90
425 32 17
426 52 46
427 47 47
428 23 23
429 30 30
430 44 41
431 11 23
432 1 7
433 19 19
434 157 151
435 14 4
436 0 3
437 32 26
438 79 76
439 0 3
440 64 63
441 30 44
442 10 22
443 45 42
444 26 25
445 20 24
446 19 22
447 26 28
448 36 33
449 0 1
450 68 53
451 12 8
452 38 29
453 26 20
454 7 7
455 53 51
456 3 2
457 21 25
458 39 41
459 42 65
460 36 44
461 24 16
462 19 25
463 2 2
464 35 43
465 14 9
466 44 36
467 18 20
468 0 21
469 12 18
470 19 21
471 11 8
472 0 7
473 91 75
474 65 61
//Read from files
var csvData;
const row = d=>{
d.sender=+d.sender;
d.receiver=+d.receiver;
return d;
}
var selectData=[{ "text": "0" },{ "text": "100" }, { "text": "200" },
{ "text": "300" },{ "text": "400" }
]
function addSelector(selector, change, data) {
var yinput = d3.select(selector)
.append('select')
.attr('id', 'xselect').on('change', change)
.selectAll('option')
.data(data)
.enter().append('option')
.attr('value', function (d) { return d.text })
.text(function (d) { return d.text; })
}
//Some global objects
var tooltip = d3.select('#tooltip-holder')
.append('div').attr('class', 'tooltip')
.style('opacity', 0);
//Tooltip
var tipMouseover = function (d) {
const colorFilter = input=>{
if (input.id==String(d.id)){
return 'red'
}
else{
return 'blue';
}
}
const radiusFilter = input=>{
if (input.id==String(d.id)){
return 10
}
else{
return 4;
}
}
if (d.sender == undefined){
//This is the graph
d3.selectAll('.scatter-circle').attr('fill',d=>colorFilter(d)).attr('r',d=>radiusFilter(d));
}
else{
//This is the scatterplot
d3.selectAll('.graph-circle').attr('fill',d=>colorFilter(d)).attr('r',d=>radiusFilter(d));
}
// console.log(d);
tdata=csvData.filter(t=>t.id==d.id);
var chtml = ` <b>Id</b>: ${d.id}<br/><b>Email sent</b>: ${tdata[0].sender}<br/>
<b>Emails received:</b> ${tdata[0].receiver}`;
tooltip.html(chtml)
.style("left", (d3.event.pageX + 15) + "px")
.style("top", (d3.event.pageY - 28) + "px")
.transition()
.duration(200)
.style("opacity", .9)
};
// tooltip mouseout event handler
var tipMouseout = function (d) {
d3.selectAll('.scatter-circle').attr('fill','blue').attr('r',4);
d3.selectAll('.graph-circle').attr('fill','blue').attr('r',4);
tooltip.transition()
.duration(300) // ms
.style("opacity", 0);
};
var graphSvg=d3.select('.graph');
var graphWidth=graphSvg.attr('width');
var graphHeight=graphSvg.attr('height');
var scatterSvg=d3.select('.scatter');
var scatterWidth=+scatterSvg.attr('width');
var scatterHeight=+scatterSvg.attr('height');
// Read files
d3.csv('reader_writer.csv',row,data=>{
d3.json('idjson',graph=>{
// console.log(graph);
csvData=data;
renderScatterPlot(data);
renderGraph(graph);
})
// console.log(senderReceiver);
});
// d3.json('idjson',graph=>{
// // console.log(graph);
// // renderGraph(graph);
// })
const colorFilter = (idList,d)=>{
d.id=+d.id;
idList=idList.map(dat=>+dat);
if (idList.indexOf(d.id)>=0){
return 'red'
}
else{
return 'blue';
}
}
const radiusFilter = (idList,d)=>{
d.id=+d.id;
idList=idList.map(dat=>+dat);
if (idList.indexOf(d.id)>=0){
return 10
}
else{
return 4;
}
}
//Scatterplot rendered here
function renderScatterPlot(data){
const xLabel='Emails sent';
const yLabel='Emails received';
const xValue= d=> d.sender;
const yvalue= d=> d.receiver;
//Domain and Range. domain data, range pixel coordinates
const xScale=d3.scaleLinear();
const yScale=d3.scaleLinear();
//Setting margins for cut off data
const margin={
left: 100,
right: 300,
top: 20,
bottom: 100
};
const innerWidth=scatterWidth-margin.left-margin.right;
const innerHeight=scatterHeight-margin.top-margin.bottom;
const g = scatterSvg.append('g').attr('transform',`translate(${margin.left},${margin.top})`)
//Putting in the axis
const xAxisG = g.append('g').attr('transform',`translate(0,${innerHeight})`)
const yAxisG = g.append('g')
xAxisG.append('text').attr('class','axis-label').text(xLabel).attr('x',innerWidth/2)
.attr('y',60)
yAxisG.append('text').attr('class','axis-label')
.attr('transform',`rotate(-90)`)
.attr('x',-innerHeight/2)
.attr('y',-50)
.style('text-anchor','middle')
.text(yLabel)
const xAxis = d3.axisBottom().scale(xScale);
const yAxis = d3.axisLeft().scale(yScale);
//Setting scales
xScale.domain(d3.extent(data,xValue))
.range([0,innerWidth]).nice();
yScale.domain(d3.extent(data,yvalue))
.range([innerHeight,0]).nice();
var circles=g.selectAll('circle')
.data(data).enter().append('circle')
.attr('class','scatter-circle')
.attr('cx',d=>xScale(xValue(d)))
.attr('cy',d=>yScale(yvalue(d)))
.attr('r',4)
.attr('fill','blue')
.on('mouseover',tipMouseover)
.on('mouseout',tipMouseout);
xAxisG.call(xAxis);
yAxisG.call(yAxis);
var lassoStart = d=>{
lasso.items().classed("selected",false);
}
var lassoEnd = function() {
idList=[]
selectedItems=lasso.selectedItems();
selectedItems.each(d=>{
idList.push(d.id);
})
selectedItems.classed("selected",true);
d3.selectAll('.graph-circle').attr('fill',d=>colorFilter(idList,d))
.attr('r',d=>radiusFilter(idList,d));
lasso.notSelectedItems();
};
//Lasso selector we are using d3.lasso library
var lasso=d3.lasso()
.closePathSelect(true)
.closePathDistance(100)
.items(circles).targetArea(scatterSvg)
.on('start',lassoStart)
.on('end',lassoEnd);
scatterSvg.call(lasso);
function scatterChange(){
console.log(this.value);
d3.selectAll('.scatter-circle').attr('fill',d=>{
if (d.sender<+this.value){
return 'green'
}
else{
return 'blue'
}
});
}
addSelector('.scatter-selector',scatterChange,selectData);
}
function renderGraph(graph){
var simulation=d3.forceSimulation()
.force("link_force",d3.forceLink().id(d=>d.id))
.force("charge_force",d3.forceManyBody().strength(-2))
.force("center_force",d3.forceCenter(graphWidth/2,graphHeight/2));
// var force = d3.layout.force()
// .gravity(0.05).charge(-24).linkDistance(50).size([graphWidth,graphHeight])
var link = graphSvg.append('g')
.attr('class','link')
.selectAll('line').data(graph.links)
.enter().append('line');
var node = graphSvg.append('g').attr('class','node')
.selectAll('circle').data(graph.nodes).enter().append('circle').attr('class','graph-circle')
.on('mouseover',tipMouseover).on('mouseout',tipMouseout).attr('r',4).attr('fill','blue');
//tick for rendering
function ticked(){
link.attr('x1',d=>d.source.x)
.attr('x2',d=>d.target.x)
.attr('y1',d=>d.source.y)
.attr('y2',d=>d.target.y);
node.attr('cx',d=>d.x).attr('cy',d=>d.y)
}
// force.nodes(graph.nodes).links(graph.links).on('tick',ticked).start()
//force simulation
simulation.nodes(graph.nodes).on('tick',ticked);
simulation.force('link_force').links(graph.links);
var lassoStart = d=>{
lasso.items().classed("selected",false);
}
var lassoEnd = function() {
idList=[]
selectedItems=lasso.selectedItems();
selectedItems.each(d=>{
idList.push(d.id);
})
selectedItems.classed("selected",true);
d3.selectAll('.scatter-circle').attr('fill',d=>colorFilter(idList,d))
.attr('r',d=>radiusFilter(idList,d));
lasso.notSelectedItems();
};
var lasso=d3.lasso()
.closePathSelect(true)
.closePathDistance(100)
.items(node).targetArea(graphSvg)
.on('start',lassoStart)
.on('end',lassoEnd);
graphSvg.call(lasso);
function graphChange(){
console.log(this.value);
d3.selectAll('.graph-circle').attr('fill',d=>{
tdata=csvData.filter(t=>t.id==d.id);
if (tdata[0].sender<+this.value){
return 'green'
}
else{
return 'blue'
}
});
}
//selector added
addSelector('.graph-selector',graphChange,selectData);
}
.link line {
stroke: #999;
stroke-opacity: 0.6;
}
.node circle {
stroke: #fff;
stroke-width: 1.5px;
}
.tooltip {
position: absolute;
font-size: 16px;
width: auto;
height: auto;
pointer-events: none;
background-color: white;
}
.axis-label{
font-size: 30pt;
fill: black;
font-family: sans-serif;
}
.lasso path {
stroke: rgb(80,80,80);
stroke-width:2px;
}
.lasso .drawn {
fill-opacity:.05 ;
}
.lasso .loop_close {
fill:none;
stroke-dasharray: 4,4;
}
.lasso .origin {
fill:#3399FF;
fill-opacity:.5;
}
.selected {
fill: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment