Switch between stacked and grouped layouts using sequenced transitions! Animations preserve object constancy and allow the user to follow the data across views. Animation design by Heer and Robertson. Colors and data generation inspired by Byron and Wattenberg.
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
#!/bin/sh | |
for png in *.png; do | |
sips -s format pdf "$png" --out "${png%%.*}.pdf" | |
done |
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
#include <stdio.h> | |
#include <time.h> | |
int main() | |
{ | |
clock_t tic = clock(); | |
my_func(); | |
clock_t toc = clock(); | |
printf("%f seconds\n", (double)(toc - tic) / CLOCKS_PER_SEC); | |
return 0; |
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
# Validation functions for month, day, and year | |
months = ['January', | |
'February', | |
'March', | |
'April', | |
'May', | |
'June', |
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
def swap(deck, i, j): | |
"Swap elements i and j of a collection." | |
print 'swap', i, j | |
deck[i], deck[j] = deck[j], deck[i] | |
def shuffle2(deck): | |
"A modification of my teacher's algo" | |
N = len(deck) | |
swapped = [False] * N | |
while not all(swapped): |
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
def f(x, y): | |
return x + y | |
def foo(f): | |
def nf(x, *args): | |
return x if not args else f(x, nf(*args)) | |
return nf | |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>SVG Test</title> | |
<script type="text/javascript" src="d3.v3/d3.v3.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> |
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> | |
<meta charset="utf-8"> | |
<script src="d3.v3/d3.v3.js"></script> | |
<style> | |
#tooltip { | |
position: absolute; | |
width: 200px; | |
height: auto; |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>D3 Test</title> | |
<script type="text/javascript" src = "/static/d3.v3/d3.v3.js"></script> | |
<link type="text/css" rel="stylesheet" href="/static/d3test.css"> | |
</head> | |
<body> |
[ Launch: Tributary inlet ] 5433795 by Y4suyuki
OlderNewer