Just a simple test of visualizing some simple data with d3 using TypeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Large Multiples</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
rect { | |
fill: #ddd; | |
stroke: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All of these numbers are from proceedings except chi2012 and infovis2012, which are from paper notification emails. | |
CHI 2011 - 1540 submitted. 409 accepted (27%) | |
CHI 2011 papers - 1012. 306 (30%) | |
CHI 2011 notes - 514. 103 (20%) | |
CHI 2012 - 1577 submitted. 23% accepted (23%) - from notification email | |
InfoVis 2011 - 172 submitted. 44 accepted (26%) | |
InfoVis 2012 - 178 submitted. 44 accepted (25%) - from notification email | |
Vis 2011 - 194 submitted. 49 accepted (25%) | |
UIST 2011 - 262 submitted. 67 accepted (25%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
node_modules | |
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<canvas style="width:100%; height:100%"></canvas> | |
<script> | |
/* https://github.com/d3/d3-timer Copyright 2015 Mike Bostock */ | |
"undefined"==typeof requestAnimationFrame&&(requestAnimationFrame="undefined"!=typeof window&&(window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame)||function(e){return setTimeout(e,17)}),function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.timer={})}(this,function(e){"use strict";function n(){r=m=0,c=1/0,t(u())}function t(e){if(!r){var t=e-Date.now();t>24?c>e&&(m&&clearTimeout(m),m=setTimeout(n,t),c=e):(m&&(m=clearTimeout(m),c=1/0),r=requestAnimationFrame(n))}}function i(e,n,i){i=null==i?Date.now():+i,null!=n&&(i+=+n);var o={callback:e,time:i,flush:!1,next:null};a?a.next=o:f=o,a=o,t(i)}function o(e,n,t){t=null==t?Date.now():+t,null!=n&&(t+=+n),l.callback=e,l.time=t}function u(e){e=nu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# r doesn't have a standard error function | |
stderr = function(x) sqrt(var(x,na.rm=TRUE)/length(na.omit(x))) | |
ci = function(x, confidence.interval=0.95) stderr(x) * qnorm(1 - (1-confidence.interval)/2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages('dplyr') | |
# install.packages('tidyr') | |
# install.packages('ggplot2') | |
library(dplyr) | |
library(tidyr) | |
library(ggplot2) | |
# make some trials | |
data = expand.grid( | |
subjectID = seq(1, 1.5, length.out=4), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="1000" height="1000"></canvas> | |
<script> | |
function drawImage() { | |
var canvas = document.getElementById('myCanvas'); | |
var context = canvas.getContext('2d'); | |
var imageWidth = canvas.width = Math.min(canvas.width, window.innerWidth); | |
var imageHeight = canvas.height = Math.min(canvas.height, window.innerHeight); |