Skip to content

Instantly share code, notes, and snippets.

@milroc
milroc / d3.v3.min.js
Created March 28, 2014 20:28
Imports for Blocks
!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,
@milroc
milroc / flare.json
Created March 28, 2014 20:23
Data for bl.ocks
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
@milroc
milroc / _.md
Created March 27, 2014 22:20
bars
@milroc
milroc / index.html
Last active August 29, 2015 13:57
Contextually aware axis ticks
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
<style>
.axis text {
font: 14px 'Inconsolata';
}
@milroc
milroc / charts.js
Last active August 29, 2015 13:56
urban data hacking
d3.custom = {};
d3.custom.utils = {};
d3.custom.utils.windowResize = function() {};
d3.custom.heatmap = function() {
// basic data
var margin = {top: 0, bottom: 0, left: 0, right: 0},
@milroc
milroc / README.md
Last active October 14, 2021 22:33

d3.unconf example gist. Fork it here.

@milroc
milroc / README.md
Last active January 4, 2016 03:49 — forked from mbostock/.block

Click on any arc to zoom in. Click on the center circle to zoom out.

A sunburst is similar to a treemap, except it uses a radial layout. The root node of the tree is at the center, with leaves on the circumference. The area (or angle, depending on implementation) of each arc corresponds to its value. Sunburst design by John Stasko. Data courtesy Jeff Heer.

@milroc
milroc / index.html
Created January 22, 2014 02:04 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
rect {
stroke: #fff;
}
</style>
<body>
@milroc
milroc / README.md
Created January 22, 2014 01:31 — forked from mbostock/.block

This bar chart visualizes hierarchical data using D3. Each blue bar represents a folder, whose length encodes the total size of all files in that folder (and all subfolders). Clicking on a bar dives into that folder, while clicking on the background bubbles back up to the parent folder. The effect is similar to a zoomable partition layout, though in a more conventional display.