Skip to content

Instantly share code, notes, and snippets.

View emeeks's full-sized avatar

Elijah Meeks emeeks

View GitHub Profile
@emeeks
emeeks / d3.sketchy.js
Last active March 16, 2016 15:49
d3.sketchy bug
/*global d3:false */
/*jshint unused:false*/
/**
* Initiate the sketchy library
* @constructor
*/
var d3sketchy = function(){
/**
@emeeks
emeeks / README.md
Last active August 29, 2015 14:26
Non-Rotating SVG Transparent Globe
@emeeks
emeeks / clinton.csv
Last active March 16, 2016 15:50
Offset Edges 1
source target edgeNumber
Clinton '92 Clinton Admin 1
Clinton '92 Clinton Admin 2
Clinton '92 Clinton Admin 3
Clinton '92 Kerry '04 1
Clinton '96 Clinton Admin 1
Clinton '96 Obama '08 1
Clinton Admin Clinton '96 1
Clinton Admin Clinton Senate '00 1
Clinton Admin Clinton Senate '00 2
@emeeks
emeeks / firm.csv
Last active March 16, 2016 15:50
Example of d3.layout.forceInABox
source target weight
1 3 5
1 8 3
1 9 3
1 12 3
1 15 2
1 23 3
1 26 2
1 37 2
1 46 2
@emeeks
emeeks / cola.min.js
Last active March 16, 2016 15:50
Simple cola.js example with graph generator
//Based on js_bintrees:
//
//https://github.com/vadimg/js_bintrees
//
//Copyright (C) 2011 by Vadim Graboys
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@emeeks
emeeks / firm.csv
Last active May 16, 2020 14:43
Networks - Graphs 8
1 3 5
1 8 3
1 9 3
1 12 3
1 15 2
1 23 3
1 26 2
1 37 2
1 46 2
@emeeks
emeeks / firm.csv
Last active March 17, 2016 02:04
Networks - Graphs 7
1 3 5
1 8 3
1 9 3
1 12 3
1 15 2
1 23 3
1 26 2
1 37 2
1 46 2
@emeeks
emeeks / firm.csv
Last active September 25, 2023 09:13
Networks - Graphs 6
1 3 5
1 8 3
1 9 3
1 12 3
1 15 2
1 23 3
1 26 2
1 37 2
1 46 2
@emeeks
emeeks / firm.csv
Last active March 17, 2016 02:04
Networks - Graphs 5
1 3 5
1 8 3
1 9 3
1 12 3
1 15 2
1 23 3
1 26 2
1 37 2
1 46 2
@emeeks
emeeks / d3.legend.min.js
Last active March 17, 2016 02:04
Networks - Graphs 4
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("./legend");b.exports=function(){function a(a){var r=d.d3_calcType(c,j,k,m,p),s=a.selectAll(".cell").data(r.data),t=s.enter().append("g",".cell").attr("class","cell").style("opacity",1e-6);shapeEnter=t.append(e).attr("class","swatch"),shapes=s.select("g.cell "+e),s.exit().transition().style("opacity",0).remove(),d.d3_drawShapes(e,shapes,g,f,h,b),d.d3_addText(a,t,r.labels);var u=s.select("text"),v=shapes[0].map(function(a){return a.getBBox()});l?shapes.attr("class",function(a){return"swatch "+r.feature(a)}):"line"==e?shapes.style("stroke",r.feature):sha