Skip to content

Instantly share code, notes, and snippets.

View bollwyvl's full-sized avatar

Nicholas Bollweg bollwyvl

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bollwyvl
bollwyvl / README.md
Last active August 29, 2015 14:14 — forked from tonyfast/README.md

An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.

Modifications

Very minor tweaks were made to create a collapsible tree of a dict-like object.

  • The dict is converted to the flare.json tree structure with a default size.
  • I added a subset of a gist API response because that is what I am working on.
  • I added lodash because the tree converter was already written.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
.git
.vagrant
@bollwyvl
bollwyvl / d3.ml.js
Last active September 1, 2016 17:11 — forked from tonyfast/d3.ml.js
;( function(){
// an extension for d3 that iterates over Javascript objects
// to build a DOM derived from data.
d3.ml = {
// YAML templates that execute d3ml
templates: {},
requests: {},
scripts: {},
build:
function(s, template, state){
@bollwyvl
bollwyvl / OMP.ipynb
Last active August 29, 2015 14:17 — forked from ocefpaf/OMP.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bollwyvl
bollwyvl / README.md
Last active August 29, 2015 14:22 — forked from donaldh/README.md

I have modified the force-multi-foci example to add a convex hull around each cluster of nodes.

I achieved this by using d3.nest() to create a new dataset of clusters containing the nodes in each cluster. Then in the tick() method I create and update the path element for each cluster in this dataset.