Skip to content

Instantly share code, notes, and snippets.

View emeeks's full-sized avatar

Elijah Meeks emeeks

View GitHub Profile
@emeeks
emeeks / cosit.gexf
Last active August 29, 2015 13:57
GEXF D3 Complex Example
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2" xmlns:viz="http://www.gexf.net/1.2draft/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd">
<meta lastmodifieddate="2014-03-04">
<creator>Gephi 0.8.1</creator>
<description></description>
</meta>
<graph defaultedgetype="directed" mode="static">
<attributes class="node" mode="static">
<attribute id="startyr" title="startyr" type="integer"></attribute>
<attribute id="title" title="title" type="string"></attribute>
@emeeks
emeeks / edgelist.csv
Last active August 29, 2015 13:57
Arc Diagram
source target weight
sam tully 3
sam pat 8
sam kim 2
sam pris 1
roy pris 5
roy sam 1
tully sam 1
tully pris 5
tully kim 3
@emeeks
emeeks / index.html
Last active August 29, 2015 13:57
Handcrafting TopoJSON
<!DOCTYPE html>
<meta charset="utf-8">
<body onload="vorToTopo()">
<svg style="height:1000px;width:1000px;"c height="1000" width="1000">
</svg>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="vorpoly.js"></script>
<script>
@emeeks
emeeks / index.html
Last active August 29, 2015 13:58
Topojson Import into Force-Directed
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>topojson import into force directed network</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<style>
</style>
@emeeks
emeeks / index.html
Last active August 29, 2015 13:59
Merge Countries Based on Centroid
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Satellite Projection Explorer</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/d3.geo.projection.v0.min.js"></script>
<script src="http://d3js.org/colorbrewer.v1.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<style>
@emeeks
emeeks / index.html
Last active August 29, 2015 14:00
D3 Tile Map with Hand-Drawn Polygon
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>D3 in Action Examples</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript">
</script>
<script src="http://d3js.org/d3.geo.projection.v0.min.js" type="text/javascript">
</script>
<script src="tile.js" type="text/javascript">
@emeeks
emeeks / index.html
Last active August 29, 2015 14:00
Sortable Spreadsheet
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>D3 in Action Sortable Spreadhseet Example</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript">
</script>
<style>
div.data {
@emeeks
emeeks / index.html
Last active August 29, 2015 14:00
Dynamic Image Gallery
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>D3 in Action Gallery Example 1</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://d3js.org/colorbrewer.v1.min.js"></script>
<style>
#gallery {
@emeeks
emeeks / index.html
Last active August 29, 2015 14:00
Dynamic Image Gallery with Zoom To Select Element
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>D3 in Action Gallery Example 2</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://d3js.org/colorbrewer.v1.min.js"></script>
<style>
@emeeks
emeeks / d3.vorTopo.js
Last active August 29, 2015 14:00
Voronoi Topology + TopoJSON merge Artifact
!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function r(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return ha+n in this}function c(n){return n=ha+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===ga&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===ga)return!1;return!0}function h(){}function g(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function p(n,