Skip to content

Instantly share code, notes, and snippets.

View trebor's full-sized avatar

Robert Harris trebor

  • Sam Clam's Disco
View GitHub Profile
@trebor
trebor / .block
Last active December 13, 2017 19:45
N Little Circles
license: mit
@trebor
trebor / chart.js
Created October 25, 2016 20:47
Matterport Chocolate Tasting
var SAMPLE_COUNT = 13;
var NAME_AREA_WIDTH = 450;
function initialize(elementId) {
var margin = {top: 150, bottom: 50, left: 25, right: 50};
var svgWidth = $(elementId).width();
var svgHeight = $(elementId).height();
var width = svgWidth - (margin.left + margin.right);
var height = svgHeight - (margin.top + margin.bottom);
@trebor
trebor / .block
Last active October 25, 2016 19:49
Shaker
license: gpl-3.0
height: 600
@trebor
trebor / index.html
Last active September 29, 2016 18:52
Nautiloid
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nautiloid</title>
<link type="text/css" rel="stylesheet" href="nautiloid.css"/>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
<script src="//d3js.org/d3.v3.min.js"></script>
<script src="./nautiloid.js"></script>
</head>
@trebor
trebor / fetal.json
Last active September 2, 2016 19:15 — forked from kristw/fetal.json
Fetal growth chart
[{"week":8,"length":1.6,"mass":1},
{"week":9,"length":2.3,"mass":2},
{"week":10,"length":3.1,"mass":4},
{"week":11,"length":4.1,"mass":7},
{"week":12,"length":5.4,"mass":14},
{"week":13,"length":7.4,"mass":23},
{"week":14,"length":8.7,"mass":43},
{"week":15,"length":10.1,"mass":70},
{"week":16,"length":11.6,"mass":100},
{"week":17,"length":13,"mass":140},
@trebor
trebor / index.html
Last active September 2, 2016 19:16 — forked from treboresque/index.html
Sierpinski Charlet
<!DOCTYPE html>
<html >
<head>
<title>Sierpinski</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="chart"></div>
@trebor
trebor / index.html
Last active September 2, 2016 19:15 — forked from treboresque/index.html
Face Chartlet
<!DOCTYPE html>
<html >
<head>
<title>Faces</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="chart"></div>
@trebor
trebor / flare.json
Last active September 2, 2016 19:17 — forked from treboresque/flare.json
Sunburst
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
@trebor
trebor / README.md
Last active September 2, 2016 18:58 — forked from kristw/README.md
Bar Chart

This example is a slight modification from Mike Bostock's bar chart example. d3Kit was used to construct the <svg> and setup all the margins.

This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language. The chart employs conventional margins and a number of D3 features:

@trebor
trebor / index.html
Last active September 2, 2016 19:16 — forked from kristw/index.html
d3Kit.Skeleton
<!DOCTYPE html>
<html>
<head>
<title>d3Kit.Skeleton</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="chart"></div>