Skip to content

Instantly share code, notes, and snippets.

@jadiehm
jadiehm / index.html
Last active April 12, 2017 15:11
Yearly animated cycle map
<!doctype html>
<html lang='en-GB'>
<head></head>
<style>
p {
font-family: sans-serif;
font-size: 14px;
}
h3 {
font-family: sans-serif;
@jadiehm
jadiehm / budget.csv
Last active April 12, 2017 14:57
Horizontal bar chart with button scale transition
agency year2017 year2018 type amount
Health & Human Services 77.7 65.1 Billions of $ -12.6
State & other devel. programs 38 27.1 Billions of $ -10.9
Education 68.2 59 Billions of $ -9.2
Agriculture 22.6 17.9 Billions of $ -4.7
Housing & Urban Development 36 31.7 Billions of $ -4.3
Justice 20.3 16.2 Billions of $ -4
EPA 8.2 5.7 Billions of $ -2.6
Labor 12.2 9.6 Billions of $ -2.5
Transportation 18.6 16.2 Billions of $ -2.4
@jadiehm
jadiehm / bodymovin.js
Last active April 6, 2017 15:11
After Effects animations to canvas with bodymovin.js
(function (root, factory) { if(typeof define === "function" && define.amd) { define( factory); } else if(typeof module === "object" && module.exports) { module.exports = factory(); } else { root.bodymovin = factory(); } }(window, function() {var svgNS = "http://www.w3.org/2000/svg";
var subframeEnabled = true;
var expressionsPlugin;
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
var cachedColors = {};
var bm_rounder = Math.round;
var bm_rnd;
var bm_pow = Math.pow;
var bm_sqrt = Math.sqrt;
var bm_abs = Math.abs;
We can make this file beautiful and searchable if this error is corrected: It looks like row 14 should actually have 15 columns, instead of 1. in line 13.
player,games,avgpoints,fgpercent,tppercent,ftpercent,avgoffrebound,avgdefrebound,avgtotalrebound,avgfouls,avgassists,avgturnovers,avgblocks,avgsteals,avgmins Breanna Stewart,74,18.4,56.1,36.9,82.8,2.1,6.1,8.2,1.5,3.5,1.8,3.1,1.6,28.5 Briana Pulido,58,0.3,22.6,14.3,50,0,0.2,0,0.1,0.1,0.1,0.1,0.1,2.5 Courtney Ekmark,60,2,39.7,33.3,33.3,0.4,0.8,1.3,0.4,0.6,0.6,0.1,0.3,9.1 Crystal Dangerfield,24,55,39.9,31.7,55,0.3,2,2.3,1.4,3.6,1.7,0,1,24.4 Gabby Williams,104,9.9,60.4,14.3,61.7,2.4,4.2,6.6,1.5,2.5,1.5,0.6,1.9,20.3 Kaleena Mosqueda-Lewis,36,14.5,51.6,47.4,88.2,1.2,3,4.1,1.2,2.8,1.4,0.4,1.1,28.4 Katie Lou Samuelson,66,15.3,48.9,40.4,83,0.6,2.9,3.5,1.3,2.5,1.5,0.2,1.2,26.8 Kia Nurse,100,10.6,46.4,40,77.7,0.6,1.9,2.5,1.5,3.1,1.5,0.1,1.3,28 Kiah Stokes,37,4.4,58.5,50,73.5,1.8,5,6.8,1.6,0.8,0.8,3.8,0.7,18.1 Kyla Irwin,25,2.1,43.5,26.7,71.4,0.4,1.1,1.6,0.8,0.4,0.6,0,0.3,8.2 Molly Bent,25,1.2,26.7,28.6,62.5,0.4,1.1,1.5,0.8,1.4,0.8,0,0.5,10.1 Morgan Tuck,70,14.2,56.4,31.2,76.1,2,3.7,5.7,1.4,3.2,1.7,0.3,0.8,26.3 Moriah Je
@jadiehm
jadiehm / huskies.png
Last active March 7, 2017 15:21
UConn basketball margin
huskies.png
@jadiehm
jadiehm / huskies.png
Last active March 7, 2017 15:35
UConn women's basketball scorers
huskies.png
@jadiehm
jadiehm / homeValue.csv
Last active February 1, 2017 14:11
Line chart with shaded middle area
year blueValue redValue
1984 85461 74830
1985 90195 76474
1986 97296 78226
1987 107679 79316
1988 117369 79027
1989 126945 79897
1990 134745 81569
1991 134416 83014
1992 135375 85407
@jadiehm
jadiehm / arrow.png
Last active January 31, 2017 21:13
Arrow chart with styles
arrow.png
@jadiehm
jadiehm / d3-jetpack.js
Created January 29, 2017 16:32
Line area chart with swoopy drag annotations
(function(root, factory) {
if (typeof module !== 'undefined' && module.exports) {
module.exports = factory(require('d3'));
} else if (typeof define === 'function' && define.amd) {
define(['d3'], factory);
} else {
root.d3 = factory(root.d3);
}
}(this, function(d3) {
@jadiehm
jadiehm / electoral_college.csv
Created January 29, 2017 15:53
Scatter plot with detailed labels
president year popvote_percent popvote_advant elecvote_percent elecvote_advant type
J.Q. Adams 1824 30.9 -10.4 32.2 -5.7 failure
Jackson 1828 56 12.4 68.2 36.4 correct
Jackson 1832 54.2 16.8 76 59 correct
Van Buren 1836 50.8 14.2 57.8 33 correct
W. Harrison 1840 52.8 6 79.6 59.2 correct
Polk 1844 49.5 1.4 61.8 23.6 correct
Taylor 1848 47.3 4.8 56.2 12.4 correct
Pierce 1852 50.8 6.9 85.8 71.6 correct
Buchanan 1856 45.3 12.2 58.8 20.3 correct