Skip to content

Instantly share code, notes, and snippets.

@biovisualize
biovisualize / _.md
Created January 17, 2013 21:39 — forked from enjalot/inlet.js
Simple multi-line chart
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v2.min.js"></script>
<style>
body {
font: 10px sans-serif;
@biovisualize
biovisualize / README.md
Last active December 10, 2015 12:08 — forked from oscar6echo/README.md
@biovisualize
biovisualize / README.md
Last active December 10, 2015 12:08 — forked from oscar6echo/README.md
@biovisualize
biovisualize / compat.js
Created November 30, 2012 16:49
Sankey Viz using R2D3
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map
// Production steps of ECMA-262, Edition 5, 15.4.4.19
// Reference: http://es5.github.com/#x15.4.4.19
if (!Array.prototype.map) {
Array.prototype.map = function(callback, thisArg) {
var T, A, k;
if (this == null) {
throw new TypeError(" this is null or not defined");
@biovisualize
biovisualize / geodesic.js
Created July 17, 2012 22:12 — forked from mbostock/.block
Icosahedron
(function() {
var φ = 1.618033988749895,
ρ = 180 / Math.PI;
var vertices = [
[1,φ,0], [-1,φ,0], [1,-φ,0], [-1,-φ,0],
[0,1,φ], [0,-1,φ], [0,1,-φ], [0,-1,-φ],
[φ,0,1], [-φ,0,1], [φ,0,-1], [-φ,0,-1]
];
@biovisualize
biovisualize / index.html
Created April 6, 2012 21:06
Zoom/pan map
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<!--
Zoom/pan map example: integrates d3.geo and d3.behavior
Iain Dillingham, http://dillingham.me.uk/
With help from Jason Davies, http://www.jasondavies.com/
-->
<title>Zoom/pan map example</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
@biovisualize
biovisualize / index.html
Created October 3, 2011 02:31 — forked from ZJONSSON/index.html
Simple transitioning slides with SVG and D3 (from ZJONSSON)
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="svg_slides.js"></script>
<script type="text/javascript">
// There are probably better ways of loading the SVG, but this is one example I found
@biovisualize
biovisualize / index.html
Created September 23, 2011 20:29 — forked from mbostock/.block
External SVG
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
</head>
<body>
<script type="text/javascript">
d3.xml("rect01.svg", "image/svg+xml", function(xml) {
var importedNode = document.importNode(xml.documentElement, true);