Skip to content

Instantly share code, notes, and snippets.

@danharr
danharr / index.html
Last active December 14, 2016 10:33
grid force layout
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Media Plan</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>
<style type="text/css">
.sections {
float:left;
@danharr
danharr / index.html
Last active December 14, 2016 10:34
Gallery
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Gallery</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>
<style>
.thumbs {
width:250px;
@danharr
danharr / index.html
Last active December 14, 2016 10:34
Data2DecisionMakers
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>line growing example d3js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>
<style>
@danharr
danharr / app.js
Last active August 29, 2015 14:06
Radian | Angular | d3
'use strict';
function EgCtrl(plotLib, $http, $scope, $location) {
plotLib.midMonths = function(ms, y) {
return ms.map(function(m) { return new Date(y, m, 15); });
};
// Turn a vector of [[x1,y1], [x2,y2], ..., [xn,yn]] into a vector
// of y-values interpolated to [f, ..., t].
plotLib.fillIn = function(d, f, t) {
@danharr
danharr / Golden.csv
Last active August 29, 2015 14:06
London Postboxes
Athlete Event Town Address ycoord xcoord ID
Nicola Adams Boxing – Women's flyweight Leeds Cookridge Street[2] 53.7999 -1.5472 Postbox1
Ben Ainslie Sailing – Men's Finn Restronguet Pandora Inn[2] 50.1948 -5.0642 Postbox2
Lymington High Street, Lymington[30] 50.7589 -1.5388 Postbox3
Tim Baillie Canoeing – Men's slalom C-2 Westhill[2] Westhill Drive North[2] 57.1595 -2.2818 Postbox4
Westhill[2][21] Westhill Drive South[2][21] 57.1538 -2.2767 Postbox5
Laura Bechtolsheimer Equestrian – Team dressage Ampney St Peter High Street 51.7114 -1.8835 Postbox6
Scott Brash Equestrian – Team jumping Peebles 41 High Street[2] 55.6515 -3.1909 Postbox7
Alistair Brownlee Men's triathlon Horsforth Craghill Post Office, New Road Side[2] 53.832 -1.6408 Postbox8
Steven Burke Cycling – Men's team pursuit Colne Albert Road/Crabtree Street[2] 53.8551 -2.1786 Postbox9
@danharr
danharr / d3.tip.v0.6.3.js
Last active December 14, 2016 10:24
Project Progression Visual
// d3.tip
// Copyright (c) 2013 Justin Palmer
//
// Tooltips for d3.js SVG visualizations
// Public - contructs a new tooltip
//
// Returns a tip
d3.tip = function() {
var direction = d3_tip_direction,
@danharr
danharr / _.md
Last active August 29, 2015 14:06
projects status
@danharr
danharr / _.md
Created August 26, 2014 13:31
crosfilter training
@danharr
danharr / donut.csv
Last active August 29, 2015 14:05
Demo Dashboard
product sales
a 2900
b 700
@danharr
danharr / _.md
Created August 5, 2014 12:47
WoN