Skip to content

Instantly share code, notes, and snippets.

@nsonnad
nsonnad / .block
Last active January 6, 2017 19:52 — forked from mbostock/.block
Ordinal line chart
license: gpl-3.0
@nsonnad
nsonnad / README.md
Last active December 19, 2015 16:19 — forked from mbostock/.block
Colored links in force-directed graph

Simple change to Mike Bostock's force-directed graph, adding colors to links.

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

<!DOCTYPE html>
<html>
<head>
<title>Force-Directed Layout (Multiple Foci)</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script>
</head>
<body>
<script type="text/javascript">
# Editor backup files
*.bak
*~
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
</body>
</html>
@nsonnad
nsonnad / index.html
Created January 10, 2013 04:01 — forked from ejfox/index.html
<!doctype html>
<html>
<head>
<title></title>
<meta charset=utf-8>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="https://raw.github.com/square/crossfilter/master/crossfilter.min.js"></script>
<style>
body {
font-size: 100%;