Skip to content

Instantly share code, notes, and snippets.

@mtaptich
mtaptich / OrbitControls.js
Last active December 17, 2015 01:50
3D Plot (Part 1)
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
*/
/*global THREE, console */
// This set of controls performs orbiting, dollying (zooming), and panning. It maintains
@mtaptich
mtaptich / README.md
Last active August 1, 2016 01:37
k-means + d3.js

An example of K-means clustering in d3.js.

@mtaptich
mtaptich / README.md
Last active March 16, 2016 00:57
Solve a Linear Program

A simple, 'hands-on' example of solving a linear mathematical program using d3.js + Angular.js.

@mtaptich
mtaptich / index.html
Created December 11, 2015 01:13
Molecules (Pt1)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link line {
stroke: #696969;
}
.link {
stroke: #696969;
}
@mtaptich
mtaptich / README.md
Last active December 11, 2015 01:05
d3 + Google Maps

My first pass at showing time series data on Google Maps.

@mtaptich
mtaptich / README.md
Last active December 11, 2015 00:53
Showcase States

Use this to showcase state-level information by clicking on a state.

@mtaptich
mtaptich / index.html
Last active December 11, 2015 00:42
map + point translation
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
.land {
fill: #eee;
stroke: #777777;
}
circle {
@mtaptich
mtaptich / index.html
Last active December 11, 2015 00:37
Streaking Canvas
<canvas id="canvas"></canvas>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var num = 3000;
var canvas = document.getElementById("canvas");
var width = canvas.width = 2000;
var height = canvas.height = 1200;
var ctx = canvas.getContext("2d");
ctx.scale(2, 2);
var angle = 1*Math.PI/180; // down
@mtaptich
mtaptich / README.md
Last active December 11, 2015 00:14
Dictionaries

The seventh of a series of data visualizations on basic coding concepts. Dictionaries are a very helpful data structure for storing hierarchical relationships. Get data from the team that is two layers into the dictionary called NCAA!

@mtaptich
mtaptich / README.md
Last active December 10, 2015 21:09
Indexing

The sixth of a series of data visualizations on basic coding concepts. A is a matrix of rows(i) and columns (j). Use indexing to select elements of the matrix!