These are google searches for 'Old Lang Syne' since 2004. Seems to be popular around this time of the year.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Chernoff Smileys</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.5.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.5.0"></script> | |
<style type="text/css"> | |
</style> | |
</head> |
<!doctype html> | |
<head> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
#main { | |
left: 25%; | |
position: absolute; | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Chernoff Smileys</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.5.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.5.0"></script> | |
<style type="text/css"> | |
</style> | |
</head> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
@import url("http://polymaps.org/style.css"); | |
html, body { | |
height: 100%; |
Backbone.sync = function(method, model, options) { | |
// we need to make sure we initialize a store, in this case | |
// we will just use a JS object. | |
var cache = {}; | |
// The size will be primarily used to assign ids to newly | |
// created models. Each time a new model is created, the size | |
// will be incremented. | |
var size = 0; |
Have you ever seen these scatterplots that report a significant correlation between X and Y, but it looks like it's just the one point to the upper-right driving the correlation? Thanks to this interactive tool, you too can do this at home. Click anywhere in the picture, and the red dot will move. The sliding bar displays the resulting correlation coefficient. The grey interval are non-significant values: place the red dot right to get a significant result.
Data are generated from two standard independent gaussian (N=15). Test values are from the asymptotic Fisher transformation test that's on Wikipedia (two-sided, alpha = 5%). Code: R and d3.js.
function img2table( img ){ | |
var canvas = document.createElement('canvas') | |
, ctx = canvas.getContext('2d') | |
, table = document.createElement('table') | |
, width = canvas.width = img.width | |
, height = canvas.height = img.height | |
, pixels | |
, i, j, l1, l2 | |
, tr, td, r, g, b |
# Truly the most ridiculous thing I could think of. | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("XML", "png", "devtools", "RCurl") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Some helper functions, lineFinder and makeTable | |
source_gist("818983") | |
source_gist("818986") |
This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.