Skip to content

Instantly share code, notes, and snippets.

@jmuyskens
jmuyskens / index.html
Last active December 18, 2015 00:28
randomly colored united states
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v0.min.js"></script>
<script src="random-color-states.js"></script>
</body>
@jmuyskens
jmuyskens / README.md
Last active December 18, 2015 01:19
2012 faculty-to-major ratio at Calvin

A visualization of the 2012 faculty to major ratio in each academic department at Calvin College. This is based on the 2012 Day 10 statistics. While Art History is a program rather than a department, it is included for comparison since it is on the chopping block. Keep in mind that the student to faculty ratio might be quite different than the major to faculty ratio. Some departments like Religion have comparatively few majors but a large chunk of the core. Select "Open in new window" to see the whole thing.

@jmuyskens
jmuyskens / README.md
Last active December 18, 2015 01:29
Faculty-to-student and Faculty-to-major ratios

Dark orange is faculty-student ratio while light orange is faculty-major. Art History gets shortchanged because I don't know the faculty-student ratio (it is lumped together with Art & Art History), but is again included for interest's sake.

@jmuyskens
jmuyskens / drag.js
Last active August 29, 2015 13:56
Interactive drag and drop weekly course schedule.
/**
* Created by jmuyskens on 2/9/14.
*/
var margin = {top:10, right: 10, bottom: 10, left: 50},
height = 500 - margin.top - margin.bottom,
height = 500 - margin.top - margin.bottom,
width = 500 - margin.left - margin.right;
var days = ['mon','tue','wed','thu','fri'];
@jmuyskens
jmuyskens / index.html
Last active August 29, 2015 14:08
Hexagon whirl
<!DOCTYPE HTML>
<html lang="en">
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="whirl.js"></script>
<style>
path {
fill: none;
stroke: maroon;
}
d3.xml(filename, "image/svg+xml", function(xml) {
var importedNode = document.importNode(xml.documentElement, true);
d3.select(element[0]).node().appendChild(importedNode);
});
@jmuyskens
jmuyskens / index.html
Created October 5, 2015 01:43
waves (p5.js)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>waves (p5.js)</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.2.8/p5.min.js"></script>
</head>
<body>
<script>
function setup() {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.2.8/p5.min.js"></script>
</head>
<body>
<input id='slider' type="range" max=3 step=0.1 value=0 >
<script>
var t = 0.0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>generated</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/p5.js/0.2.8/p5.min.js"></script>
</head>
<body>
<script>
var WIDTH = 960;