Skip to content

Instantly share code, notes, and snippets.

View owendall's full-sized avatar

Owen Dall Sotomayor owendall

View GitHub Profile
@owendall
owendall / gauge.js
Created December 13, 2016 20:53 — forked from tomerd/gauge.js
google style gauges using javascript d3.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;
@owendall
owendall / Zoomable Treemap
Last active December 16, 2016 19:01 — forked from ganeshv/.block
Zoomable Treemap Template
## Zoomable Treemap
Treemaps for visualizing hierarchical data. Click to zoom to the next level.
Click on the top orange band to zoom out. Based on Mike Bostock's
[Zoomable Treemaps](http://bost.ocks.org/mike/treemap/)
This template follows [pigshell](http://pigshell.com)'s convention for "gist
templates":
* It is supplied data using postMessage(), as a single object of the form
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@owendall
owendall / curl.md
Created December 20, 2016 15:30 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@owendall
owendall / PCoA.tsv
Created January 4, 2017 03:46 — forked from laceysanderson/PCoA.tsv
PCoA Plot
name p1 p2 p3 p4 p5 p6
Rose Reber 0.626 1.016 2.195 -1.662 -0.533 1.256
Pansy Paisley -1.026 -0.272 2.083 0.688 -1.270 -1.770
Nathaniel Nace -0.182 3.786 2.599 -1.688 1.442 -0.679
Leon Leblanc 2.522 4.166 -1.782 3.723 1.867 1.240
Verla Vanish 1.997 3.576 -1.288 1.729 0.731 0.310
Shona Sigmon 1.960 3.719 -1.421 1.785 0.777 0.265
Columbus Cartee 2.057 3.908 -2.608 3.596 2.256 1.528
Sunni Stalzer -2.481 -2.642 0.234 1.690 1.484 0.501
Wes Wahl 2.487 3.942 -1.664 3.296 2.371 1.096
@owendall
owendall / d3-wordcloud-2
Last active January 5, 2017 17:22 — forked from ericcoopey/README.md
D3 Word Cloud implementation
Word cloud implementation.
Example of how to
1. Change style from default. Uses linear scale
2. Alter word size
3. "Fit" it into the screen. At first the words were appearing out of view to the left.
@owendall
owendall / .block
Created February 19, 2017 17:40 — forked from mbostock/.block
Static Force Layout
license: gpl-3.0
@owendall
owendall / README.md
Last active April 21, 2017 17:59 — forked from mbostock/.block
Sticky Force Layout

This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.

Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.

Also note that the force layout resumes au

@owendall
owendall / README.md
Last active April 21, 2017 17:58 — forked from mbostock/.block
Sticky Force Layout

This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.

Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.

Also note that the force layout resumes au

@owendall
owendall / Force-Directed Web Worker
Last active April 21, 2017 17:57 — forked from mbostock/.block
Force-Directed Web Worker
license: gpl-3.0
height: 960