Skip to content

Instantly share code, notes, and snippets.

View stormpython's full-sized avatar

Shelby Sturgis stormpython

  • Netflix
  • San Francisco, CA
View GitHub Profile
@stormpython
stormpython / Rows, Columns, Grid Layout Example.markdown
Created November 9, 2015 22:35
Rows, Columns, Grid Layout Example
@stormpython
stormpython / readme.md
Last active September 18, 2015 17:26 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@stormpython
stormpython / example.html
Last active September 15, 2015 17:07
Creating a Line Chart with Phoenix
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
body {
font: 10px sans-serif;
}
@stormpython
stormpython / split.js
Created July 2, 2015 16:35
Recursive splitting of divs with D3
define(function (require) {
var d3 = require("d3");
return function split() {
var splitBy = function (d) { return d; };
var element = "div";
var elementClass = function () { return "horizontal"; };
var predicate = false;
function layout(selection) {
@stormpython
stormpython / index.html
Last active August 29, 2015 14:24
Layout Example using D3 style reusable components
<div class="visualize"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
@stormpython
stormpython / country.csv
Last active August 29, 2015 14:21
D3 Reusable Chart
country median_age gdp edu_index
Afghanistan 18 18949 0.354
Albania 30.2 13000 0.886
Algeria 27.1 198735 0.748
Andorra 39.9 3577 0.878
Antigua and Barbuda 30 1118 0.945
Argentina 30.3 448165 0.946
Australia 37.5 1515468 0.993
Austria 42.6 418031 0.962
Azerbaijan 28.5 63404 0.881
@stormpython
stormpython / country.csv
Last active August 29, 2015 14:21
Insight Data Visualization Workshop
Afghanistan 18 18949 0.354
Albania 30.2 13000 0.886
Algeria 27.1 198735 0.748
Andorra 39.9 3577 0.878
Antigua and Barbuda 30 1118 0.945
Argentina 30.3 448165 0.946
Australia 37.5 1515468 0.993
Austria 42.6 418031 0.962
Azerbaijan 28.5 63404 0.881
@stormpython
stormpython / grid_layout.js
Created February 13, 2015 18:34
Grid Layout
// D3 code
var $el = $('.visualize-chart')[0];
var data = {
type: 'chart',
series: [{}, {}, {}]
};
var selection = d3.select($el).datum(data).call(split);
function split (selection) {
selection.each(function (data) {
// Pulling values recursively from Pie Chart Data
function getSize (obj) {
return obj.size;
}
function isZero (d) {
return d.size === 0;
}

InsightFL Presentation @ Insight Data Science

Snippets of files used to create a data table and bubble chart.