Skip to content

Instantly share code, notes, and snippets.

@a-malahova
a-malahova / CREDITS
Last active May 27, 2018 15:38 — forked from GerHobbelt/.gitignore
d3.js: force layout; click to group/bundle nodes
Code derived from the d3.js 'force' example:
The miserables.json file contains the weighted network of coappearances of
characters in Victor Hugo's novel /Les Miserables/. Nodes represent characters
as indicated by the labels, and edges connect any pair of characters that
appear in the same chapter of the book. The values on the edges are the number
of such coappearances. The data on coappearances were taken from D. E. Knuth,
"The Stanford GraphBase: A Platform for Combinatorial Computing",
Addison-Wesley, Reading, MA (1993).
@a-malahova
a-malahova / README.md
Last active November 12, 2017 20:26 — forked from jasondavies/README.md
Map with pan+zoom and floating buttons for zoom in/out and reset.

Uses geographic projection and d3.zoom working with d3.v4.js

Based on an example by Jason Davies.

@a-malahova
a-malahova / d3-sankey.js
Last active September 12, 2019 09:34 — forked from cirofdo/d3-sankey.js
Collapsible Sankey diagram with gradient link colouring
// https://github.com/vasturiano/d3-sankey Version 0.4.2.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-collection'), require('d3-interpolate')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-interpolate'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3));
}(this, (function (exports,d3Array,d3Collection,d3Interpolate) { 'use strict';
var sankey = function() {
var sankey = {},
nodeWidth = 24,