Skip to content

Instantly share code, notes, and snippets.

View terrysmith2000's full-sized avatar

terrysmith2000

View GitHub Profile
@terrysmith2000
terrysmith2000 / _.md
Created August 7, 2013 13:43
horizontal stacked bar, copy
@terrysmith2000
terrysmith2000 / _.md
Created August 7, 2013 12:15
ascii img chinese EJ2
@terrysmith2000
terrysmith2000 / _.md
Created August 7, 2013 12:14
horizontal stacked bar, copy
@terrysmith2000
terrysmith2000 / _.md
Created August 6, 2013 21:28
Negative Stacked Bar Charts
@terrysmith2000
terrysmith2000 / _.md
Created August 6, 2013 20:48
Tributary inlet
@terrysmith2000
terrysmith2000 / index.html
Created August 18, 2012 23:39 — forked from mbostock/.block
Interactive Force-Directed Layout (D3)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Force-Directed Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.25.0"></script>
<style type="text/css">
@terrysmith2000
terrysmith2000 / a_chart.js
Created August 13, 2012 14:22 — forked from jhaubrich/a_chart.js
multiline chart using nvd3's preferred json structure
var chart = d3.select("#chart").append("svg")
.attr("width", w)
.attr("height", h)
.append("g")
.attr("id", "plotarea")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
// DRAW DATALINES
path = chart.selectAll("path.dataline")
.data(data)
@terrysmith2000
terrysmith2000 / barDiv.js
Created July 26, 2012 18:01 — forked from gmp26/barDiv.js
Stacked or grouped bars with zoom
(function() {
var n = 9, // number of layers
m = 1, // number of samples per layer
sourceData = stream_layers(n, m, 0.1);
/*
sourceData = [
[{x:0,y:9800}],
[{x:0,y:128}],
[{x:0,y:60}],
<!DOCTYPE html>
<meta charset="utf-8">
<title>The Wealth & Health of Nations</title>
<style>
@import url(bost.ocks.org/mike/style.css?20120427);
#chart {
margin-left: -40px;
height: 506px;
@terrysmith2000
terrysmith2000 / bubble.js
Created July 12, 2012 12:04
from scratch WoN
// Various accessors that specify the four dimensions of data to visualize.
function x(d) { return d.income; }
function y(d) { return d.lifeExpectancy; }
function radius(d) { return d.population; }
function color(d) { return d.region; }
function key(d) { return d.name; }
// Chart dimensions.
var margin = {top: 19.5, right: 19.5, bottom: 19.5, left: 39.5},
width = 960 - margin.right,