Skip to content

Instantly share code, notes, and snippets.

@mtaptich
mtaptich / README.md
Last active May 28, 2019 05:08
For Loop

The first of a series of data visualizations on basic coding concepts. The for loop continues as long as our circle fits (e.g., our condition)!

@mtaptich
mtaptich / README.md
Last active December 10, 2015 01:46
If...Else

The second of a series of data visualizations on basic coding concepts. The if...else statement seeks to bin by colors!

@mtaptich
mtaptich / README.md
Last active February 17, 2018 03:22
While Loop

The third of a series of data visualizations on basic coding concepts. The while loop will run while the circle is out of the box. When our condition is FALSE, the model stops. The model reactivates upon TRUE (which is not always the case).

@mtaptich
mtaptich / README.md
Last active December 10, 2015 01:44
Variable Declaration

The fourth of a series of data visualizations on basic coding concepts. When you declare a variable, the next step is to assign it data!

@mtaptich
mtaptich / README.md
Last active December 10, 2015 21:07
Append/Push

The fifth of a series of data visualizations on basic coding concepts. When you append or push data to a list, all you do is add it to the last position!

@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!

@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 / 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 / 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 / README.md
Last active December 11, 2015 00:53
Showcase States

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